changeset 696:619806b3eeaf

SOPClassesInStudy test
author Alain Mazy <am@orthanc.team>
date Fri, 20 Sep 2024 18:19:32 +0200
parents c1d140a5490c
children b2c3ba1adf55
files Tests/Tests.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Fri Sep 20 17:34:07 2024 +0200
+++ b/Tests/Tests.py	Fri Sep 20 18:19:32 2024 +0200
@@ -9611,6 +9611,8 @@
     def test_list_resources_requested_tags_study_computed_tags(self):
 
         if IsOrthancVersionAbove(_REMOTE, 1, 11, 0):
+            UploadInstance(_REMOTE, 'Comunix/Pet/IM-0001-0001.dcm')  # make sure there are 2 different SOPClassUID in the DB
+
             instance = UploadInstance(_REMOTE, 'DummyCT.dcm') ['ID']
             patient = DoGet(_REMOTE, '/instances/%s/patient' % instance) ['ID']
             study = DoGet(_REMOTE, '/instances/%s/study' % instance) ['ID']
@@ -9625,6 +9627,9 @@
             self.assertEqual('1', a[0]['RequestedTags']['NumberOfStudyRelatedInstances'])
             self.assertEqual('1', a[0]['RequestedTags']['NumberOfStudyRelatedSeries'])
 
+            a = DoGet(_REMOTE, '/studies/%s?expand&simplify&requestedTags=ModalitiesInStudy;NumberOfStudyRelatedInstances;NumberOfStudyRelatedSeries;SOPClassesInStudy' % study)            
+            self.assertEqual('1.2.840.10008.5.1.4.1.1.4', a['RequestedTags']['SOPClassesInStudy'])
+
 
     def test_list_resources_requested_tags_series_computed_tags(self):