Class: Dcm4chee::TrashedPatient

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource, DataMapper::Searcher, HasDicomObject
Defined in:
app/models/dcm4chee/trashed_patient.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from HasDicomObject

#as_json, #dcm, #dcm_elements

Class Method Details

.repository(name = nil, &block) ⇒ Object



36
37
38
# File 'app/models/dcm4chee/trashed_patient.rb', line 36

def self.repository(name = nil, &block)
  super(Dcm4chee.config.repository_name, &block)
end

Instance Method Details

#idInteger

Returns primary key.

Returns:

  • (Integer)

    primary key



12
# File 'app/models/dcm4chee/trashed_patient.rb', line 12

property :id, Serial, field: 'pk'

#nameString

Returns name.

Returns:

  • (String)

    name



21
# File 'app/models/dcm4chee/trashed_patient.rb', line 21

property :name, String, field: 'pat_name'

#pat_attrsString

Returns DICOM attributes.

Returns:

  • (String)

    DICOM attributes



24
# File 'app/models/dcm4chee/trashed_patient.rb', line 24

dicom_field 'pat_attrs'

#pidInteger

Returns patient id.

Returns:

  • (Integer)

    patient id



15
# File 'app/models/dcm4chee/trashed_patient.rb', line 15

property :pid, String, field: 'pat_id'

#pid_issuerString

Returns issuer of the patient id.

Returns:

  • (String)

    issuer of the patient id



18
# File 'app/models/dcm4chee/trashed_patient.rb', line 18

property :pid_issuer, String, field: 'pat_id_issuer'

#remove_from_trashObject



32
33
34
# File 'app/models/dcm4chee/trashed_patient.rb', line 32

def remove_from_trash
  Dcm4chee.content_edit_service.delete_patient(id)
end

#restore_from_trashObject



28
29
30
# File 'app/models/dcm4chee/trashed_patient.rb', line 28

def restore_from_trash
  Dcm4chee.content_edit_service.undelete_patient(id)
end