Mercurial > hg > orthanc
comparison OrthancServer/Resources/Samples/ImportDicomFiles/OrthancImport.py @ 4450:9bf2f9e0af47
support empty PatientID in OrthancImport.py
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 14 Jan 2021 09:13:29 +0100 |
parents | d9473bd5ed43 |
children | 4336642b8cff |
comparison
equal
deleted
inserted
replaced
4449:6a6017027162 | 4450:9bf2f9e0af47 |
---|---|
105 | 105 |
106 print('') | 106 print('') |
107 print('New imported study:') | 107 print('New imported study:') |
108 print(' Orthanc ID of the patient: %s' % info['ParentPatient']) | 108 print(' Orthanc ID of the patient: %s' % info['ParentPatient']) |
109 print(' Orthanc ID of the study: %s' % info['ParentStudy']) | 109 print(' Orthanc ID of the study: %s' % info['ParentStudy']) |
110 print(' DICOM Patient ID: %s' % tags['0010,0020']) | 110 print(' DICOM Patient ID: %s' % ( |
111 print(' DICOM Study Instance UID: %s' % tags['0020,000d']) | 111 tags['0010,0020'] if '0010,0020' in tags else '(empty)')) |
112 print(' DICOM Study Instance UID: %s' % ( | |
113 tags['0020,000d'] if '0020,000d' in tags else '(empty)')) | |
112 print('') | 114 print('') |
113 | 115 |
114 | 116 |
115 def UploadFile(path): | 117 def UploadFile(path): |
116 with open(path, 'rb') as f: | 118 with open(path, 'rb') as f: |