diff Resources/Samples/Python/ArchiveStudiesInTimeRange.py @ 4089:a2060a76ed6a

note in ArchiveStudiesInTimeRange.py
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 29 Jun 2020 18:43:42 +0200
parents 94f4a18a79cc
children
line wrap: on
line diff
--- a/Resources/Samples/Python/ArchiveStudiesInTimeRange.py	Sat Jun 27 10:48:49 2020 +0200
+++ b/Resources/Samples/Python/ArchiveStudiesInTimeRange.py	Mon Jun 29 18:43:42 2020 +0200
@@ -62,8 +62,16 @@
     study = RestToolbox.DoGet('%s/studies/%s' % (URL, studyId))['MainDicomTags']
 
     # Retrieve the DICOM tags of the parent patient of this study
+
+    # Case 1: Baseline version
     patient = RestToolbox.DoGet('%s/studies/%s/patient' % (URL, studyId))['MainDicomTags']
 
+    # Case 2: Tweaked version that can be used if several patients
+    # share the same "Patient ID", but have different "Patient Name"
+    # (which is invalid according to the DICOM standard).
+    # https://groups.google.com/d/msg/orthanc-users/58AxIkxFbZs/N6Knub8MAgAJ
+    # patient = RestToolbox.DoGet('%s/studies/%s' % (URL, studyId)) ['PatientMainDicomTags']
+
     # Check that the StudyDate tag lies within the given range
     studyDate = study['StudyDate'][:8]
     if studyDate >= START and studyDate <= END: