-
Notifications
You must be signed in to change notification settings - Fork 244
Connecting to Google Cloud Healthcare API
This guide walks through a minimal example of connecting dcm4chee-arc-light to the Google Cloud Healthcare API by leveraging the DICOM -> DICOMweb Adapter.
This guide is a combination of the instructions in Run-minimum-set-of-archive-services-on-a-single-host and the DICOM -> DICOMweb Adapter README, so instructions in those files should take precedent.
-
version: "3" services: ldap: image: dcm4che/slapd-dcm4chee:2.4.48-21.0 logging: driver: json-file options: max-size: "10m" ports: - "389:389" - "636:636" env_file: docker-compose.env volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro - /var/local/dcm4chee-arc/ldap:/var/lib/openldap/openldap-data - /var/local/dcm4chee-arc/slapd.d:/etc/openldap/slapd.d - ./adapter-config.ldif:/var/local/adapter-config.ldif db: image: dcm4che/postgres-dcm4chee:12.2-22 logging: driver: json-file options: max-size: "10m" ports: - "5432:5432" env_file: docker-compose.env volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro - /var/local/dcm4chee-arc/db:/var/lib/postgresql/data arc: image: dcm4che/dcm4chee-arc-psql:5.22.0 logging: driver: json-file options: max-size: "10m" ports: - "8080:8080" - "8443:8443" - "9990:9990" - "9993:9993" - "11112:11112" - "2762:2762" - "2575:2575" - "12575:12575" env_file: docker-compose.env environment: WILDFLY_CHOWN: /opt/wildfly/standalone /storage WILDFLY_WAIT_FOR: ldap:389 db:5432 depends_on: - ldap - db volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro - /var/local/dcm4chee-arc/wildfly:/opt/wildfly/standalone - /var/local/dcm4chee-arc/storage:/storage adapter: image: gcr.io/cloud-healthcare-containers/healthcare-api-dicom-dicomweb-adapter-import:0.1.21 logging: driver: json-file options: max-size: "10m" command: - '--dimse_aet=HEALTHCARE_API' - '--dimse_port=2676' - '--dicomweb_address=$DICOMWEB_ADDRESS' - '--oauth_scopes=https://www.googleapis.com/auth/cloud-platform' - '--aet_dictionary_inline="[{"name":"DCM4CHEE","host":arc,"port":11112}]"' - '--verbose' ports: - "2676:2676" volumes: - ${GOOGLE_APPLICATION_CREDENTIALS}:/credentials environment: GOOGLE_APPLICATION_CREDENTIALS: /credentials depends_on: - arc
NOTE: For MacOS you need to prefix /private
to any local /var
paths. So for example, use /private/var/local/dcm4chee-arc/ldap:/var/lib/openldap/openldap-data
instead of /var/local/dcm4chee-arc/ldap:/var/lib/openldap/openldap-data
.
-
Specify the ldap configuration in the file
adapter-config.ldif
alternitavly same configuration may be done in UI after service is started:version: 1 dn: dicomAETitle=HEALTHCARE_API,cn=Unique AE Titles Registry,cn=DICOM Configuration,dc=dcm4che,dc=org objectClass: dicomUniqueAETitle dicomAETitle: HEALTHCARE_API dn: dicomDeviceName=HEALTHCARE_API,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org objectClass: dicomDevice dicomDeviceName: HEALTHCARE_API dicomInstalled: TRUE dn: cn=dicom,dicomDeviceName=HEALTHCARE_API,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org objectClass: dicomNetworkConnection cn: dicom dicomHostname: adapter dicomPort: 2676 dn: dicomAETitle=HEALTHCARE_API,dicomDeviceName=HEALTHCARE_API,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org objectClass: dicomNetworkAE dicomAETitle: HEALTHCARE_API dicomNetworkConnectionReference: cn=dicom,dicomDeviceName=HEALTHCARE_API,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org dicomAssociationInitiator: TRUE dicomAssociationAcceptor: TRUE dn: dcmExporterID=HEALTHCARE_API,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org objectClass: dcmExporter dcmExporterID: HEALTHCARE_API dcmURI: dicom:HEALTHCARE_API dicomAETitle: DCM4CHEE dcmQueueName: Export1 dicomDescription: HEALTHCARE_API dn: cn=Forward to HEALTHCARE_API,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org objectClass: dcmExportRule cn: Forward to HEALTHCARE_API dcmEntity: Series dcmDuration: PT1M dcmExporterID: HEALTHCARE_API
-
IMPORT_LDIF=/var/local/adapter-config.ldif STORAGE_DIR=/storage/fs1 POSTGRES_DB=pacsdb POSTGRES_USER=pacs POSTGRES_PASSWORD=pacs
-
Specify the environment variables for adapter configuration. See Creating and Managing Service Account Keys to get the credentials if you don't already have a service account set up.
$ export GOOGLE_APPLICATION_CREDENTIALS=path/to/credentials.json $ export DICOMWEB_ADDRESS=https://healthcare.googleapis.com/v1beta1/projects/$PROJECT/locations/$LOCATION/datasets/$DATASET/dicomStores/$STORE/dicomWeb
-
$ docker-compose -p dcm4chee up
in the directory containing
docker-compose.yml
adapter-config.ldif
anddocker-compose.env
. This command will bring up all the docker binaries and run dcm4chee starter scripts to initialize the database and ldap servers. The command won't terminate, but will continue printing server logs after it has finished bringing up the environment.
- stowrs sends multiple dicom files or directories containing DICOM files to STOW-RS receiver at a time.
- movescu implements both an SCU for the Query/Retrieve Service Class and an SCP for the Storage Service Class
stowrs --url "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs/studies/" /path/to/test/file.dcm
- Open http://localhost:8080/dcm4chee-arc/ui2/#/monitoring/export
- Submit search request
- "HEALTHCARE_API" should have status "COMPLETED" in 1 minute after file is uploaded
movescu -c HEALTHCARE_API@localhost:2676 -m SOPInstanceUID=$UID --relational -L IMAGE --dest DCM4CHEE
- Open http://localhost:8080/dcm4chee-arc/ui2/#/study/study
- Submit search request
- Expected $UID should be in search results
If you can successfully send an image to dcm4chee-arc-light, but don't see any HEALTHCARE_API entries in the /monitoring/export UI. You can double check the configuration in the adapter-config.ldif
was correctly applied:
- Check http://localhost:8080/dcm4chee-arc/ui2/#/device/devicelist to ensure HEALTHCARE_API is listed as a device. If not, you can create it on that page using the same settings as in the
adapter-config.ldif
file. - Follow the instructions in Adding an Export Rule to check whether the "Forward to IMPORT" export rule has been applied to the dcm4chee-arc device. If not, you can manually add it there.
DCM4CHEE 5 Documentation