# HG changeset patch # User Alain Mazy # Date 1656494613 -7200 # Node ID 18f2d55182fdd3591a34d7a808ecbade00fa406a # Parent 6144ef431512bc1c7efd105b69c2f586674781eb more dicom-web tests diff -r 6144ef431512 -r 18f2d55182fd Plugins/DicomWeb/Run.py --- a/Plugins/DicomWeb/Run.py Tue Jun 28 18:38:21 2022 +0200 +++ b/Plugins/DicomWeb/Run.py Wed Jun 29 11:23:33 2022 +0200 @@ -1008,6 +1008,16 @@ self.assertEqual(series, a[0]['0020000E']['Value'][0]) self.assertEqual('MR', a[0]['00080060']['Value'][0]) + # if we ask explicitely for the Patient and Study tags, we must get it + a = DoGet(ORTHANC, '/dicom-web/series?0020000D=%s&includefield=00100010&includefield=00080020' % study) + self.assertEqual(1, len(a)) + self.assertTrue('00100010' in a[0]) # PatientName + self.assertTrue('00080020' in a[0]) # StudyDate + + # if {StudyInstanceUID} *is not* specified, we must get the PatientName + a = DoGet(ORTHANC, '/dicom-web/series') + self.assertTrue('00100010' in a[0]) # PatientName + # http://dicom.nema.org/medical/dicom/2019a/output/html/part18.html#table_6.7.1-2b a = DoGet(ORTHANC, '/dicom-web/instances?0020000D=%s' % study) self.assertEqual(1, len(a)) @@ -1030,6 +1040,18 @@ self.assertEqual(study, a[0]['0020000D']['Value'][0]) self.assertEqual(series, a[0]['0020000E']['Value'][0]) + # if we ask explicitely for the Patient and Study tags, we must get it + a = DoGet(ORTHANC, '/dicom-web/instances?0020000D=%s&includefield=00100010&includefield=00080020' % study) + self.assertEqual(1, len(a)) + self.assertTrue('00100010' in a[0]) # PatientName + self.assertTrue('00080020' in a[0]) # StudyDate + + # if {StudyInstanceUID} *is not* specified, we must get all Study, Series and Patient tags + a = DoGet(ORTHANC, '/dicom-web/instances') + self.assertTrue('00100010' in a[0]) # PatientName + self.assertTrue('00080020' in a[0]) # StudyDate + self.assertTrue('00080060' in a[0]) # Modality + #@unittest.skip("Skip this test on GDCM 2.8.4") def test_bitbucket_issue_164(self):