changeset 471:1a4eb582cf03

skip tests for next version
author Alain Mazy <am@osimis.io>
date Tue, 26 Apr 2022 16:33:57 +0200
parents 1f6c9debddf6
children d9ceb0fd5995
files Tests/Tests.py
diffstat 1 files changed, 197 insertions(+), 190 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Mon Apr 25 17:21:48 2022 +0200
+++ b/Tests/Tests.py	Tue Apr 26 16:33:57 2022 +0200
@@ -206,6 +206,14 @@
         self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalDiskSize'])
         self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalUncompressedSize'])
 
+        if IsOrthancVersionAbove(_REMOTE, 1, 11, 0):
+            system = DoGet(_REMOTE, '/system')
+            self.assertIn("MainDicomTags", system)
+            self.assertIn("Patient", system["MainDicomTags"])
+            self.assertIn("Studies", system["MainDicomTags"])
+            self.assertIn("Series", system["MainDicomTags"])
+            self.assertIn("Instance", system["MainDicomTags"])
+
         systemInfo = DoGet(_REMOTE, '/system')
         if systemInfo["Version"] == "mainline":
             print("Skipping version checks since you're currently in mainline")
@@ -217,13 +225,6 @@
         self.assertFalse(IsOrthancVersionAbove(_LOCAL, 0, 9, 6))
         self.assertFalse(IsOrthancVersionAbove(_LOCAL, 1, 8, 6))
 
-        system = DoGet(_REMOTE, '/system')
-        self.assertIn("MainDicomTags", system)
-        self.assertIn("Patient", system["MainDicomTags"])
-        self.assertIn("Studies", system["MainDicomTags"])
-        self.assertIn("Series", system["MainDicomTags"])
-        self.assertIn("Instance", system["MainDicomTags"])
-
 
     def test_upload(self):
         self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalDiskSize'])
@@ -8486,203 +8487,209 @@
 
 
     def test_rest_find_requested_tags(self):
-        # Upload instances
-        for i in range(2):
-            UploadInstance(_REMOTE, 'Brainix/Flair/IM-0001-000%d.dcm' % (i + 1))
-
-        # Patient level
-        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Patient',
-                                             'CaseSensitive' : False,
-                                             'Query' : { 'PatientName' : 'BRAINIX' },
-                                             'RequestedTags' : [ 'PatientName', 'PatientID', 'PatientSex', 'PatientBirthDate' ],
-                                             'Expand': True
-                                             })
-        self.assertEqual(1, len(a))
-        self.assertIn('PatientName', a[0]['RequestedTags'])
-        self.assertIn('PatientID', a[0]['RequestedTags'])
-        self.assertIn('PatientSex', a[0]['RequestedTags'])
-        self.assertIn('PatientBirthDate', a[0]['RequestedTags'])
-
-        self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('5Yp0E', a[0]['RequestedTags']['PatientID'])
-        self.assertEqual('0000', a[0]['RequestedTags']['PatientSex'])
-        self.assertEqual('19490301', a[0]['RequestedTags']['PatientBirthDate'])
-
-        # Study level, request patient tags too
-        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Study',
-                                             'CaseSensitive' : False,
-                                             'Query' : { 'PatientName' : 'BRAINIX' },
-                                             'RequestedTags' : [ 'PatientName', 'StudyInstanceUID'],
-                                             'Expand': True
-                                             })
-        self.assertEqual(1, len(a))
-        self.assertIn('PatientName', a[0]['RequestedTags'])
-        self.assertIn('StudyInstanceUID', a[0]['RequestedTags'])
-
-        self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
-
-
-        # Series level, request patient and study tags too
-        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Series',
-                                             'CaseSensitive' : False,
-                                             'Query' : { 'PatientName' : 'BRAINIX' },
-                                             'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'SeriesInstanceUID'],
-                                             'Expand': True
-                                             })
-        self.assertEqual(1, len(a))
-        self.assertIn('PatientName', a[0]['RequestedTags'])
-        self.assertIn('StudyInstanceUID', a[0]['RequestedTags'])
-        self.assertIn('SeriesInstanceUID', a[0]['RequestedTags'])
-
-        self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
-        self.assertEqual('1.3.46.670589.11.0.0.11.4.2.0.8743.5.5396.2006120114285654497', a[0]['RequestedTags']['SeriesInstanceUID'])
-
-
-        # Instance level, request patient, study and series tags too, include tags that are not part of the main dicom tags
-        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Series',
-                                             'CaseSensitive' : False,
-                                             'Query' : { 'PatientName' : 'BRAINIX' },
-                                             'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'SeriesInstanceUID', 'SOPInstanceUID', 'PhotometricInterpretation'],
-                                             'Expand': True
-                                             })
-        self.assertEqual(1, len(a))
-        self.assertIn('PatientName', a[0]['RequestedTags'])
-        self.assertIn('StudyInstanceUID', a[0]['RequestedTags'])
-        self.assertIn('SeriesInstanceUID', a[0]['RequestedTags'])
-        self.assertIn('PhotometricInterpretation', a[0]['RequestedTags'])
-
-        self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
-        self.assertEqual('1.3.46.670589.11.0.0.11.4.2.0.8743.5.5396.2006120114285654497', a[0]['RequestedTags']['SeriesInstanceUID'])
-        self.assertEqual('MONOCHROME2', a[0]['RequestedTags']['PhotometricInterpretation'])
+        if IsOrthancVersionAbove(_REMOTE, 1, 11, 0):
+
+            # Upload instances
+            for i in range(2):
+                UploadInstance(_REMOTE, 'Brainix/Flair/IM-0001-000%d.dcm' % (i + 1))
+
+            # Patient level
+            a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Patient',
+                                                'CaseSensitive' : False,
+                                                'Query' : { 'PatientName' : 'BRAINIX' },
+                                                'RequestedTags' : [ 'PatientName', 'PatientID', 'PatientSex', 'PatientBirthDate' ],
+                                                'Expand': True
+                                                })
+            self.assertEqual(1, len(a))
+            self.assertIn('PatientName', a[0]['RequestedTags'])
+            self.assertIn('PatientID', a[0]['RequestedTags'])
+            self.assertIn('PatientSex', a[0]['RequestedTags'])
+            self.assertIn('PatientBirthDate', a[0]['RequestedTags'])
+
+            self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('5Yp0E', a[0]['RequestedTags']['PatientID'])
+            self.assertEqual('0000', a[0]['RequestedTags']['PatientSex'])
+            self.assertEqual('19490301', a[0]['RequestedTags']['PatientBirthDate'])
+
+            # Study level, request patient tags too
+            a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Study',
+                                                'CaseSensitive' : False,
+                                                'Query' : { 'PatientName' : 'BRAINIX' },
+                                                'RequestedTags' : [ 'PatientName', 'StudyInstanceUID'],
+                                                'Expand': True
+                                                })
+            self.assertEqual(1, len(a))
+            self.assertIn('PatientName', a[0]['RequestedTags'])
+            self.assertIn('StudyInstanceUID', a[0]['RequestedTags'])
+
+            self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
+
+
+            # Series level, request patient and study tags too
+            a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Series',
+                                                'CaseSensitive' : False,
+                                                'Query' : { 'PatientName' : 'BRAINIX' },
+                                                'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'SeriesInstanceUID'],
+                                                'Expand': True
+                                                })
+            self.assertEqual(1, len(a))
+            self.assertIn('PatientName', a[0]['RequestedTags'])
+            self.assertIn('StudyInstanceUID', a[0]['RequestedTags'])
+            self.assertIn('SeriesInstanceUID', a[0]['RequestedTags'])
+
+            self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
+            self.assertEqual('1.3.46.670589.11.0.0.11.4.2.0.8743.5.5396.2006120114285654497', a[0]['RequestedTags']['SeriesInstanceUID'])
+
+
+            # Instance level, request patient, study and series tags too, include tags that are not part of the main dicom tags
+            a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Series',
+                                                'CaseSensitive' : False,
+                                                'Query' : { 'PatientName' : 'BRAINIX' },
+                                                'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'SeriesInstanceUID', 'SOPInstanceUID', 'PhotometricInterpretation'],
+                                                'Expand': True
+                                                })
+            self.assertEqual(1, len(a))
+            self.assertIn('PatientName', a[0]['RequestedTags'])
+            self.assertIn('StudyInstanceUID', a[0]['RequestedTags'])
+            self.assertIn('SeriesInstanceUID', a[0]['RequestedTags'])
+            self.assertIn('PhotometricInterpretation', a[0]['RequestedTags'])
+
+            self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
+            self.assertEqual('1.3.46.670589.11.0.0.11.4.2.0.8743.5.5396.2006120114285654497', a[0]['RequestedTags']['SeriesInstanceUID'])
+            self.assertEqual('MONOCHROME2', a[0]['RequestedTags']['PhotometricInterpretation'])
 
 
     def test_rest_find_requested_tags_computed_tags(self):
-        # Upload instances
-        for i in range(2):
-            UploadInstance(_REMOTE, 'Brainix/Flair/IM-0001-000%d.dcm' % (i + 1))
-
-
-        # Patient level
-        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Patient',
-                                             'CaseSensitive' : False,
-                                             'Query' : { 'PatientName' : 'BRAINIX' },
-                                             'RequestedTags' : [ 'PatientName', 'NumberOfPatientRelatedStudies', 'NumberOfPatientRelatedSeries', 'NumberOfPatientRelatedInstances'],
-                                             'Expand': True
-                                             })
-        self.assertEqual(1, len(a))
-
-        self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('1', a[0]['RequestedTags']['NumberOfPatientRelatedStudies'])
-        self.assertEqual('1', a[0]['RequestedTags']['NumberOfPatientRelatedSeries'])
-        self.assertEqual('2', a[0]['RequestedTags']['NumberOfPatientRelatedInstances'])
-
-        # Study level
-        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Study',
-                                             'CaseSensitive' : False,
-                                             'Query' : { 'PatientName' : 'BRAINIX' },
-                                             'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'ModalitiesInStudy', 'SOPClassesInStudy', 'NumberOfStudyRelatedInstances', 'NumberOfStudyRelatedSeries'],
-                                             'Expand': True
-                                             })
-        self.assertEqual(1, len(a))
-
-        self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
-        self.assertEqual('MR', a[0]['RequestedTags']['ModalitiesInStudy'])
-        self.assertEqual('1.2.840.10008.5.1.4.1.1.4', a[0]['RequestedTags']['SOPClassesInStudy'])
-        self.assertEqual('2', a[0]['RequestedTags']['NumberOfStudyRelatedInstances'])
-        self.assertEqual('1', a[0]['RequestedTags']['NumberOfStudyRelatedSeries'])
-
-        # Series level
-        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Series',
-                                             'CaseSensitive' : False,
-                                             'Query' : { 'PatientName' : 'BRAINIX' },
-                                             'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'NumberOfSeriesRelatedInstances'],
-                                             'Expand': True
-                                             })
-        self.assertEqual(1, len(a))
-
-        self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
-        self.assertEqual('2', a[0]['RequestedTags']['NumberOfSeriesRelatedInstances'])
-
-        # Instance level
-        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Instance',
-                                             'CaseSensitive' : False,
-                                             'Query' : { 'PatientName' : 'BRAINIX' },
-                                             'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'SOPInstanceUID', 'InstanceAvailability'],
-                                             'Expand': True
-                                             })
-        self.assertEqual(2, len(a))
-
-        self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
-        self.assertEqual('ONLINE', a[0]['RequestedTags']['InstanceAvailability'])
+        if IsOrthancVersionAbove(_REMOTE, 1, 11, 0):
+            # Upload instances
+            for i in range(2):
+                UploadInstance(_REMOTE, 'Brainix/Flair/IM-0001-000%d.dcm' % (i + 1))
+
+
+            # Patient level
+            a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Patient',
+                                                'CaseSensitive' : False,
+                                                'Query' : { 'PatientName' : 'BRAINIX' },
+                                                'RequestedTags' : [ 'PatientName', 'NumberOfPatientRelatedStudies', 'NumberOfPatientRelatedSeries', 'NumberOfPatientRelatedInstances'],
+                                                'Expand': True
+                                                })
+            self.assertEqual(1, len(a))
+
+            self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('1', a[0]['RequestedTags']['NumberOfPatientRelatedStudies'])
+            self.assertEqual('1', a[0]['RequestedTags']['NumberOfPatientRelatedSeries'])
+            self.assertEqual('2', a[0]['RequestedTags']['NumberOfPatientRelatedInstances'])
+
+            # Study level
+            a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Study',
+                                                'CaseSensitive' : False,
+                                                'Query' : { 'PatientName' : 'BRAINIX' },
+                                                'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'ModalitiesInStudy', 'SOPClassesInStudy', 'NumberOfStudyRelatedInstances', 'NumberOfStudyRelatedSeries'],
+                                                'Expand': True
+                                                })
+            self.assertEqual(1, len(a))
+
+            self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
+            self.assertEqual('MR', a[0]['RequestedTags']['ModalitiesInStudy'])
+            self.assertEqual('1.2.840.10008.5.1.4.1.1.4', a[0]['RequestedTags']['SOPClassesInStudy'])
+            self.assertEqual('2', a[0]['RequestedTags']['NumberOfStudyRelatedInstances'])
+            self.assertEqual('1', a[0]['RequestedTags']['NumberOfStudyRelatedSeries'])
+
+            # Series level
+            a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Series',
+                                                'CaseSensitive' : False,
+                                                'Query' : { 'PatientName' : 'BRAINIX' },
+                                                'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'NumberOfSeriesRelatedInstances'],
+                                                'Expand': True
+                                                })
+            self.assertEqual(1, len(a))
+
+            self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
+            self.assertEqual('2', a[0]['RequestedTags']['NumberOfSeriesRelatedInstances'])
+
+            # Instance level
+            a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Instance',
+                                                'CaseSensitive' : False,
+                                                'Query' : { 'PatientName' : 'BRAINIX' },
+                                                'RequestedTags' : [ 'PatientName', 'StudyInstanceUID', 'SOPInstanceUID', 'InstanceAvailability'],
+                                                'Expand': True
+                                                })
+            self.assertEqual(2, len(a))
+
+            self.assertEqual('BRAINIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('2.16.840.1.113669.632.20.1211.10000357775', a[0]['RequestedTags']['StudyInstanceUID'])
+            self.assertEqual('ONLINE', a[0]['RequestedTags']['InstanceAvailability'])
 
     def test_list_resources_requested_tags(self):
 
-        instance = UploadInstance(_REMOTE, 'DummyCT.dcm') ['ID']
-        patient = DoGet(_REMOTE, '/instances/%s/patient' % instance) ['ID']
-        study = DoGet(_REMOTE, '/instances/%s/study' % instance) ['ID']
-
-        # list series and request tags that are not in the default main dicom tags
-        a = DoGet(_REMOTE, '/studies/%s/series?expand&simplify&requestedTags=PatientName;Modality;SeriesInstanceUID;MRAcquisitionType' % study)
-
-        self.assertEqual('2D', a[0]['RequestedTags']['MRAcquisitionType'])
-        self.assertEqual('MR', a[0]['RequestedTags']['Modality'])
-        self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.394', a[0]['RequestedTags']['SeriesInstanceUID'])
-
-        # list studies and request patient and studies tags
-        a = DoGet(_REMOTE, '/patients/%s/studies?expand&simplify&requestedTags=PatientName;StudyInstanceUID' % patient)
-
-        self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.390', a[0]['RequestedTags']['StudyInstanceUID'])
-        self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
-
-
-        # list instances and request patient, studies and series tags including tags that are not in main dicom tags
-        a = DoGet(_REMOTE, '/patients/%s/instances?expand&simplify&requestedTags=PatientName;StudyInstanceUID;SeriesInstanceUID;SOPInstanceUID;Rows;Columns;InstanceAvailability' % patient)
-
-        self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.390', a[0]['RequestedTags']['StudyInstanceUID'])
-        self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.394', a[0]['RequestedTags']['SeriesInstanceUID'])
-        self.assertEqual('1.2.840.113619.2.176.2025.1499492.7040.1171286242.109', a[0]['RequestedTags']['SOPInstanceUID'])
-        self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('512', a[0]['RequestedTags']['Rows'])
-        self.assertEqual('512', a[0]['RequestedTags']['Columns'])
-        self.assertEqual('ONLINE', a[0]['RequestedTags']['InstanceAvailability'])
+        if IsOrthancVersionAbove(_REMOTE, 1, 11, 0):
+            instance = UploadInstance(_REMOTE, 'DummyCT.dcm') ['ID']
+            patient = DoGet(_REMOTE, '/instances/%s/patient' % instance) ['ID']
+            study = DoGet(_REMOTE, '/instances/%s/study' % instance) ['ID']
+
+            # list series and request tags that are not in the default main dicom tags
+            a = DoGet(_REMOTE, '/studies/%s/series?expand&simplify&requestedTags=PatientName;Modality;SeriesInstanceUID;MRAcquisitionType' % study)
+
+            self.assertEqual('2D', a[0]['RequestedTags']['MRAcquisitionType'])
+            self.assertEqual('MR', a[0]['RequestedTags']['Modality'])
+            self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.394', a[0]['RequestedTags']['SeriesInstanceUID'])
+
+            # list studies and request patient and studies tags
+            a = DoGet(_REMOTE, '/patients/%s/studies?expand&simplify&requestedTags=PatientName;StudyInstanceUID' % patient)
+
+            self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.390', a[0]['RequestedTags']['StudyInstanceUID'])
+            self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
+
+
+            # list instances and request patient, studies and series tags including tags that are not in main dicom tags
+            a = DoGet(_REMOTE, '/patients/%s/instances?expand&simplify&requestedTags=PatientName;StudyInstanceUID;SeriesInstanceUID;SOPInstanceUID;Rows;Columns;InstanceAvailability' % patient)
+
+            self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.390', a[0]['RequestedTags']['StudyInstanceUID'])
+            self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.394', a[0]['RequestedTags']['SeriesInstanceUID'])
+            self.assertEqual('1.2.840.113619.2.176.2025.1499492.7040.1171286242.109', a[0]['RequestedTags']['SOPInstanceUID'])
+            self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('512', a[0]['RequestedTags']['Rows'])
+            self.assertEqual('512', a[0]['RequestedTags']['Columns'])
+            self.assertEqual('ONLINE', a[0]['RequestedTags']['InstanceAvailability'])
 
 
     def test_list_resources_requested_tags_study_computed_tags(self):
 
-        instance = UploadInstance(_REMOTE, 'DummyCT.dcm') ['ID']
-        patient = DoGet(_REMOTE, '/instances/%s/patient' % instance) ['ID']
-        study = DoGet(_REMOTE, '/instances/%s/study' % instance) ['ID']
-
-        # list studies and request patient and studies tags, including ModalitiesInStudy
-        a = DoGet(_REMOTE, '/patients/%s/studies?expand&simplify&requestedTags=PatientName;StudyInstanceUID;ModalitiesInStudy;SOPClassesInStudy;NumberOfStudyRelatedInstances;NumberOfStudyRelatedSeries' % patient)
-
-        self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.390', a[0]['RequestedTags']['StudyInstanceUID'])
-        self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('MR', a[0]['RequestedTags']['ModalitiesInStudy'])
-        self.assertEqual('1.2.840.10008.5.1.4.1.1.4', a[0]['RequestedTags']['SOPClassesInStudy'])
-        self.assertEqual('1', a[0]['RequestedTags']['NumberOfStudyRelatedInstances'])
-        self.assertEqual('1', a[0]['RequestedTags']['NumberOfStudyRelatedSeries'])
+        if IsOrthancVersionAbove(_REMOTE, 1, 11, 0):
+            instance = UploadInstance(_REMOTE, 'DummyCT.dcm') ['ID']
+            patient = DoGet(_REMOTE, '/instances/%s/patient' % instance) ['ID']
+            study = DoGet(_REMOTE, '/instances/%s/study' % instance) ['ID']
+
+            # list studies and request patient and studies tags, including ModalitiesInStudy
+            a = DoGet(_REMOTE, '/patients/%s/studies?expand&simplify&requestedTags=PatientName;StudyInstanceUID;ModalitiesInStudy;SOPClassesInStudy;NumberOfStudyRelatedInstances;NumberOfStudyRelatedSeries' % patient)
+
+            self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.390', a[0]['RequestedTags']['StudyInstanceUID'])
+            self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('MR', a[0]['RequestedTags']['ModalitiesInStudy'])
+            self.assertEqual('1.2.840.10008.5.1.4.1.1.4', a[0]['RequestedTags']['SOPClassesInStudy'])
+            self.assertEqual('1', a[0]['RequestedTags']['NumberOfStudyRelatedInstances'])
+            self.assertEqual('1', a[0]['RequestedTags']['NumberOfStudyRelatedSeries'])
 
 
     def test_list_resources_requested_tags_series_computed_tags(self):
 
-        instance = UploadInstance(_REMOTE, 'DummyCT.dcm') ['ID']
-        patient = DoGet(_REMOTE, '/instances/%s/patient' % instance) ['ID']
-        study = DoGet(_REMOTE, '/instances/%s/study' % instance) ['ID']
-
-        # list studies and request patient and studies tags, including ModalitiesInStudy
-        a = DoGet(_REMOTE, '/studies/%s/series?expand&simplify&requestedTags=PatientName;SeriesInstanceUID;NumberOfSeriesRelatedInstances' % study)
-
-        self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.394', a[0]['RequestedTags']['SeriesInstanceUID'])
-        self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
-        self.assertEqual('1', a[0]['RequestedTags']['NumberOfSeriesRelatedInstances'])
+        if IsOrthancVersionAbove(_REMOTE, 1, 11, 0):
+            instance = UploadInstance(_REMOTE, 'DummyCT.dcm') ['ID']
+            patient = DoGet(_REMOTE, '/instances/%s/patient' % instance) ['ID']
+            study = DoGet(_REMOTE, '/instances/%s/study' % instance) ['ID']
+
+            # list studies and request patient and studies tags, including ModalitiesInStudy
+            a = DoGet(_REMOTE, '/studies/%s/series?expand&simplify&requestedTags=PatientName;SeriesInstanceUID;NumberOfSeriesRelatedInstances' % study)
+
+            self.assertEqual('1.2.840.113619.2.176.2025.1499492.7391.1171285944.394', a[0]['RequestedTags']['SeriesInstanceUID'])
+            self.assertEqual('KNIX', a[0]['RequestedTags']['PatientName'])
+            self.assertEqual('1', a[0]['RequestedTags']['NumberOfSeriesRelatedInstances'])
 
     def test_dicomweb_jpeg2k_implicit(self):
         # This is a file encoded using 1.2.840.10008.1.2.4.90 transfer