Skip to content

Export local studies using UPS Template

Vrinda edited this page Mar 27, 2023 · 1 revision

Overview

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

Configuration

  • Archive is pre-configured with a UPS Processing Rule for exporting DICOM instances to STORESCP.
  • 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 local 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>/rs/studies/csv:1/workitems/<upsTemplateUID>?csvPatientID=2' --data-binary @testExportCSV.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 export tasks)
    • upsScheduledTime : Scheduled Procedure Step Start DateTime

UPS records creation for local matching studies

Test Create UPS records for local 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>/rs/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 export 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 exported in the Input Information Sequence.
  • Verify the list of SOP instances exported to the destination in Output Information Sequence. Additionally, this sequence also contains DICOM Retrieval Sequence which contains the Retrieve AE Title pointing to the destination where objects were sent.

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

10:28:38,442 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301102, uid=2.25.100473029688271913202159087210857419651, state=IN PROGRESS]
10:28:38,502 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Initiate connection from /0.0.0.0:0 to localhost:11115
10:28:38,503 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Established connection Socket[addr=localhost/127.0.0.1,port=11115,localport=54289]
10:28:38,503 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(78) << A-ASSOCIATE-RQ
10:28:38,559 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(78) >> A-ASSOCIATE-AC
10:28:38,561 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(78) << 1:C-STORE-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.1.20 - Nuclear Medicine Image Storage
  iuid=1.2.840.113654.2.3.2004.1.2402.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,610 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(78) >> 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.113654.2.3.2004.1.2402.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,610 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(78) << A-RELEASE-RQ
10:28:38,610 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(78) >> A-RELEASE-RP
10:28:38,610 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(78): close Socket[addr=localhost/127.0.0.1,port=11115,localport=54289]
10:28:38,614 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301102, uid=2.25.100473029688271913202159087210857419651, state=COMPLETED]
10:28:38,622 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301103, uid=2.25.6276948729160947272766048718277463363, state=IN PROGRESS]
10:28:38,629 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Initiate connection from /0.0.0.0:0 to localhost:11115
10:28:38,629 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Established connection Socket[addr=localhost/127.0.0.1,port=11115,localport=47807]
10:28:38,629 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(79) << A-ASSOCIATE-RQ
10:28:38,631 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(79) >> A-ASSOCIATE-AC
10:28:38,632 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(79) << 1:C-STORE-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.1.20 - Nuclear Medicine Image Storage
  iuid=1.2.840.113654.2.3.2004.1.2422.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,633 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(79) >> 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.113654.2.3.2004.1.2422.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,633 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(79) << A-RELEASE-RQ
10:28:38,636 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(79) >> A-RELEASE-RP
10:28:38,637 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(79): close Socket[addr=localhost/127.0.0.1,port=11115,localport=47807]
10:28:38,638 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301103, uid=2.25.6276948729160947272766048718277463363, state=COMPLETED]
10:28:38,645 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301104, uid=2.25.186335400358589000509692265547965406889, state=IN PROGRESS]
10:28:38,652 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Initiate connection from /0.0.0.0:0 to localhost:11115
10:28:38,653 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Established connection Socket[addr=localhost/127.0.0.1,port=11115,localport=33669]
10:28:38,653 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(80) << A-ASSOCIATE-RQ
10:28:38,654 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(80) >> A-ASSOCIATE-AC
10:28:38,655 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(80) << 1:C-STORE-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.1.20 - Nuclear Medicine Image Storage
  iuid=1.2.840.113654.2.3.2004.1.2405.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,656 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(80) >> 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.113654.2.3.2004.1.2405.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,657 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(80) << A-RELEASE-RQ
10:28:38,657 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(80) >> A-RELEASE-RP
10:28:38,657 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(80): close Socket[addr=localhost/127.0.0.1,port=11115,localport=33669]
10:28:38,661 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301104, uid=2.25.186335400358589000509692265547965406889, state=COMPLETED]
10:28:38,672 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301100, uid=2.25.309382704025312744568597778106777211805, state=IN PROGRESS]
10:28:38,681 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Initiate connection from /0.0.0.0:0 to localhost:11115
10:28:38,682 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Established connection Socket[addr=localhost/127.0.0.1,port=11115,localport=48309]
10:28:38,682 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(81) << A-ASSOCIATE-RQ
10:28:38,684 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(81) >> A-ASSOCIATE-AC
10:28:38,685 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(81) << 1:C-STORE-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.1.20 - Nuclear Medicine Image Storage
  iuid=1.2.840.113654.2.3.2004.1.2423.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,686 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(81) >> 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.113654.2.3.2004.1.2423.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,694 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(81) << A-RELEASE-RQ
10:28:38,695 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(81) >> A-RELEASE-RP
10:28:38,695 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(81): close Socket[addr=localhost/127.0.0.1,port=11115,localport=48309]
10:28:38,699 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301100, uid=2.25.309382704025312744568597778106777211805, state=COMPLETED]
10:28:38,706 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301101, uid=2.25.328539383328043845939389893915725237171, state=IN PROGRESS]
10:28:38,714 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Initiate connection from /0.0.0.0:0 to localhost:11115
10:28:38,714 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-773) Established connection Socket[addr=localhost/127.0.0.1,port=11115,localport=52291]
10:28:38,714 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(82) << A-ASSOCIATE-RQ
10:28:38,716 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(82) >> A-ASSOCIATE-AC
10:28:38,717 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(82) << 1:C-STORE-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.1.20 - Nuclear Medicine Image Storage
  iuid=1.2.840.113654.2.3.2004.1.2424.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,719 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(82) >> 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.113654.2.3.2004.1.2424.1.101 - ?
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
10:28:38,722 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE->STORESCP(82) << A-RELEASE-RQ
10:28:38,724 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(82) >> A-RELEASE-RP
10:28:38,724 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-777) DCM4CHEE->STORESCP(82): close Socket[addr=localhost/127.0.0.1,port=11115,localport=52291]
10:28:38,728 INFO  [org.dcm4chee.arc.ups.impl.UPSServiceEJB] (EE-ManagedExecutorService-default-Thread-773) DCM4CHEE: Update UPS[pk=301101, uid=2.25.328539383328043845939389893915725237171, state=COMPLETED]
Clone this wiki locally