comparison Resources/Graveyard/SetupAnonymization2011.cpp @ 2506:51b91ead6c38

Preservation of UID relationships while anonymizing
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 26 Mar 2018 17:09:42 +0200
parents
children
comparison
equal deleted inserted replaced
2505:a4f885670da7 2506:51b91ead6c38
1 /**
2 * This is a manual implementation by Alain Mazy. Only kept for reference.
3 * https://bitbucket.org/sjodogne/orthanc/commits/c6defdc4c611fca2ab528ba2c6937a742e0329a8?at=issue-46-anonymization
4 **/
5
6 void DicomModification::SetupAnonymization2011()
7 {
8 // This is Table E.1-1 from PS 3.15-2011 - DICOM Part 15: Security and System Management Profiles
9 // https://raw.githubusercontent.com/jodogne/dicom-specification/master/2011/11_15pu.pdf
10
11 removals_.insert(DicomTag(0x0000, 0x1000)); // Affected SOP Instance UID
12 removals_.insert(DicomTag(0x0000, 0x1001)); // Requested SOP Instance UID
13 removals_.insert(DicomTag(0x0002, 0x0003)); // Media Storage SOP Instance UID => TODO: replace with a non-zero length UID that is internally consistent within a set of Instances
14 removals_.insert(DicomTag(0x0004, 0x1511)); // Referenced SOP Instance UID in File
15 removals_.insert(DicomTag(0x0008, 0x0010)); // Irradiation Event UID
16 removals_.insert(DicomTag(0x0008, 0x0014)); // Instance Creator UID
17 //removals_.insert(DicomTag(0x0008, 0x0018)); // SOP Instance UID => set in Apply()
18 clearings_.insert(DicomTag(0x0008, 0x0020)); // Study Date
19 clearings_.insert(DicomTag(0x0008, 0x0021)); // Series Date
20 clearings_.insert(DicomTag(0x0008, 0x0030)); // Study Time
21 clearings_.insert(DicomTag(0x0008, 0x0031)); // Series Time
22 removals_.insert(DicomTag(0x0008, 0x0022)); // Acquisition Date
23 removals_.insert(DicomTag(0x0008, 0x0023)); // Content Date
24 removals_.insert(DicomTag(0x0008, 0x0024)); // Overlay Date
25 removals_.insert(DicomTag(0x0008, 0x0025)); // Curve Date
26 removals_.insert(DicomTag(0x0008, 0x002a)); // Acquisition DateTime
27 removals_.insert(DicomTag(0x0008, 0x0032)); // Acquisition Time
28 removals_.insert(DicomTag(0x0008, 0x0033)); // Content Time
29 removals_.insert(DicomTag(0x0008, 0x0034)); // Overlay Time
30 removals_.insert(DicomTag(0x0008, 0x0035)); // Curve Time
31 removals_.insert(DicomTag(0x0008, 0x0050)); // Accession Number
32 removals_.insert(DicomTag(0x0008, 0x0058)); // Failed SOP Instance UID List
33 removals_.insert(DicomTag(0x0008, 0x0080)); // Institution Name
34 removals_.insert(DicomTag(0x0008, 0x0081)); // Institution Address
35 removals_.insert(DicomTag(0x0008, 0x0082)); // Institution Code Sequence
36 removals_.insert(DicomTag(0x0008, 0x0090)); // Referring Physician's Name
37 removals_.insert(DicomTag(0x0008, 0x0092)); // Referring Physician's Address
38 removals_.insert(DicomTag(0x0008, 0x0094)); // Referring Physician's Telephone Numbers
39 removals_.insert(DicomTag(0x0008, 0x0096)); // Referring Physician's Identification Sequence
40 removals_.insert(DicomTag(0x0008, 0x010d)); // Context Group Extension Creator UID
41 removals_.insert(DicomTag(0x0008, 0x0201)); // Timezone Offset From UTC
42 removals_.insert(DicomTag(0x0008, 0x0300)); // Current Patient Location
43 removals_.insert(DicomTag(0x0008, 0x1010)); // Station Name
44 removals_.insert(DicomTag(0x0008, 0x1030)); // Study Description
45 removals_.insert(DicomTag(0x0008, 0x103e)); // Series Description
46 removals_.insert(DicomTag(0x0008, 0x1040)); // Institutional Department Name
47 removals_.insert(DicomTag(0x0008, 0x1048)); // Physician(s) of Record
48 removals_.insert(DicomTag(0x0008, 0x1049)); // Physician(s) of Record Identification Sequence
49 removals_.insert(DicomTag(0x0008, 0x1050)); // Performing Physicians' Name
50 removals_.insert(DicomTag(0x0008, 0x1052)); // Performing Physicians Identification Sequence
51 removals_.insert(DicomTag(0x0008, 0x1060)); // Name of Physician(s) Reading Study
52 removals_.insert(DicomTag(0x0008, 0x1062)); // Physician Reading Study Identification Sequence
53 removals_.insert(DicomTag(0x0008, 0x1070)); // Operators' Name
54 removals_.insert(DicomTag(0x0008, 0x1072)); // Operators' Identification Sequence
55 removals_.insert(DicomTag(0x0008, 0x1080)); // Admitting Diagnoses Description
56 removals_.insert(DicomTag(0x0008, 0x1084)); // Admitting Diagnoses Code Sequence
57 removals_.insert(DicomTag(0x0008, 0x1110)); // Referenced Study Sequence
58 removals_.insert(DicomTag(0x0008, 0x1111)); // Referenced Performed Procedure Step Sequence
59 removals_.insert(DicomTag(0x0008, 0x1120)); // Referenced Patient Sequence
60 removals_.insert(DicomTag(0x0008, 0x1140)); // Referenced Image Sequence
61 removals_.insert(DicomTag(0x0008, 0x1155)); // Referenced SOP Instance UID
62 removals_.insert(DicomTag(0x0008, 0x1195)); // Transaction UID
63 removals_.insert(DicomTag(0x0008, 0x2111)); // Derivation Description
64 removals_.insert(DicomTag(0x0008, 0x2112)); // Source Image Sequence
65 removals_.insert(DicomTag(0x0008, 0x4000)); // Identifying Comments
66 removals_.insert(DicomTag(0x0008, 0x9123)); // Creator Version UID
67 //removals_.insert(DicomTag(0x0010, 0x0010)); // Patient's Name => cf. below (*)
68 //removals_.insert(DicomTag(0x0010, 0x0020)); // Patient ID => cf. below (*)
69 removals_.insert(DicomTag(0x0010, 0x0030)); // Patient's Birth Date
70 removals_.insert(DicomTag(0x0010, 0x0032)); // Patient's Birth Time
71 clearings_.insert(DicomTag(0x0010, 0x0040)); // Patient's Sex
72 removals_.insert(DicomTag(0x0010, 0x0050)); // Patient's Insurance Plan Code Sequence
73 removals_.insert(DicomTag(0x0010, 0x0101)); // Patient's Primary Language Code Sequence
74 removals_.insert(DicomTag(0x0010, 0x0102)); // Patient's Primary Language Modifier Code Sequence
75 removals_.insert(DicomTag(0x0010, 0x1000)); // Other Patient Ids
76 removals_.insert(DicomTag(0x0010, 0x1001)); // Other Patient Names
77 removals_.insert(DicomTag(0x0010, 0x1002)); // Other Patient IDs Sequence
78 removals_.insert(DicomTag(0x0010, 0x1005)); // Patient's Birth Name
79 removals_.insert(DicomTag(0x0010, 0x1010)); // Patient's Age
80 removals_.insert(DicomTag(0x0010, 0x1020)); // Patient's Size
81 removals_.insert(DicomTag(0x0010, 0x1030)); // Patient's Weight
82 removals_.insert(DicomTag(0x0010, 0x1040)); // Patient's Address
83 removals_.insert(DicomTag(0x0010, 0x1050)); // Insurance Plan Identification
84 removals_.insert(DicomTag(0x0010, 0x1060)); // Patient's Mother's Birth Name
85 removals_.insert(DicomTag(0x0010, 0x1080)); // Military Rank
86 removals_.insert(DicomTag(0x0010, 0x1081)); // Branch of Service
87 removals_.insert(DicomTag(0x0010, 0x1090)); // Medical Record Locator
88 removals_.insert(DicomTag(0x0010, 0x2000)); // Medical Alerts
89 removals_.insert(DicomTag(0x0010, 0x2110)); // Allergies
90 removals_.insert(DicomTag(0x0010, 0x2150)); // Country of Residence
91 removals_.insert(DicomTag(0x0010, 0x2152)); // Region of Residence
92 removals_.insert(DicomTag(0x0010, 0x2154)); // PatientTelephoneNumbers
93 removals_.insert(DicomTag(0x0010, 0x2160)); // Ethnic Group
94 removals_.insert(DicomTag(0x0010, 0x2180)); // Occupation
95 removals_.insert(DicomTag(0x0010, 0x21a0)); // Smoking Status
96 removals_.insert(DicomTag(0x0010, 0x21b0)); // Additional Patient's History
97 removals_.insert(DicomTag(0x0010, 0x21c0)); // Pregnancy Status
98 removals_.insert(DicomTag(0x0010, 0x21d0)); // Last Menstrual Date
99 removals_.insert(DicomTag(0x0010, 0x21f0)); // Patient's Religious Preference
100 removals_.insert(DicomTag(0x0010, 0x2203)); // Patient's Sex Neutered
101 removals_.insert(DicomTag(0x0010, 0x2297)); // Responsible Person
102 removals_.insert(DicomTag(0x0010, 0x2299)); // Responsible Organization
103 removals_.insert(DicomTag(0x0010, 0x4000)); // Patient Comments
104 removals_.insert(DicomTag(0x0018, 0x0010)); // Contrast Bolus Agent
105 removals_.insert(DicomTag(0x0018, 0x1000)); // Device Serial Number
106 removals_.insert(DicomTag(0x0018, 0x1002)); // Device UID
107 removals_.insert(DicomTag(0x0018, 0x1004)); // Plate ID
108 removals_.insert(DicomTag(0x0018, 0x1005)); // Generator ID
109 removals_.insert(DicomTag(0x0018, 0x1007)); // Cassette ID
110 removals_.insert(DicomTag(0x0018, 0x1008)); // Gantry ID
111 removals_.insert(DicomTag(0x0018, 0x1030)); // Protocol Name
112 removals_.insert(DicomTag(0x0018, 0x1400)); // Acquisition Device Processing Description
113 removals_.insert(DicomTag(0x0018, 0x4000)); // Acquisition Comments
114 removals_.insert(DicomTag(0x0018, 0x700a)); // Detector ID
115 removals_.insert(DicomTag(0x0018, 0xa003)); // Contribution Description
116 removals_.insert(DicomTag(0x0018, 0x9424)); // Acquisition Protocol Description
117 //removals_.insert(DicomTag(0x0020, 0x000d)); // Study Instance UID => set in Apply()
118 //removals_.insert(DicomTag(0x0020, 0x000e)); // Series Instance UID => set in Apply()
119 removals_.insert(DicomTag(0x0020, 0x0010)); // Study ID
120 removals_.insert(DicomTag(0x0020, 0x0052)); // Frame of Reference UID
121 removals_.insert(DicomTag(0x0020, 0x0200)); // Synchronization Frame of Reference UID
122 removals_.insert(DicomTag(0x0020, 0x3401)); // Modifying Device ID
123 removals_.insert(DicomTag(0x0020, 0x3404)); // Modifying Device Manufacturer
124 removals_.insert(DicomTag(0x0020, 0x3406)); // Modified Image Description
125 removals_.insert(DicomTag(0x0020, 0x4000)); // Image Comments
126 removals_.insert(DicomTag(0x0020, 0x9158)); // Frame Comments
127 removals_.insert(DicomTag(0x0020, 0x9161)); // Concatenation UID
128 removals_.insert(DicomTag(0x0020, 0x9164)); // Dimension Organization UID
129 //removals_.insert(DicomTag(0x0028, 0x1199)); // Palette Color Lookup Table UID => TODO: replace with a non-zero length UID that is internally consistent within a set of Instances
130 //removals_.insert(DicomTag(0x0028, 0x1214)); // Large Palette Color Lookup Table UID => TODO: replace with a non-zero length UID that is internally consistent within a set of Instances
131 removals_.insert(DicomTag(0x0028, 0x4000)); // Image Presentation Comments
132 removals_.insert(DicomTag(0x0032, 0x0012)); // Study ID Issuer
133 removals_.insert(DicomTag(0x0032, 0x1020)); // Scheduled Study Location
134 removals_.insert(DicomTag(0x0032, 0x1021)); // Scheduled Study Location AE Title
135 removals_.insert(DicomTag(0x0032, 0x1030)); // Reason for Study
136 removals_.insert(DicomTag(0x0032, 0x1032)); // Requesting Physician
137 removals_.insert(DicomTag(0x0032, 0x1033)); // Requesting Service
138 removals_.insert(DicomTag(0x0032, 0x1060)); // Requesting Procedure Description
139 removals_.insert(DicomTag(0x0032, 0x1070)); // Requested Contrast Agent
140 removals_.insert(DicomTag(0x0032, 0x4000)); // Study Comments
141 removals_.insert(DicomTag(0x0038, 0x0010)); // Admission ID
142 removals_.insert(DicomTag(0x0038, 0x0011)); // Issuer of Admission ID
143 removals_.insert(DicomTag(0x0038, 0x001e)); // Scheduled Patient Institution Residence
144 removals_.insert(DicomTag(0x0038, 0x0020)); // Admitting Date
145 removals_.insert(DicomTag(0x0038, 0x0021)); // Admitting Time
146 removals_.insert(DicomTag(0x0038, 0x0040)); // Discharge Diagnosis Description
147 removals_.insert(DicomTag(0x0038, 0x0050)); // Special Needs
148 removals_.insert(DicomTag(0x0038, 0x0060)); // Service Episode ID
149 removals_.insert(DicomTag(0x0038, 0x0061)); // Issuer of Service Episode ID
150 removals_.insert(DicomTag(0x0038, 0x0062)); // Service Episode Description
151 removals_.insert(DicomTag(0x0038, 0x0400)); // Patient's Institution Residence
152 removals_.insert(DicomTag(0x0038, 0x0500)); // Patient State
153 removals_.insert(DicomTag(0x0038, 0x4000)); // Visit Comments
154 removals_.insert(DicomTag(0x0038, 0x1234)); // Referenced Patient Alias Sequence
155 removals_.insert(DicomTag(0x0040, 0x0001)); // Scheduled Station AE Title
156 removals_.insert(DicomTag(0x0040, 0x0002)); // Scheduled Procedure Step Start Date
157 removals_.insert(DicomTag(0x0040, 0x0003)); // Scheduled Procedure Step Start Time
158 removals_.insert(DicomTag(0x0040, 0x0004)); // Scheduled Procedure Step End Date
159 removals_.insert(DicomTag(0x0040, 0x0005)); // Scheduled Procedure Step End Time
160 removals_.insert(DicomTag(0x0040, 0x0006)); // Scheduled Performing Physician Name
161 removals_.insert(DicomTag(0x0040, 0x0007)); // Scheduled Procedure Step Description
162 removals_.insert(DicomTag(0x0040, 0x000b)); // Scheduled Performing Physician Identification Sequence
163 removals_.insert(DicomTag(0x0040, 0x0010)); // Scheduled Station Name
164 removals_.insert(DicomTag(0x0040, 0x0011)); // Scheduled Procedure Step Location
165 removals_.insert(DicomTag(0x0040, 0x0012)); // Pre-Medication
166 removals_.insert(DicomTag(0x0040, 0x0241)); // Performed Station AE Title
167 removals_.insert(DicomTag(0x0040, 0x0242)); // Performed Station Name
168 removals_.insert(DicomTag(0x0040, 0x0243)); // Performed Location
169 removals_.insert(DicomTag(0x0040, 0x0244)); // Performed Procedure Step Start Date
170 removals_.insert(DicomTag(0x0040, 0x0245)); // Performed Procedure Step Start Time
171 removals_.insert(DicomTag(0x0040, 0x0248)); // Performed Station Name Code Sequence
172 removals_.insert(DicomTag(0x0040, 0x0253)); // Performed Procedure Step ID
173 removals_.insert(DicomTag(0x0040, 0x0254)); // Performed Procedure Step Description
174 removals_.insert(DicomTag(0x0040, 0x0275)); // Request Attributes Sequence
175 removals_.insert(DicomTag(0x0040, 0x0280)); // Comments on Performed Procedure Step
176 removals_.insert(DicomTag(0x0040, 0x0555)); // Acquisition Context Sequence
177 removals_.insert(DicomTag(0x0040, 0x1001)); // Requested Procedure ID
178 removals_.insert(DicomTag(0x0040, 0x1010)); // Names of Intended Recipient of Results
179 removals_.insert(DicomTag(0x0040, 0x1011)); // Intended Recipient of Results Identification Sequence
180 removals_.insert(DicomTag(0x0040, 0x1004)); // Patient Transport Arrangements
181 removals_.insert(DicomTag(0x0040, 0x1005)); // Requested Procedure Location
182 removals_.insert(DicomTag(0x0040, 0x1101)); // Person Identification Code Sequence
183 removals_.insert(DicomTag(0x0040, 0x1102)); // Person Address
184 removals_.insert(DicomTag(0x0040, 0x1103)); // Person Telephone Numbers
185 removals_.insert(DicomTag(0x0040, 0x1400)); // Requested Procedure Comments
186 removals_.insert(DicomTag(0x0040, 0x2001)); // Reason for Imaging Service Request
187 removals_.insert(DicomTag(0x0040, 0x2008)); // Order Entered By
188 removals_.insert(DicomTag(0x0040, 0x2009)); // Order Enterer Location
189 removals_.insert(DicomTag(0x0040, 0x2010)); // Order Callback Phone Number
190 removals_.insert(DicomTag(0x0040, 0x2016)); // Placer Order Number of Imaging Service Request
191 removals_.insert(DicomTag(0x0040, 0x2017)); // Filler Order Number of Imaging Service Request
192 removals_.insert(DicomTag(0x0040, 0x2400)); // Imaging Service Request Comments
193 removals_.insert(DicomTag(0x0040, 0x4023)); // Referenced General Purpose Scheduled Procedure Step Transaction UID
194 removals_.insert(DicomTag(0x0040, 0x4025)); // Scheduled Station Name Code Sequence
195 removals_.insert(DicomTag(0x0040, 0x4027)); // Scheduled Station Geographic Location Code Sequence
196 removals_.insert(DicomTag(0x0040, 0x4030)); // Performed Station Geographic Location Code Sequence
197 removals_.insert(DicomTag(0x0040, 0x4034)); // Scheduled Human Performers Sequence
198 removals_.insert(DicomTag(0x0040, 0x4035)); // Actual Human Performers Sequence
199 removals_.insert(DicomTag(0x0040, 0x4036)); // Human Performers Organization
200 removals_.insert(DicomTag(0x0040, 0x4037)); // Human Performers Name
201 removals_.insert(DicomTag(0x0040, 0xa027)); // Verifying Organization
202 removals_.insert(DicomTag(0x0040, 0xa073)); // Verifying Observer Sequence
203 removals_.insert(DicomTag(0x0040, 0xa075)); // Verifying Observer Name
204 removals_.insert(DicomTag(0x0040, 0xa078)); // Author Observer Sequence
205 removals_.insert(DicomTag(0x0040, 0xa07a)); // Participant Sequence
206 removals_.insert(DicomTag(0x0040, 0xa07c)); // Custodial Organization Sequence
207 removals_.insert(DicomTag(0x0040, 0xa088)); // Verifying Observer Identification Code Sequence
208 removals_.insert(DicomTag(0x0040, 0xa123)); // Person Name
209 removals_.insert(DicomTag(0x0040, 0xa124)); // UID
210 removals_.insert(DicomTag(0x0040, 0xa730)); // Content Sequence
211 removals_.insert(DicomTag(0x0040, 0x3001)); // Confidentiality Constraint on Patient Data Description
212 removals_.insert(DicomTag(0x0040, 0xdb0c)); // Template Extension Organization UID
213 removals_.insert(DicomTag(0x0040, 0xdb0d)); // Template Extension Creator UID
214 removals_.insert(DicomTag(0x0070, 0x0001)); // Graphic Annotation Sequence
215 removals_.insert(DicomTag(0x0070, 0x0084)); // Content Creator's Name
216 removals_.insert(DicomTag(0x0070, 0x0086)); // Content Creator's Identification Code Sequence
217 removals_.insert(DicomTag(0x0070, 0x031a)); // Fiducial UID
218 removals_.insert(DicomTag(0x0088, 0x0140)); // Storage Media File-set UID
219 removals_.insert(DicomTag(0x0088, 0x0200)); // Icon Image Sequence
220 removals_.insert(DicomTag(0x0088, 0x0904)); // Topic Title
221 removals_.insert(DicomTag(0x0088, 0x0906)); // Topic Subject
222 removals_.insert(DicomTag(0x0088, 0x0910)); // Topic Author
223 removals_.insert(DicomTag(0x0088, 0x0912)); // Topic Key Words
224 removals_.insert(DicomTag(0x0400, 0x0100)); // Digital Signature UID
225 removals_.insert(DicomTag(0x0400, 0x0402)); // Referenced Digital Signature Sequence
226 removals_.insert(DicomTag(0x0400, 0x0403)); // Referenced SOP Instance MAC Sequence
227 removals_.insert(DicomTag(0x0400, 0x0404)); // MAC
228 removals_.insert(DicomTag(0x0400, 0x0550)); // Modified Attributes Sequence
229 removals_.insert(DicomTag(0x0400, 0x0561)); // Original Attributes Sequence
230 removals_.insert(DicomTag(0x2030, 0x0020)); // Text String
231 removals_.insert(DicomTag(0x3006, 0x0024)); // Referenced Frame of Reference UID
232 removals_.insert(DicomTag(0x3006, 0x00c2)); // Related Frame of Reference UID
233 removals_.insert(DicomTag(0x300a, 0x0013)); // Dose Reference UID
234 removals_.insert(DicomTag(0x300e, 0x0008)); // Reviewer Name
235 removals_.insert(DicomTag(0x4000, 0x0010)); // Arbitrary
236 removals_.insert(DicomTag(0x4000, 0x4000)); // Text Comments
237 removals_.insert(DicomTag(0x4008, 0x0042)); // Results ID Issuer
238 removals_.insert(DicomTag(0x4008, 0x0102)); // Interpretation Recorder
239 removals_.insert(DicomTag(0x4008, 0x010a)); // Interpretation Transcriber
240 removals_.insert(DicomTag(0x4008, 0x010b)); // Interpretation Text
241 removals_.insert(DicomTag(0x4008, 0x010c)); // Interpretation Author
242 removals_.insert(DicomTag(0x4008, 0x0111)); // Interpretation Approver Sequence
243 removals_.insert(DicomTag(0x4008, 0x0114)); // Physician Approving Interpretation
244 removals_.insert(DicomTag(0x4008, 0x0115)); // Interpretation Diagnosis Description
245 removals_.insert(DicomTag(0x4008, 0x0118)); // Results Distribution List Sequence
246 removals_.insert(DicomTag(0x4008, 0x0119)); // Distribution Name
247 removals_.insert(DicomTag(0x4008, 0x011a)); // Distribution Address
248 removals_.insert(DicomTag(0x4008, 0x0202)); // Interpretation ID Issuer
249 removals_.insert(DicomTag(0x4008, 0x0300)); // Impressions
250 removals_.insert(DicomTag(0x4008, 0x4000)); // Results Comments
251 removals_.insert(DicomTag(0xfffa, 0xfffa)); // Digital Signature Sequence
252 removals_.insert(DicomTag(0xfffc, 0xfffc)); // Data Set Trailing Padding
253 //removals_.insert(DicomTag(0x60xx, 0x4000)); // Overlay Comments => TODO
254 //removals_.insert(DicomTag(0x60xx, 0x3000)); // Overlay Data => TODO
255
256 // Set the DeidentificationMethod tag
257 ReplaceInternal(DICOM_TAG_DEIDENTIFICATION_METHOD, ORTHANC_DEIDENTIFICATION_METHOD_2011);
258 }