Skip to content

Commit

Permalink
Include Query/Retrieve Level in C-FIND Response (#176)
Browse files Browse the repository at this point in the history
* Fix C-FIND response to include the Query/Retrieve Level

* Corrected findscu expected xml files
  • Loading branch information
ncolossi authored Jan 9, 2025
1 parent 32a9640 commit 3cd4125
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ public void run() {
throw new CancellationException();
}
Attributes attrs = AttributesUtil.jsonToAttributes(obj);
String queryRetrieveLevel = keys.getString(Tag.QueryRetrieveLevel);
if (queryRetrieveLevel != null) {
attrs.setString(Tag.QueryRetrieveLevel, VR.CS, queryRetrieveLevel);
}
as.writeDimseRSP(pc, Commands.mkCFindRSP(cmd, Status.Pending), attrs);
}
as.writeDimseRSP(pc, Commands.mkCFindRSP(cmd, Status.Success));
Expand Down
2 changes: 1 addition & 1 deletion integration_test/data/findscu-instance-expected.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><NativeDicomModel xml:space="preserve"><DicomAttribute keyword="SOPClassUID" tag="00080016" vr="UI"><Value number="1">1.2.840.10008.5.1.4.1.1.7</Value></DicomAttribute><DicomAttribute keyword="SOPInstanceUID" tag="00080018" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="StudyDate" tag="00080020" vr="DA"/><DicomAttribute keyword="StudyTime" tag="00080030" vr="TM"/><DicomAttribute keyword="AccessionNumber" tag="00080050" vr="SH"/><DicomAttribute keyword="Modality" tag="00080060" vr="CS"><Value number="1">XC</Value></DicomAttribute><DicomAttribute keyword="ReferringPhysicianName" tag="00080090" vr="PN"/><DicomAttribute keyword="PatientName" tag="00100010" vr="PN"/><DicomAttribute keyword="PatientID" tag="00100020" vr="LO"/><DicomAttribute keyword="PatientBirthDate" tag="00100030" vr="DA"/><DicomAttribute keyword="PatientSex" tag="00100040" vr="CS"/><DicomAttribute keyword="StudyInstanceUID" tag="0020000D" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="SeriesInstanceUID" tag="0020000E" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="StudyID" tag="00200010" vr="SH"/><DicomAttribute keyword="InstanceNumber" tag="00200013" vr="IS"><Value number="1">1</Value></DicomAttribute><DicomAttribute keyword="Rows" tag="00280010" vr="US"><Value number="1">500</Value></DicomAttribute><DicomAttribute keyword="Columns" tag="00280011" vr="US"><Value number="1">500</Value></DicomAttribute><DicomAttribute keyword="BitsAllocated" tag="00280100" vr="US"><Value number="1">8</Value></DicomAttribute></NativeDicomModel>
<?xml version="1.0" encoding="UTF-8"?><NativeDicomModel xml:space="preserve"><DicomAttribute keyword="SOPClassUID" tag="00080016" vr="UI"><Value number="1">1.2.840.10008.5.1.4.1.1.7</Value></DicomAttribute><DicomAttribute keyword="SOPInstanceUID" tag="00080018" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="StudyDate" tag="00080020" vr="DA"/><DicomAttribute keyword="StudyTime" tag="00080030" vr="TM"/><DicomAttribute keyword="AccessionNumber" tag="00080050" vr="SH"/><DicomAttribute keyword="QueryRetrieveLevel" tag="00080052" vr="CS"><Value number="1">IMAGE</Value></DicomAttribute><DicomAttribute keyword="Modality" tag="00080060" vr="CS"><Value number="1">XC</Value></DicomAttribute><DicomAttribute keyword="ReferringPhysicianName" tag="00080090" vr="PN"/><DicomAttribute keyword="PatientName" tag="00100010" vr="PN"/><DicomAttribute keyword="PatientID" tag="00100020" vr="LO"/><DicomAttribute keyword="PatientBirthDate" tag="00100030" vr="DA"/><DicomAttribute keyword="PatientSex" tag="00100040" vr="CS"/><DicomAttribute keyword="StudyInstanceUID" tag="0020000D" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="SeriesInstanceUID" tag="0020000E" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="StudyID" tag="00200010" vr="SH"/><DicomAttribute keyword="InstanceNumber" tag="00200013" vr="IS"><Value number="1">1</Value></DicomAttribute><DicomAttribute keyword="Rows" tag="00280010" vr="US"><Value number="1">500</Value></DicomAttribute><DicomAttribute keyword="Columns" tag="00280011" vr="US"><Value number="1">500</Value></DicomAttribute><DicomAttribute keyword="BitsAllocated" tag="00280100" vr="US"><Value number="1">8</Value></DicomAttribute></NativeDicomModel>
2 changes: 1 addition & 1 deletion integration_test/data/findscu-series-expected.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><NativeDicomModel xml:space="preserve"><DicomAttribute keyword="StudyDate" tag="00080020" vr="DA"/><DicomAttribute keyword="StudyTime" tag="00080030" vr="TM"/><DicomAttribute keyword="AccessionNumber" tag="00080050" vr="SH"/><DicomAttribute keyword="Modality" tag="00080060" vr="CS"><Value number="1">XC</Value></DicomAttribute><DicomAttribute keyword="ReferringPhysicianName" tag="00080090" vr="PN"/><DicomAttribute keyword="PatientName" tag="00100010" vr="PN"/><DicomAttribute keyword="PatientID" tag="00100020" vr="LO"/><DicomAttribute keyword="PatientBirthDate" tag="00100030" vr="DA"/><DicomAttribute keyword="PatientSex" tag="00100040" vr="CS"/><DicomAttribute keyword="StudyInstanceUID" tag="0020000D" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="SeriesInstanceUID" tag="0020000E" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="StudyID" tag="00200010" vr="SH"/></NativeDicomModel>
<?xml version="1.0" encoding="UTF-8"?><NativeDicomModel xml:space="preserve"><DicomAttribute keyword="StudyDate" tag="00080020" vr="DA"/><DicomAttribute keyword="StudyTime" tag="00080030" vr="TM"/><DicomAttribute keyword="AccessionNumber" tag="00080050" vr="SH"/><DicomAttribute keyword="QueryRetrieveLevel" tag="00080052" vr="CS"><Value number="1">SERIES</Value></DicomAttribute><DicomAttribute keyword="Modality" tag="00080060" vr="CS"><Value number="1">XC</Value></DicomAttribute><DicomAttribute keyword="ReferringPhysicianName" tag="00080090" vr="PN"/><DicomAttribute keyword="PatientName" tag="00100010" vr="PN"/><DicomAttribute keyword="PatientID" tag="00100020" vr="LO"/><DicomAttribute keyword="PatientBirthDate" tag="00100030" vr="DA"/><DicomAttribute keyword="PatientSex" tag="00100040" vr="CS"/><DicomAttribute keyword="StudyInstanceUID" tag="0020000D" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="SeriesInstanceUID" tag="0020000E" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="StudyID" tag="00200010" vr="SH"/></NativeDicomModel>
2 changes: 1 addition & 1 deletion integration_test/data/findscu-study-expected.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><NativeDicomModel xml:space="preserve"><DicomAttribute keyword="StudyDate" tag="00080020" vr="DA"/><DicomAttribute keyword="StudyTime" tag="00080030" vr="TM"/><DicomAttribute keyword="AccessionNumber" tag="00080050" vr="SH"/><DicomAttribute keyword="ReferringPhysicianName" tag="00080090" vr="PN"/><DicomAttribute keyword="PatientName" tag="00100010" vr="PN"/><DicomAttribute keyword="PatientID" tag="00100020" vr="LO"/><DicomAttribute keyword="PatientBirthDate" tag="00100030" vr="DA"/><DicomAttribute keyword="PatientSex" tag="00100040" vr="CS"/><DicomAttribute keyword="StudyInstanceUID" tag="0020000D" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="StudyID" tag="00200010" vr="SH"/></NativeDicomModel>
<?xml version="1.0" encoding="UTF-8"?><NativeDicomModel xml:space="preserve"><DicomAttribute keyword="StudyDate" tag="00080020" vr="DA"/><DicomAttribute keyword="StudyTime" tag="00080030" vr="TM"/><DicomAttribute keyword="AccessionNumber" tag="00080050" vr="SH"/><DicomAttribute keyword="QueryRetrieveLevel" tag="00080052" vr="CS"><Value number="1">STUDY</Value></DicomAttribute><DicomAttribute keyword="ReferringPhysicianName" tag="00080090" vr="PN"/><DicomAttribute keyword="PatientName" tag="00100010" vr="PN"/><DicomAttribute keyword="PatientID" tag="00100020" vr="LO"/><DicomAttribute keyword="PatientBirthDate" tag="00100030" vr="DA"/><DicomAttribute keyword="PatientSex" tag="00100040" vr="CS"/><DicomAttribute keyword="StudyInstanceUID" tag="0020000D" vr="UI"><Value number="1">2.25.140302709094137852884202099990798014056</Value></DicomAttribute><DicomAttribute keyword="StudyID" tag="00200010" vr="SH"/></NativeDicomModel>

0 comments on commit 3cd4125

Please sign in to comment.