# HG changeset patch # User Sebastien Jodogne # Date 1593449022 -7200 # Node ID a2060a76ed6aa3becf5c12c7b46bb3259ac7cfca # Parent ce7709cb380e3e179e1cff811407aed6c43e4ce3 note in ArchiveStudiesInTimeRange.py diff -r ce7709cb380e -r a2060a76ed6a Resources/Samples/Python/ArchiveStudiesInTimeRange.py --- 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: