Skip to content

Replace Queuing of Retrieve Tasks using UWL

Vrinda edited this page Mar 27, 2023 · 1 revision

Overview

This page briefly describes an alternative to current existing implementation of :

These services are currently processed by Wildfly's Java Message Service API (JMS) subsystem, which is slated to be
completely replaced by Unified Worklist as part of future archive development.

Configuration

  • Configure a Remote Application Entity for external archive.
  • Archive is pre-configured with a UPS Processing Rule for retrieving DICOM instances.
  • Create a UPS Template Workitem with following modifications in the request payload json.
    • In order that the UPS records created by UPS template workitem gets processed by the pre-configured UPS processing rule, set the value of Scheduled Workitem Code Sequence (0040,4018) to match that of UPS processing rule.
    • To change the default destination (STORESCP), configure a Remote Application Entity and use that value in Destination AE of DICOM Storage Sequence of Output Destination Sequence.

Use Cases

UPS records creation for external studies using CSV file

  • Create / obtain a CSV file containing study instance UIDs and (preferably also) Patient IDs with issuer in HL7CX format associated with those studies on the local archive. Note that, if there are no Patient IDs in the CSV file then UPS records for different studies get created under a single dummy patient. Specify the field numbers containing study instance UID and Patient ID with issuer in HL7CX format.

  • Select the SOP Instance UID (0008,0018) of the desired UPS Template Workitem received in search UPS template workitem response and use this value as upsTemplateUID in followings service.

    curl -v -H "Content-type: text/csv" -X POST 'http[s]://<archive-host>:<port>/dcm4chee-arc/aets/<LocalArchiveAET>/studies/csv:1/workitems/<upsTemplateUID>?csvPatientID=2' --data-binary @testRetrieveCSV.csv
    

    Optionally following query filters can be sent in the above request whose value shall be set in created UPS workitems

    • upsLabel : Procedure Step Label (can be used similar to existing Batch ID in retrieve tasks)
    • upsScheduledTime : Scheduled Procedure Step Start DateTime

UPS records creation for external matching studies

Test Create UPS records for external matching studies

  • Select the desired UPS Template Workitem attributes received in response and create a JSON file using this dataset. This JSON file shall be sent as request payload in the invoked service.
    curl -v -H "Content-type:application/dicom+json" -X POST 'http[s]://<archive-host>:<port>/dcm4chee-arc/aets/<LocalArchiveAET>/dimse/<ExternalArchiveAET>/studies/workitems' --data @upsTemplateWorkitemAttrs.json
    
    Optionally following query filters can be sent in the above request whose value shall be set in created UPS workitems
    • upsLabel : Procedure Step Label (can be used similar to existing Batch ID in retrieve tasks)
    • upsScheduledTime : Scheduled Procedure Step Start DateTime

Verification

  • Verify that UPS records were created by searching them in Navigation -> UWL and specifying any filters as required.
  • Once the Scheduled Procedure Step Start DateTime is reached, the created UPS records are processed, and the objects are received on the destination side.
  • Verify the list of SOP Instances slated to be retrieved using C-MOVE in Input Information Sequence.
  • Performed Procedure Step Description contains description stating the transfer of number of instances from local archive AET to configured destination AET.

C-MOVE and C-STORE requests / responses can also be verified in Wildfly's server log as :

09:50:38,724 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-548) Initiate connection from /0.0.0.0:0 to localhost:11115
09:50:38,725 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-548) Established connection Socket[addr=localhost/127.0.0.1,port=11115,localport=43311]
09:50:38,725 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-548) DCM4CHEE->STORESCP(77) << A-ASSOCIATE-RQ
09:50:38,726 INFO  [org.dcm4che3.net.Association] (EE-ManagedScheduledExecutorService-default-Thread-1) DCM4CHEE<-DCM4CHEE(73): close Socket[addr=localhost/127.0.0.1,port=54387,localport=11112]
09:50:38,727 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-544) DCM4CHEE->STORESCP(77) >> A-ASSOCIATE-AC
09:50:38,729 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedScheduledExecutorService-default-Thread-13) DCM4CHEE<-DCM4CHEE(76) << 1:C-MOVE-RSP[pcid=1, remaining=2, completed=0, failed=0, warning=0, status=ff00H
  cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model - MOVE
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
09:50:38,731 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-547) DCM4CHEE->DCM4CHEE(75) >> 1:C-MOVE-RSP[pcid=1, remaining=2, completed=0, failed=0, warning=0, status=ff00H
  cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model - MOVE
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
09:50:38,731 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-545) DCM4CHEE->STORESCP(77) << 1:C-STORE-RQ[pcid=1, prior=0
  orig=DCM4CHEE >> 1:C-MOVE-RQ
  cuid=1.2.840.10008.5.1.4.1.1.20 - Nuclear Medicine Image Storage
  iuid=1.2.840.113619.2.216.2.1.2642006132233562.11300 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
09:50:38,733 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-545) DCM4CHEE->STORESCP(77) << 2:C-STORE-RQ[pcid=1, prior=0
  orig=DCM4CHEE >> 1:C-MOVE-RQ
  cuid=1.2.840.10008.5.1.4.1.1.20 - Nuclear Medicine Image Storage
  iuid=1.2.840.113619.2.216.2.1.2642006131450734.9771 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
09:50:38,734 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-544) DCM4CHEE->STORESCP(77) >> 1:C-STORE-RSP[pcid=1, status=0H
  cuid=1.2.840.10008.5.1.4.1.1.20 - Nuclear Medicine Image Storage
  iuid=1.2.840.113619.2.216.2.1.2642006132233562.11300 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
09:50:38,739 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-544) DCM4CHEE->STORESCP(77) >> 2:C-STORE-RSP[pcid=1, status=0H
  cuid=1.2.840.10008.5.1.4.1.1.20 - Nuclear Medicine Image Storage
  iuid=1.2.840.113619.2.216.2.1.2642006131450734.9771 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
09:50:38,746 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-545) DCM4CHEE->STORESCP(77) << A-RELEASE-RQ
09:50:38,746 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-545) DCM4CHEE<-DCM4CHEE(76) << 1:C-MOVE-RSP[pcid=1, completed=2, failed=0, warning=0, status=0H
  cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model - MOVE
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
09:50:38,747 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-544) DCM4CHEE->STORESCP(77) >> A-RELEASE-RP
09:50:38,747 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-544) DCM4CHEE->STORESCP(77): close Socket[addr=localhost/127.0.0.1,port=11115,localport=43311]
09:50:38,747 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-547) DCM4CHEE->DCM4CHEE(75) >> 1:C-MOVE-RSP[pcid=1, completed=2, failed=0, warning=0, status=0H
  cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model - MOVE
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
09:50:38,747 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-546) DCM4CHEE->DCM4CHEE(75) << A-RELEASE-RQ
09:50:38,748 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-548) DCM4CHEE<-DCM4CHEE(76) >> A-RELEASE-RQ
09:50:38,748 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-548) DCM4CHEE<-DCM4CHEE(76) << A-RELEASE-RP
09:50:38,748 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-547) DCM4CHEE->DCM4CHEE(75) >> A-RELEASE-RP
09:50:38,748 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-547) DCM4CHEE->DCM4CHEE(75): close Socket[addr=localhost/127.0.0.1,port=11112,localport=44299]
09:50:38,755 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-546) DCM4CHEE: Update UPS[pk=301097, uid=2.25.200433259660085130731558299675522667642, state=COMPLETED]
09:50:38,798 INFO  [org.dcm4che3.net.Association] (EE-ManagedScheduledExecutorService-default-Thread-10) DCM4CHEE<-DCM4CHEE(76): close Socket[addr=localhost/127.0.0.1,port=44299,localport=11112]
Clone this wiki locally