Create, Claim, Update and Complete UPS

Create new UPS

Query for already scheduled UPS

Query for already scheduled UPS with Workitem Code (110005,DCM,"interpretation") for Human Performer (axady,99Agfa,"Gunter Zeilinger):

$ dcmups find DCM4CHEE@localhost:11112 -state SCHEDULED -r00080018 -q00404018/00080100=110005 -q00404018/00080102=DCM -r00404018/00080104 -q00404034/00404009/00080100=axady -q00404034/00404009/00080102=99Agfa -r00404034/00404009/00080104
13:42:41,798 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=40829]
13:42:41,800 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
13:42:41,805 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
13:42:41,806 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.037 s
13:42:41,845 INFO   - Send C-FIND Request using 1.2.840.10008.5.1.4.34.4.3/Unified Procedure Step - Pull SOP Class:
(0008,0018) UI #0 [] SOP Instance UID
(0040,4018) SQ #-1 [1 item] Scheduled Workitem Code Sequence
>ITEM #1:
>(0008,0100) SH #6 [110005] Code Value
>(0008,0102) SH #4 [DCM] Coding Scheme Designator
>(0008,0104) LO #0 [] Code Meaning
(0040,4034) SQ #-1 [1 item] Scheduled Human Performers Sequence
>ITEM #1:
>(0040,4009) SQ #-1 [1 item] Human Performer Code Sequence
>>ITEM #1:
>>(0008,0100) SH #6 [axady] Code Value
>>(0008,0102) SH #6 [99Agfa] Coding Scheme Designator
>>(0008,0104) LO #0 [] Code Meaning
(0074,1000) CS #10 [SCHEDULED] Unified Procedure Step State

13:42:41,850 INFO   - DCM4CHEE(1) << 1:C-FIND-RQ[pcid=7, prior=0
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
13:42:41,863 INFO   - DCM4CHEE(1) >> 1:C-FIND-RSP[pcid=7, status=0H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class]
13:42:41,863 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
13:42:41,864 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
13:42:41,864 INFO   - Released connection to DCM4CHEE@localhost:11112
13:42:41,864 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=40829]

=> None one found.

Schedule new UPS from XML file

Schedule new UPS from XML file dcm4che-2.0.24/etc/dcmups/ncreate.xml:

$ dcmups create DCM4CHEE@localhost:11112 -f dcm4che-2.0.24/etc/dcmups/ncreate.xml13:43:01,828 INFO   - M-READ dcm4che-2.0.24/etc/dcmups/ncreate.xml
13:43:01,909 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=41682]
13:43:01,909 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
13:43:01,914 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
13:43:01,916 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.038 s
13:43:01,969 INFO   - Send N-CREATE Request using 1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class:
(0008,1080) LO #0 [] Admitting Diagnoses Description
(0008,1195) UI #0 [] Transaction UID
(0010,0010) PN #18 [Simpson^Homer^Jay] Patient's Name
(0010,0020) LO #4 [7431] Patient ID
(0010,0021) LO #10 [99DCM4CHE] Issuer of Patient ID
(0010,0022) CS #0 [] Type of Patient ID
(0010,0030) DA #8 [19551005] Patient's Birth Date
(0010,0040) CS #2 [M] Patient's Sex
(0010,1002) SQ #0 [] Other Patient IDs Sequence
(0020,000D) UI #8 [1.2.3.4] Study Instance UID
(0038,0010) LO #0 [] Admission ID
(0038,0014) SQ #0 [] Issuer of Admission ID Sequence
(0040,0400) LT #0 [] Comments on the Scheduled Procedure Step
(0040,4004) SQ #0 [] Scheduled Processing Applications Code Sequence
(0040,4005) DT #12 [201006101030] Scheduled Procedure Step Start DateTime
(0040,4018) SQ #-1 [1 item] Scheduled Workitem Code Sequence
>ITEM #1:
>(0008,0100) SH #6 [110005] Code Value
>(0008,0102) SH #4 [DCM] Coding Scheme Designator
>(0008,0104) LO #14 [Interpretation] Code Meaning
(0040,4020) CS #10 [INCOMPLETE] Input Availability Flag
(0040,4021) SQ #0 [] Input Information Sequence
(0040,4025) SQ #0 [] Scheduled Station Name Code Sequence
(0040,4026) SQ #0 [] Scheduled Station Class Code Sequence
(0040,4027) SQ #0 [] Scheduled Station Geographic Location Code Sequence
(0040,4034) SQ #-1 [1 item] Scheduled Human Performers Sequence
>ITEM #1:
>(0040,4009) SQ #-1 [1 item] Human Performer Code Sequence
>>ITEM #1:
>>(0008,0100) SH #6 [axady] Code Value
>>(0008,0102) SH #6 [99Agfa] Coding Scheme Designator
>>(0008,0104) LO #16 [Gunter Zeilinger] Code Meaning
>(0040,4036) LO #16 [Agfa Healthcare] Human Performer's Organization
>(0040,4037) PN #16 [Zeilinger^Gunter] Human Performer's Name
(0040,A370) SQ #-1 [1 item] Referenced Request Sequence
>ITEM #1:
>(0008,0050) SH #4 [5678] Accession Number
>(0020,000D) UI #8 [1.2.3.4] Study Instance UID
>(0032,1060) LO #0 [] Requested Procedure Description
>(0032,1064) SQ #0 [] Requested Procedure Code Sequence
>(0040,1001) SH #4 [1234] Requested Procedure ID
(0074,1000) CS #10 [SCHEDULED] Unified Procedure Step State
(0074,1002) SQ #0 [] Unified Procedure Step Progress Information Sequence
(0074,1200) CS #6 [MEDIUM] Scheduled Procedure Step Priority
(0074,1202) LO #22 [Sample Worklist Label] Worklist Label
(0074,1204) LO #28 [Sample Procedure Step Label] Procedure Step Label
(0074,1210) SQ #0 [] Scheduled Processing Parameters Sequence
(0074,1216) SQ #0 [] Unified Procedure Step Performed Procedure Sequence
(0074,1220) SQ #0 [] Related Procedure Step Sequence

13:43:01,974 INFO   - DCM4CHEE(1) << 1:N-CREATE-RQ[pcid=7
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=null
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
13:43:02,027 INFO   - DCM4CHEE(1) >> 1:N-CREATE-RSP[pcid=7, status=0H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
13:43:02,027 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
13:43:02,028 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
13:43:02,028 INFO   - Released connection to DCM4CHEE@localhost:11112
13:43:02,028 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=41682]
Query for scheduled UPS

Query for just scheduled UPS with Workitem Code (110005,DCM,"interpretation") for Human Performer (axady,99Agfa,"Gunter Zeilinger):

$ dcmups find DCM4CHEE@localhost:11112 -state SCHEDULED -r00080018 -q00404018/00080100=110005 -q00404018/00080102=DCM -r00404018/00080104 -q00404034/00404009/00080100=axady -q00404034/00404009/00080102=99Agfa -r00404034/00404009/00080104
13:43:28,040 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=49380]
13:43:28,041 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
13:43:28,048 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
13:43:28,049 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.039 s
13:43:28,087 INFO   - Send C-FIND Request using 1.2.840.10008.5.1.4.34.4.3/Unified Procedure Step - Pull SOP Class:
(0008,0018) UI #0 [] SOP Instance UID
(0040,4018) SQ #-1 [1 item] Scheduled Workitem Code Sequence
>ITEM #1:
>(0008,0100) SH #6 [110005] Code Value
>(0008,0102) SH #4 [DCM] Coding Scheme Designator
>(0008,0104) LO #0 [] Code Meaning
(0040,4034) SQ #-1 [1 item] Scheduled Human Performers Sequence
>ITEM #1:
>(0040,4009) SQ #-1 [1 item] Human Performer Code Sequence
>>ITEM #1:
>>(0008,0100) SH #6 [axady] Code Value
>>(0008,0102) SH #6 [99Agfa] Coding Scheme Designator
>>(0008,0104) LO #0 [] Code Meaning
(0074,1000) CS #10 [SCHEDULED] Unified Procedure Step State

13:43:28,093 INFO   - DCM4CHEE(1) << 1:C-FIND-RQ[pcid=7, prior=0
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
13:43:28,107 INFO   - DCM4CHEE(1) >> 1:C-FIND-RSP[pcid=7, status=ff00H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
13:43:28,108 INFO   - Data:
(0008,0018) UI #54 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774] SOP Instance UID
(0040,4018) SQ #-1 [1 item] Scheduled Workitem Code Sequence
>ITEM #1 @74:
>(0008,0100) SH #6 [110005] Code Value
>(0008,0102) SH #4 [DCM] Coding Scheme Designator
>(0008,0104) LO #14 [Interpretation] Code Meaning
(0040,4034) SQ #-1 [1 item] Scheduled Human Performers Sequence
>ITEM #1 @158:
>(0040,4009) SQ #-1 [1 item] Human Performer Code Sequence
>>ITEM #1 @178:
>>(0008,0100) SH #6 [axady] Code Value
>>(0008,0102) SH #6 [99Agfa] Coding Scheme Designator
>>(0008,0104) LO #16 [Gunter Zeilinger] Code Meaning
(0074,1000) CS #10 [SCHEDULED] Unified Procedure Step State

13:43:28,108 INFO   - DCM4CHEE(1) >> 1:C-FIND-RSP[pcid=7, status=0H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class]
13:43:28,108 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
13:43:28,109 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
13:43:28,109 INFO   - Released connection to DCM4CHEE@localhost:11112
13:43:28,109 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=49380]

=> Return one record for scheduled UPS with SOP Instance UID = 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774

Claim UPS

Change status to IN PROGRESS

Change status of new scheduled UPS to "IN PROGRESS" with new Transaction UID 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1:

$ dcmups chstate DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774 -state "IN PROGRESS" -tuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1
14:21:38,803 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=49308]
14:21:38,805 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
14:21:38,811 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
14:21:38,812 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.04 s
14:21:38,857 INFO   - Send N-ACTION Request using 1.2.840.10008.5.1.4.34.4.3/Unified Procedure Step - Pull SOP Class:
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1] Transaction UID
(0074,1000) CS #12 [IN PROGRESS] Unified Procedure Step State

14:21:38,862 INFO   - DCM4CHEE(1) << 1:N-ACTION-RQ[pcid=7, actionID=1
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
14:21:38,893 INFO   - DCM4CHEE(1) >> 1:N-ACTION-RSP[pcid=7, actionID=1, status=0H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
14:21:38,893 INFO   - Data:
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1] Transaction UID
(0074,1000) CS #12 [IN PROGRESS] Unified Procedure Step State

14:21:38,893 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
14:21:38,894 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
14:21:38,894 INFO   - Released connection to DCM4CHEE@localhost:11112
14:21:38,894 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=49308]

Successful!

Try to claim UPS again

Try to change status the UPS to "IN PROGRESS" with other new Transaction UID again:

$ dcmups chstate DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774 -state "IN PROGRESS" -tuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.2
14:25:30,245 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=50463]
14:25:30,246 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
14:25:30,253 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
14:25:30,254 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.041 s
14:25:30,301 INFO   - Send N-ACTION Request using 1.2.840.10008.5.1.4.34.4.3/Unified Procedure Step - Pull SOP Class:
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.2] Transaction UID
(0074,1000) CS #12 [IN PROGRESS] Unified Procedure Step State

14:25:30,306 INFO   - DCM4CHEE(1) << 1:N-ACTION-RQ[pcid=7, actionID=1
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
14:25:30,329 INFO   - DCM4CHEE(1) >> 1:N-ACTION-RSP[pcid=7, actionID=1, status=c302H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
14:25:30,329 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
14:25:30,329 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
14:25:30,329 INFO   - Released connection to DCM4CHEE@localhost:11112
14:25:30,330 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=50463]

Failed with error status C302H - Refused: The UPS is already IN PROGRESS

Retrieve claimed UPS
$ dcmups get DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
14:27:17,427 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=58122]
14:27:17,428 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
14:27:17,435 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
14:27:17,436 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.042 s
14:27:17,484 INFO   - DCM4CHEE(1) << 1:N-GET-RQ[pcid=7
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
14:27:17,510 INFO   - DCM4CHEE(1) >> 1:N-GET-RSP[pcid=7, status=0H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
14:27:17,531 INFO   - Data:
(0008,0016) UI #26 [1.2.840.10008.5.1.4.34.4.1] SOP Class UID
(0008,0018) UI #54 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774] SOP Instance UID
(0008,1080) LO #0 [] Admitting Diagnoses Description
(0008,1195) UI #0 [] Transaction UID
(0010,0010) PN #18 [Simpson^Homer^Jay] Patient's Name
(0010,0020) LO #4 [7431] Patient ID
(0010,0021) LO #10 [99DCM4CHE] Issuer of Patient ID
(0010,0030) DA #8 [19551005] Patient's Birth Date
(0010,0040) CS #2 [M] Patient's Sex
(0010,1002) SQ #0 [] Other Patient IDs Sequence
(0020,000D) UI #8 [1.2.3.4] Study Instance UID
(0038,0010) LO #0 [] Admission ID
(0038,0014) SQ #0 [] Issuer of Admission ID Sequence
(0040,0400) LT #0 [] Comments on the Scheduled Procedure Step
(0040,4004) SQ #0 [] Scheduled Processing Applications Code Sequence
(0040,4005) DT #12 [201006101030] Scheduled Procedure Step Start DateTime
(0040,4010) DT #18 [20100921134301.980] Scheduled Procedure Step Modification Date Time
(0040,4018) SQ #-1 [1 item] Scheduled Workitem Code Sequence
>ITEM #1 @344:
>(0008,0100) SH #6 [110005] Code Value
>(0008,0102) SH #4 [DCM] Coding Scheme Designator
>(0008,0104) LO #14 [Interpretation] Code Meaning
(0040,4020) CS #10 [INCOMPLETE] Input Availability Flag
(0040,4021) SQ #0 [] Input Information Sequence
(0040,4025) SQ #0 [] Scheduled Station Name Code Sequence
(0040,4026) SQ #0 [] Scheduled Station Class Code Sequence
(0040,4027) SQ #0 [] Scheduled Station Geographic Location Code Sequence
(0040,4034) SQ #-1 [1 item] Scheduled Human Performers Sequence
>ITEM #1 @526:
>(0040,4009) SQ #-1 [1 item] Human Performer Code Sequence
>>ITEM #1 @546:
>>(0008,0100) SH #6 [axady] Code Value
>>(0008,0102) SH #6 [99Agfa] Coding Scheme Designator
>>(0008,0104) LO #16 [Gunter Zeilinger] Code Meaning
>(0040,4036) LO #16 [Agfa Healthcare] Human Performer's Organization
>(0040,4037) PN #16 [Zeilinger^Gunter] Human Performer's Name
(0040,A370) SQ #-1 [1 item] Referenced Request Sequence
>ITEM #1 @698:
>(0008,0050) SH #4 [5678] Accession Number
>(0020,000D) UI #8 [1.2.3.4] Study Instance UID
>(0032,1060) LO #0 [] Requested Procedure Description
>(0032,1064) SQ #0 [] Requested Procedure Code Sequence
>(0040,1001) SH #4 [1234] Requested Procedure ID
(0074,1000) CS #12 [IN PROGRESS] Unified Procedure Step State
(0074,1002) SQ #0 [] Unified Procedure Step Progress Information Sequence
(0074,1200) CS #6 [MEDIUM] Scheduled Procedure Step Priority
(0074,1202) LO #22 [Sample Worklist Label] Worklist Label
(0074,1204) LO #28 [Sample Procedure Step Label] Procedure Step Label
(0074,1210) SQ #0 [] Scheduled Processing Parameters Sequence
(0074,1216) SQ #0 [] Unified Procedure Step Performed Procedure Sequence
(0074,1220) SQ #0 [] Related Procedure Step Sequence

14:27:17,531 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
14:27:17,532 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
14:27:17,532 INFO   - Released connection to DCM4CHEE@localhost:11112
14:27:17,532 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=58122]

Update UPS

Try to change status to COMPLETED
$ dcmups chstate DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774 -state "COMPLETED" -tuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1
14:39:11,728 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=33736]
14:39:11,729 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
14:39:11,734 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
14:39:11,736 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.039 s
14:39:11,786 INFO   - Send N-ACTION Request using 1.2.840.10008.5.1.4.34.4.3/Unified Procedure Step - Pull SOP Class:
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1] Transaction UID
(0074,1000) CS #10 [COMPLETED] Unified Procedure Step State

14:39:11,791 INFO   - DCM4CHEE(1) << 1:N-ACTION-RQ[pcid=7, actionID=1
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
14:39:11,811 INFO   - DCM4CHEE(1) >> 1:N-ACTION-RSP[pcid=7, actionID=1, status=c304H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
14:39:11,811 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
14:39:11,811 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
14:39:11,811 INFO   - Released connection to DCM4CHEE@localhost:11112
14:39:11,812 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=33736]

Failed with error status C304H - Refused: The UPS has not met final state requirements for the requested state change
In particular, Unified Procedure Step Performed Procedure Sequence (0074,1216) must not be empty in completed UPS.

Try to update UPS with wrong Transaction UID

Try to update UPS from XML file dcm4che-2.0.24/etc/dcmups/nset.xml with wrong Transaction UID:

$ dcmups set DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774 -tuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.2 -f dcm4che-2.0.24/etc/dcmups/nset.xml 
14:43:56,897 INFO   - M-READ dcm4che-2.0.24/etc/dcmups/nset.xml
14:43:56,975 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=59496]
14:43:56,975 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
14:43:56,981 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
14:43:56,983 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.038 s
14:43:57,031 INFO   - Send N-SET Request using 1.2.840.10008.5.1.4.34.4.3/Unified Procedure Step - Pull SOP Class:
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.2] Transaction UID
(0074,1216) SQ #-1 [1 item] Unified Procedure Step Performed Procedure Sequence
>ITEM #1:
>(0040,0244) DA #8 [20100615] Performed Procedure Step Start Date
>(0040,0245) TM #4 [1310] Performed Procedure Step Start Time
>(0040,0250) DA #8 [20100615] Performed Procedure Step End Date
>(0040,0251) TM #4 [1320] Performed Procedure Step End Time
>(0040,4007) SQ #-1 [1 item] Performed Processing Applications Code Sequence
>>ITEM #1:
>>(0008,0100) SH #12 [APP-REPORTER] Code Value
>>(0008,0102) SH #16 [99AgfaHealthcare] Coding Scheme Designator
>>(0008,0104) LO #22 [Reporting Application-] Code Meaning
>(0040,4019) SQ #-1 [1 item] Performed Workitem Code Sequence
>>ITEM #1:
>>(0008,0100) SH #6 [110005] Code Value
>>(0008,0102) SH #4 [DCM] Coding Scheme Designator
>>(0008,0104) LO #14 [Interpretation] Code Meaning
>(0040,4028) SQ #-1 [1 item] Performed Station Name Code Sequence
>>ITEM #1:
>>(0008,0100) SH #6 [WS-123] Code Value
>>(0008,0102) SH #22 [99AgfaHealthcareVienna] Coding Scheme Designator
>>(0008,0104) LO #16 [Workstation-123] Code Meaning
>(0040,4035) SQ #-1 [1 item] Actual Human Performers Sequence
>>ITEM #1:
>>(0040,4009) SQ #-1 [1 item] Human Performer Code Sequence
>>>ITEM #1:
>>>(0008,0100) SH #6 [axady] Code Value
>>>(0008,0102) SH #16 [99AgfaHealthcare] Coding Scheme Designator
>>>(0008,0104) LO #16 [Gunter Zeilinger] Code Meaning
>>(0040,4036) LO #16 [Agfa Healthcare] Human Performer's Organization
>>(0040,4037) PN #16 [Zeilinger^Gunter] Human Performer's Name

14:43:57,036 INFO   - DCM4CHEE(1) << 1:N-SET-RQ[pcid=7
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
14:43:57,062 INFO   - DCM4CHEE(1) >> 1:N-SET-RSP[pcid=7, status=c301H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
14:43:57,062 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
14:43:57,063 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
14:43:57,063 INFO   - Released connection to DCM4CHEE@localhost:11112
14:43:57,063 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=59496]

Failed with error status C301H - Refused: The correct Transaction UID was not provided.

Update UPS with correct Transaction UID

Update UPS from XML file dcm4che-2.0.24/etc/dcmups/nset.xml with correct Transaction UID:

$ dcmups set DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774 -tuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1 -f dcm4che-2.0.24/etc/dcmups/nset.xml 
14:49:57,331 INFO   - M-READ dcm4che-2.0.24/etc/dcmups/nset.xml
14:49:57,409 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=41480]
14:49:57,409 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
14:49:57,415 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
14:49:57,417 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.037 s
14:49:57,474 INFO   - Send N-SET Request using 1.2.840.10008.5.1.4.34.4.3/Unified Procedure Step - Pull SOP Class:
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1] Transaction UID
(0074,1216) SQ #-1 [1 item] Unified Procedure Step Performed Procedure Sequence
>ITEM #1:
>(0040,0244) DA #8 [20100615] Performed Procedure Step Start Date
>(0040,0245) TM #4 [1310] Performed Procedure Step Start Time
>(0040,0250) DA #8 [20100615] Performed Procedure Step End Date
>(0040,0251) TM #4 [1320] Performed Procedure Step End Time
>(0040,4007) SQ #-1 [1 item] Performed Processing Applications Code Sequence
>>ITEM #1:
>>(0008,0100) SH #12 [APP-REPORTER] Code Value
>>(0008,0102) SH #16 [99AgfaHealthcare] Coding Scheme Designator
>>(0008,0104) LO #22 [Reporting Application-] Code Meaning
>(0040,4019) SQ #-1 [1 item] Performed Workitem Code Sequence
>>ITEM #1:
>>(0008,0100) SH #6 [110005] Code Value
>>(0008,0102) SH #4 [DCM] Coding Scheme Designator
>>(0008,0104) LO #14 [Interpretation] Code Meaning
>(0040,4028) SQ #-1 [1 item] Performed Station Name Code Sequence
>>ITEM #1:
>>(0008,0100) SH #6 [WS-123] Code Value
>>(0008,0102) SH #22 [99AgfaHealthcareVienna] Coding Scheme Designator
>>(0008,0104) LO #16 [Workstation-123] Code Meaning
>(0040,4035) SQ #-1 [1 item] Actual Human Performers Sequence
>>ITEM #1:
>>(0040,4009) SQ #-1 [1 item] Human Performer Code Sequence
>>>ITEM #1:
>>>(0008,0100) SH #6 [axady] Code Value
>>>(0008,0102) SH #16 [99AgfaHealthcare] Coding Scheme Designator
>>>(0008,0104) LO #16 [Gunter Zeilinger] Code Meaning
>>(0040,4036) LO #16 [Agfa Healthcare] Human Performer's Organization
>>(0040,4037) PN #16 [Zeilinger^Gunter] Human Performer's Name

14:49:57,479 INFO   - DCM4CHEE(1) << 1:N-SET-RQ[pcid=7
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
14:49:57,536 INFO   - DCM4CHEE(1) >> 1:N-SET-RSP[pcid=7, status=0H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
14:49:57,536 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
14:49:57,536 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
14:49:57,537 INFO   - Released connection to DCM4CHEE@localhost:11112
14:49:57,537 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=41480]

Successful!

Retrieve updated UPS
$ dcmups get DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
14:51:36,646 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=52455]
14:51:36,647 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
14:51:36,653 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
14:51:36,654 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.039 s
14:51:36,702 INFO   - DCM4CHEE(1) << 1:N-GET-RQ[pcid=7
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
14:51:36,729 INFO   - DCM4CHEE(1) >> 1:N-GET-RSP[pcid=7, status=0H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
14:51:36,751 INFO   - Data:
(0008,0016) UI #26 [1.2.840.10008.5.1.4.34.4.1] SOP Class UID
(0008,0018) UI #54 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774] SOP Instance UID
(0008,1080) LO #0 [] Admitting Diagnoses Description
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1] Transaction UID
(0010,0010) PN #18 [Simpson^Homer^Jay] Patient's Name
(0010,0020) LO #4 [7431] Patient ID
(0010,0021) LO #10 [99DCM4CHE] Issuer of Patient ID
(0010,0030) DA #8 [19551005] Patient's Birth Date
(0010,0040) CS #2 [M] Patient's Sex
(0010,1002) SQ #0 [] Other Patient IDs Sequence
(0020,000D) UI #8 [1.2.3.4] Study Instance UID
(0038,0010) LO #0 [] Admission ID
(0038,0014) SQ #0 [] Issuer of Admission ID Sequence
(0040,0400) LT #0 [] Comments on the Scheduled Procedure Step
(0040,4004) SQ #0 [] Scheduled Processing Applications Code Sequence
(0040,4005) DT #12 [201006101030] Scheduled Procedure Step Start DateTime
(0040,4010) DT #18 [20100921144957.484] Scheduled Procedure Step Modification Date Time
(0040,4018) SQ #-1 [1 item] Scheduled Workitem Code Sequence
>ITEM #1 @400:
>(0008,0100) SH #6 [110005] Code Value
>(0008,0102) SH #4 [DCM] Coding Scheme Designator
>(0008,0104) LO #14 [Interpretation] Code Meaning
(0040,4020) CS #10 [INCOMPLETE] Input Availability Flag
(0040,4021) SQ #0 [] Input Information Sequence
(0040,4025) SQ #0 [] Scheduled Station Name Code Sequence
(0040,4026) SQ #0 [] Scheduled Station Class Code Sequence
(0040,4027) SQ #0 [] Scheduled Station Geographic Location Code Sequence
(0040,4034) SQ #-1 [1 item] Scheduled Human Performers Sequence
>ITEM #1 @582:
>(0040,4009) SQ #-1 [1 item] Human Performer Code Sequence
>>ITEM #1 @602:
>>(0008,0100) SH #6 [axady] Code Value
>>(0008,0102) SH #6 [99Agfa] Coding Scheme Designator
>>(0008,0104) LO #16 [Gunter Zeilinger] Code Meaning
>(0040,4036) LO #16 [Agfa Healthcare] Human Performer's Organization
>(0040,4037) PN #16 [Zeilinger^Gunter] Human Performer's Name
(0040,A370) SQ #-1 [1 item] Referenced Request Sequence
>ITEM #1 @754:
>(0008,0050) SH #4 [5678] Accession Number
>(0020,000D) UI #8 [1.2.3.4] Study Instance UID
>(0032,1060) LO #0 [] Requested Procedure Description
>(0032,1064) SQ #0 [] Requested Procedure Code Sequence
>(0040,1001) SH #4 [1234] Requested Procedure ID
(0074,1000) CS #12 [IN PROGRESS] Unified Procedure Step State
(0074,1002) SQ #0 [] Unified Procedure Step Progress Information Sequence
(0074,1200) CS #6 [MEDIUM] Scheduled Procedure Step Priority
(0074,1202) LO #22 [Sample Worklist Label] Worklist Label
(0074,1204) LO #28 [Sample Procedure Step Label] Procedure Step Label
(0074,1210) SQ #0 [] Scheduled Processing Parameters Sequence
(0074,1216) SQ #-1 [1 item] Unified Procedure Step Performed Procedure Sequence
>ITEM #1 @998:
>(0040,0244) DA #8 [20100615] Performed Procedure Step Start Date
>(0040,0245) TM #4 [1310] Performed Procedure Step Start Time
>(0040,0250) DA #8 [20100615] Performed Procedure Step End Date
>(0040,0251) TM #4 [1320] Performed Procedure Step End Time
>(0040,4007) SQ #-1 [1 item] Performed Processing Applications Code Sequence
>>ITEM #1 @1074:
>>(0008,0100) SH #12 [APP-REPORTER] Code Value
>>(0008,0102) SH #16 [99AgfaHealthcare] Coding Scheme Designator
>>(0008,0104) LO #22 [Reporting Application-] Code Meaning
>(0040,4019) SQ #-1 [1 item] Performed Workitem Code Sequence
>>ITEM #1 @1184:
>>(0008,0100) SH #6 [110005] Code Value
>>(0008,0102) SH #4 [DCM] Coding Scheme Designator
>>(0008,0104) LO #14 [Interpretation] Code Meaning
>(0040,4028) SQ #-1 [1 item] Performed Station Name Code Sequence
>>ITEM #1 @1268:
>>(0008,0100) SH #6 [WS-123] Code Value
>>(0008,0102) SH #22 [99AgfaHealthcareVienna] Coding Scheme Designator
>>(0008,0104) LO #16 [Workstation-123] Code Meaning
>(0040,4035) SQ #-1 [1 item] Actual Human Performers Sequence
>>ITEM #1 @1372:
>>(0040,4009) SQ #-1 [1 item] Human Performer Code Sequence
>>>ITEM #1 @1392:
>>>(0008,0100) SH #6 [axady] Code Value
>>>(0008,0102) SH #16 [99AgfaHealthcare] Coding Scheme Designator
>>>(0008,0104) LO #16 [Gunter Zeilinger] Code Meaning
>>(0040,4036) LO #16 [Agfa Healthcare] Human Performer's Organization
>>(0040,4037) PN #16 [Zeilinger^Gunter] Human Performer's Name
(0074,1220) SQ #0 [] Related Procedure Step Sequence

14:51:36,752 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
14:51:36,752 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
14:51:36,752 INFO   - Released connection to DCM4CHEE@localhost:11112
14:51:36,752 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=52455]

Failed with error status C301H - Refused: The correct Transaction UID was not provided.

Complete UPS

Try to change status to COMPLETED with wrong Transaction UID
$ dcmups chstate DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774 -state "COMPLETED" -tuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.2
14:53:29,112 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=57564]
14:53:29,113 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
14:53:29,119 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
14:53:29,121 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.042 s
14:53:29,165 INFO   - Send N-ACTION Request using 1.2.840.10008.5.1.4.34.4.3/Unified Procedure Step - Pull SOP Class:
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.2] Transaction UID
(0074,1000) CS #10 [COMPLETED] Unified Procedure Step State

14:53:29,171 INFO   - DCM4CHEE(1) << 1:N-ACTION-RQ[pcid=7, actionID=1
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
14:53:29,192 INFO   - DCM4CHEE(1) >> 1:N-ACTION-RSP[pcid=7, actionID=1, status=c301H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
14:53:29,192 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
14:53:29,192 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
14:53:29,192 INFO   - Released connection to DCM4CHEE@localhost:11112
14:53:29,193 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=57564]
Change status to COMPLETED with correct Transaction UID
$ dcmups chstate DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774 -state "COMPLETED" -tuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1
15:09:19,217 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=46717]
15:09:19,219 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
15:09:19,226 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
15:09:19,227 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.041 s
15:09:19,274 INFO   - Send N-ACTION Request using 1.2.840.10008.5.1.4.34.4.3/Unified Procedure Step - Pull SOP Class:
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1] Transaction UID
(0074,1000) CS #10 [COMPLETED] Unified Procedure Step State

15:09:19,279 INFO   - DCM4CHEE(1) << 1:N-ACTION-RQ[pcid=7, actionID=1
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
15:09:19,334 INFO   - DCM4CHEE(1) >> 1:N-ACTION-RSP[pcid=7, actionID=1, status=0H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
	ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
15:09:19,335 INFO   - Data:
(0008,1195) UI #56 [1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774.1] Transaction UID
(0074,1000) CS #10 [COMPLETED] Unified Procedure Step State

15:09:19,335 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
15:09:19,335 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
15:09:19,335 INFO   - Released connection to DCM4CHEE@localhost:11112
15:09:19,336 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=46717]

Successful!

Try to retrieve completed UPS
$ dcmups get DCM4CHEE@localhost:11112 -iuid 1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774
15:10:19,008 INFO   - Association(1) initiated Socket[addr=localhost/127.0.0.1,port=11112,localport=40014]
15:10:19,010 INFO   - DCM4CHEE(1): A-ASSOCIATE-RQ DCM4CHEE << DCMUPSSCU
15:10:19,017 INFO   - DCM4CHEE(1): A-ASSOCIATE-AC DCMUPSSCU >> DCM4CHEE
15:10:19,018 INFO   - Connected to DCM4CHEE@localhost:11112 in 0.041 s
15:10:19,068 INFO   - DCM4CHEE(1) << 1:N-GET-RQ[pcid=7
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
15:10:19,086 INFO   - DCM4CHEE(1) >> 1:N-GET-RSP[pcid=7, status=c307H
	cuid=1.2.840.10008.5.1.4.34.4.1/Unified Procedure Step - Push SOP Class
	iuid=1.2.40.0.13.1.1.10.231.162.70.20100921082909711.32774]
15:10:19,086 INFO   - DCM4CHEE(1) << A-RELEASE-RQ
15:10:19,086 INFO   - DCM4CHEE(1) >> A-RELEASE-RP
15:10:19,087 INFO   - Released connection to DCM4CHEE@localhost:11112
15:10:19,087 INFO   - DCM4CHEE(1): close Socket[addr=localhost/127.0.0.1,port=11112,localport=40014]

Failed with error status C307H - Specified SOP Instance UID does not exist or is not a UPS Instance managed by this SCP.

Because, UPSs with final state COMPLETED or CANCELED may be deleted by the UPS SCP, if no deletion lock on that UPS is hold by any subscribed UPS Watcher SCU.