Module: Dcm4chee

Defined in:
lib/dcm4chee.rb,
lib/dcm4chee/engine.rb,
lib/dcm4chee/version.rb,
app/models/dcm4chee/study.rb,
app/models/dcm4chee/series.rb,
app/models/dcm4chee/patient.rb,
lib/dcm4chee/services/mbean.rb,
app/models/dcm4chee/instance.rb,
app/models/dcm4chee/modality.rb,
lib/dcm4chee/api_constraints.rb,
app/models/dcm4chee/dicom_file.rb,
app/models/dcm4chee/source_aet.rb,
app/models/dcm4chee/file_system.rb,
app/models/dcm4chee/trashed_study.rb,
lib/dcm4chee/dicom_object_manager.rb,
app/models/dcm4chee/trashed_series.rb,
app/models/dcm4chee/trashed_patient.rb,
app/models/dcm4chee/trashed_instance.rb,
lib/dcm4chee/models/has_dicom_object.rb,
app/models/dcm4chee/application_entity.rb,
app/models/dcm4chee/trashed_dicom_file.rb,
lib/dcm4chee/services/move_scu_service.rb,
lib/dcm4chee/services/content_edit_service.rb,
lib/dcm4chee/services/file_system_management.rb,
app/controllers/dcm4chee/api/v1/base_controller.rb,
app/controllers/dcm4chee/application_controller.rb,
lib/dcm4chee/services/application_entity_service.rb,
app/controllers/dcm4chee/api/v1/series_controller.rb,
app/controllers/dcm4chee/api/v1/studies_controller.rb,
app/controllers/dcm4chee/api/v1/trashes_controller.rb,
app/controllers/dcm4chee/api/v1/patients_controller.rb,
app/controllers/dcm4chee/api/v1/instances_controller.rb,
app/controllers/dcm4chee/api/v1/modalities_controller.rb,
app/controllers/dcm4chee/api/v1/source_aets_controller.rb,
app/controllers/dcm4chee/api/v1/file_systems_controller.rb,
app/controllers/dcm4chee/api/v1/dicom_objects_controller.rb,
app/controllers/dcm4chee/api/v1/trashed_series_controller.rb,
app/controllers/dcm4chee/api/v1/trashed_studies_controller.rb,
app/controllers/dcm4chee/api/v1/trashed_patients_controller.rb,
app/controllers/dcm4chee/api/v1/trashed_instances_controller.rb,
app/controllers/dcm4chee/api/v1/application_entities_controller.rb

Defined Under Namespace

Modules: Api, HasDicomObject, Service Classes: ApiConstraints, ApplicationController, ApplicationEntity, DicomFile, DicomObjectManager, Engine, FileSystem, Instance, Modality, Patient, Series, SourceAet, Study, TrashedDicomFile, TrashedInstance, TrashedPatient, TrashedSeries, TrashedStudy

Constant Summary collapse

REPOSITORY_NAME =
:dcm4chee
VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.configObject



26
27
28
# File 'lib/dcm4chee.rb', line 26

def config
  @config ||= Confstruct::Configuration.new
end

.configure(&block) ⇒ Object



30
31
32
33
34
35
# File 'lib/dcm4chee.rb', line 30

def configure(&block)
  config.configure(&block)

  config.repository_name = REPOSITORY_NAME unless config.repository_name
  DataMapper.setup(:dcm4chee, config.repository_uri) if config.repository_uri
end

.jolokiaObject



22
23
24
# File 'lib/dcm4chee.rb', line 22

def jolokia
  @jolokia ||= ::Jolokia.new(url: config.jolokia_url)
end

.method_missing(name, *args, &block) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/dcm4chee.rb', line 41

def method_missing(name, *args, &block)
  service = instance_variable_get("@#{name}")
  return service if service

  begin
    service_class = "Dcm4chee::Service::#{name.to_s.camelize}".constantize
    service = service_class.new(jolokia)
    instance_variable_set("@#{name}", service)

    service
  rescue
    super(name, *args, &block)
  end
end

.respond_to?(method) ⇒ Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/dcm4chee.rb', line 37

def respond_to?(method)
  Dcm4chee::Service.constants.include?(method.to_s.camelize.to_sym) || super(method)
end