Class: Dcm4chee::ApplicationEntity

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource
Defined in:
app/models/dcm4chee/application_entity.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_by_service(attrs = {}) ⇒ Object

Create an application entity through AEService of dcm4chee.

Parameters:

  • attrs (Hash) (defaults to: {}) —

    Attributes of the new application entity



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'app/models/dcm4chee/application_entity.rb', line 99

def create_by_service(attrs = {})
  params = [
    attrs[:title],
    attrs[:host],
    attrs[:port],
    attrs[:cipher_suites],
    attrs[:patient_id_issuer],
    attrs[:accession_number_issuer],
    attrs[:username],
    attrs[:password],
    attrs[:fs_group],
    attrs[:group],
    attrs[:description],
    attrs[:wado_url],
    attrs[:station_name],
    attrs[:institution],
    attrs[:department],
    !!(attrs[:installed]),
    true
  ]
  Dcm4chee.application_entity_service.add_ae(params)

  first(title: attrs[:title])
end

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



124
125
126
# File 'app/models/dcm4chee/application_entity.rb', line 124

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

Instance Method Details

#accession_number_issuer ⇒ String

Returns issuer of the accession number.

Returns:

  • (String) —

    issuer of the accession number



28
# File 'app/models/dcm4chee/application_entity.rb', line 28

property :accession_number_issuer, String, field: 'acc_no_issuer'

#cipher_suites ⇒ String

Returns cipher_suites, available values:SSL_RSA_WITH_NULL_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA Multi-suites should be specified in comma-separated format.

Returns:

  • (String) —

    cipher_suites, available values:SSL_RSA_WITH_NULL_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA Multi-suites should be specified in comma-separated format.



22
# File 'app/models/dcm4chee/application_entity.rb', line 22

property :cipher_suites, String, field: 'cipher_suites'

#department ⇒ String

Returns department.

Returns:

  • (String) —

    department



55
# File 'app/models/dcm4chee/application_entity.rb', line 55

property :department, String, field: 'department'

#description ⇒ String

Returns description.

Returns:

  • (String) —

    description



43
# File 'app/models/dcm4chee/application_entity.rb', line 43

property :description, String, field: 'ae_desc'

#destroy_by_service ⇒ Object

Delete an application entity through AEService of dcm4chee



91
92
93
# File 'app/models/dcm4chee/application_entity.rb', line 91

def destroy_by_service
  Dcm4chee.application_entity_service.remove_ae(title)
end

#fs_group ⇒ String

Returns group of the file system.

Returns:

  • (String) —

    group of the file system



37
# File 'app/models/dcm4chee/application_entity.rb', line 37

property :fs_group, String, field: 'fs_group_id', default: 'ONLINE_STORAGE'

#group ⇒ String

Returns group of the application entity.

Returns:

  • (String) —

    group of the application entity



40
# File 'app/models/dcm4chee/application_entity.rb', line 40

property :group, String, field: 'ae_group'

#host ⇒ String

Returns hostname or ip address.

Returns:

  • (String) —

    hostname or ip address



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

property :host, String, field: 'hostname'

#id ⇒ Integer

Returns primary key.

Returns:

  • (Integer) —

    primary key



9
# File 'app/models/dcm4chee/application_entity.rb', line 9

property :id, Serial, field: 'pk'

#installed ⇒ String

Returns installed or not.

Returns:

  • (String) —

    installed or not



58
# File 'app/models/dcm4chee/application_entity.rb', line 58

property :installed, String, field: 'installed'

#institution ⇒ String

Returns institution.

Returns:

  • (String) —

    institution



52
# File 'app/models/dcm4chee/application_entity.rb', line 52

property :institution, String, field: 'institution'

#password ⇒ String

Returns password.

Returns:

  • (String) —

    password



34
# File 'app/models/dcm4chee/application_entity.rb', line 34

property :password, String, field: 'passwd'

#patient_id_issuer ⇒ String

Returns issuer of the patient id.

Returns:

  • (String) —

    issuer of the patient id



25
# File 'app/models/dcm4chee/application_entity.rb', line 25

property :patient_id_issuer, String, field: 'pat_id_issuer'

#port ⇒ Integer

Returns port.

Returns:

  • (Integer) —

    port



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

property :port, Integer, field: 'port'

#station_name ⇒ String

Returns station name.

Returns:

  • (String) —

    station name



49
# File 'app/models/dcm4chee/application_entity.rb', line 49

property :station_name, String, field: 'station_name'

#title ⇒ String

Returns name.

Returns:

  • (String) —

    name



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

property :title, String, field: 'aet'

#update_by_service(attrs = {}) ⇒ Object

Update an application entity through AEService of dcm4chee.

Parameters:

  • attrs (Hash) (defaults to: {}) —

    Attributes of the application entity



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'app/models/dcm4chee/application_entity.rb', line 63

def update_by_service(attrs = {})
  params = [
    id,
    attrs[:title] || title,
    attrs[:host] || host,
    attrs[:port] || port,
    attrs[:cipher_suites] || cipher_suites,
    attrs[:patient_id_issuer] || patient_id_issuer,
    attrs[:accession_number_issuer] || accession_number_issuer,
    attrs[:username] || username,
    attrs[:password] || password,
    attrs[:fs_group] || fs_group,
    attrs[:group] || group,
    attrs[:description] || description,
    attrs[:wado_url] || wado_url,
    attrs[:station_name] || station_name,
    attrs[:institution] || institution,
    attrs[:department] || department,
    attrs[:installed] || installed,
    true
  ]
  Dcm4chee.application_entity_service.update_ae(params)
  reload

  self
end

#username ⇒ String

Returns username.

Returns:

  • (String) —

    username



31
# File 'app/models/dcm4chee/application_entity.rb', line 31

property :username, String, field: 'user_id'

#wado_url ⇒ String

Returns url of WADO.

Returns:

  • (String) —

    url of WADO



46
# File 'app/models/dcm4chee/application_entity.rb', line 46

property :wado_url, String, field: 'wado_url'