ImageEn, unit ieDicomTags

IEAnonymizeDicomTags


Declaration

procedure IEAnonymizeDicomTags(DICOMTags: TIEDicomTags; const AnonymizeStr: string = 'Anonymous);


Description

Removes all personally identifiable information from the tags of a DICOM file.
For any personal tags that are found: String values will be set to AnonymizeStr. Numeric values will be set to 0 and data values will be deleted.

Identifiable tags are defined by:

http://dicom.nema.org/dicom/2013/output/chtml/part15/chapter_E.html#table_E.1-1

A more precise anonymization strategy would follow the specific methods described in this document. You can access the recommended anonymization method using IEDicomGetTagInfoEx.

Note:
 The anonymity provided by this method is not guaranteed. Ensure you fully validate your files after usage
 This method does not strip any private attributes
 You cannot anonymize tag-only dicom files
 ieDicomTags adds about 400KB to your exe


Demo

Demo  Demos\InputOutput\DicomTags\DicomTags.dpr


Example

// Create an anonymous version of a dicom file
ImageEnView1.IO.LoadFromFile( OpenImageEnDialog1.FileName );
if ImageEnView1.IO.Params.FileType = ioDICOM then
begin
  IEAnonymizeDicomTags( ImageEnView1.IO.Params.DICOM_Tags );
  destFN := ChangeFileExt( ImageEnView1.IO.Params.FileName, '-Anonymous.dicom' );
  ImageEnView1.IO.InjectDICOMTags( ImageEnView1.IO.Params.FileName, destFN );
end;


See Also

 DICOM_Tags
 InjectDICOMTags


Affected Tags

Accession Number (0008,0050)
Acquisition Comments (0018,4000)
Acquisition Context Sequence (0040,0555)
Acquisition Date (0008,0022)
Acquisition DateTime (0008,002A)
Acquisition Device Processing Description (0018,1400)
Acquisition Protocol Description (0018,9424)
Acquisition Time (0008,0032)
Actual Human Performers Sequence (0040,4035)
Additional Patient's History (0010,21B0)
Admission ID (0038,0010)
Admitting Date (0038,0020)
Admitting Diagnoses Code Sequence (0008,1084)
Admitting Diagnoses Description (0008,1080)
Admitting Time (0038,0021)
Affected SOP Instance UID (0000,1000)
Allergies (0010,2110)
Arbitrary (4000,0010)
Author Observer Sequence (0040,A078)
Branch of Service (0010,1081)
Cassette ID (0018,1007)
Comments on the Performed Procedure Step (0040,0280)
Concatenation UID (0020,9161)
Confidentiality Constraint on Patient Data Description (0040,3001)
Content Creator's Name (0070,0084)
Content Creator's Identification Code Sequence (0070,0086)
Content Date (0008,0023)
Content Sequence (0040,A730)
Content Time (0008,0033)
Context Group Extension Creator UID (0008,010D)
Contrast Bolus Agent (0018,0010)
Contribution Description (0018,A003)
Country of Residence (0010,2150)
Creator Version UID (0008,9123)
Current Patient Location (0038,0300)
Curve Data (50xx,xxxx)
Curve Date (0008,0025)
Curve Time (0008,0035)
Custodial Organization Sequence (0040,A07C)
Data Set Trailing Padding (FFFC,FFFC)
Derivation Description (0008,2111)
Detector ID (0018,700A)
Device Serial Number (0018,1000)
Device UID (0018,1002)
Digital Signature UID (0400,0100)
Digital Signatures Sequence (FFFA,FFFA)
Dimension Organization UID (0020,9164)
Discharge Diagnosis Description (0038,0040)
Distribution Address (4008,011A)
Distribution Name (4008,0119)
Dose Reference UID (300A,0013)
Ethnic Group (0010,2160)
Failed SOP Instance UID List (0008,0058)
Fiducial UID (0070,031A)
Filler Order Number / Imaging Service Request (0040,2017)
Frame Comments (0020,9158)
Frame of Reference UID (0020,0052)
Gantry ID (0018,1008)
Generator ID (0018,1005)
Graphic Annotation Sequence (0070,0001)
Human Performers Name (0040,4037)
Human Performers Organization (0040,4036)
Icon Image Sequencex (0088,0200)
Identifying Comments (0008,4000)
Image Comments (0020,4000)
Image Presentation Comments (0028,4000)
Imaging Service Request Comments (0040,2400)
Impressions (4008,0300)
Instance Creator UID (0008,0014)
Institution Address (0008,0081)
Institution Code Sequence (0008,0082)
Institution Name (0008,0080)
Institutional Department Name (0008,1040)
Insurance Plan Identification (0010,1050)
Intended Recipients of Results Identification Sequence (0040,1011)
Interpretation Approver Sequence (4008,0111)
Interpretation Author (4008,010C)
Interpretation Diagnosis Description (4008,0115)
Interpretation ID Issuer (4008,0202)
Interpretation Recorder (4008,0102)
Interpretation Text (4008,010B)
Interpretation Transcriber (4008,010A)
Irradiation Event UID (0008,3010)
Issuer of Admission ID (0038,0011)
Issuer of Patient ID (0010,0021)
Issuer of Service Episode ID (0038,0061)
Large Palette Color Lookup Table UID (0028,1214)
Last Menstrual Date (0010,21D0)
MAC (0400,0404)
Media Storage SOP Instance UID (0002,0003)
Medical Alerts (0010,2000)
Medical Record Locator (0010,1090)
Military Rank (0010,1080)
Modified Attributes Sequence (0400,0550)
Modified Image Description (0020,3406)
Modifying Device ID (0020,3401)
Modifying Device Manufacturer (0020,3404)
Name of Physicianx (s) Reading Study (0008,1060)
Names of Intended Recipient of Results (0040,1010)
Occupation (0010,2180)
Operators' Identification Sequence (0008,1072)
Operators' Name (0008,1070)
Original Attributes Sequence (0400,0561)
Order Callback Phone Number (0040,2010)
Order Entered By (0040,2008)
Order Enterer Location (0040,2009)
Other Patient IDs (0010,1000)
Other Patient IDs Sequence (0010,1002)
Other Patient Names (0010,1001)
Overlay Comments (60xx,4000)
Overlay Data (60xx,3000)
Overlay Date (0008,0024)
Overlay Time (0008,0034)
Palette Color Lookup Table UID (0028,1199)
Participant Sequence (0040,A07A)
Patient Address (0010,1040)
Patient Comments (0010,4000)
Patient ID (0010,0020)
Patient Sex Neutered (0010,2203)
Patient State (0038,0500)
Patient Transport Arrangements (0040,1004)
Patient's Age (0010,1010)
Patient's Birth Date (0010,0030)
Patient's Birth Name (0010,1005)
Patient's Birth Time (0010,0032)
Patient's Institution Residence (0038,0400)
Patient's Insurance Plan Code Sequence (0010,0050)
Patient's Mother's Birth Name (0010,1060)
Patient's Name (0010,0010)
Patient's Primary Language Code Sequence (0010,0101)
Patient's Primary Language Modifier Code Sequence (0010,0102)
Patient's Religious Preference (0010,21F0)
Patient's Sex (0010,0040)
Patient's Size (0010,1020)
Patient's Telephone Numbers (0010,2154)
Patient's Weight (0010,1030)
Performed Location (0040,0243)
Performed Procedure Step Description (0040,0254)
Performed Procedure Step End Date (0040,0250)
Performed Procedure Step End Time (0040,0251)
Performed Procedure Step ID (0040,0253)
Performed Procedure Step Start Date (0040,0244)
Performed Procedure Step Start Time (0040,0245)
Performed Station AE Title (0040,0241)
Performed Station Geographic Location Code Sequence (0040,4030)
Performed Station Name (0040,0242)
Performed Station Name Code Sequence (0040, 4028)
Performing Physician Identification Sequence (0008,1052)
Performing Physicians' Name (0008,1050)
Person Address (0040,1102)
Person Identification Code Sequence (0040,1101)
Person Name (0040,A123)
Person Telephone Numbers (0040,1103)
Physician Approving Interpretation (4008,0114)
Physicianx (s) Reading Study Identification Sequence (0008,1062)
Physicianx (s) of Record (0008,1048)
Physicianx (s) of Record Identification Sequence (0008,1049)
Placer Order Number / Imaging Service Request (0040,2016)
Plate ID (0018,1004)
Pre-Medication (0040,0012)
Pregnancy Status (0010,21C0)
Protocol Name (0018,1030)
Reason for the Imaging Service Request (0040,2001)
Reason for Study (0032,1030)
Referenced Digital Signature Sequence (0400,0402)
Referenced Frame of Reference UID (3006,0024)
Referenced General Purpose Scheduled Procedure Step Transaction UID (0040,4023)
Referenced Image Sequence (0008,1140)
Referenced Patient Alias Sequence (0038, 0004)
Referenced Patient Sequence (0008,1120)
Referenced Performed Procedure Step Sequence (0008,1111)
Referenced SOP Instance MAC Sequence (0400,0403)
Referenced SOP Instance UID (0008,1155)
Referenced SOP Instance UID in File (0004,1511)
Referenced Study Sequence (0008,1110)
Referring Physician's Address (0008,0092)
Referring Physician's Identification Sequence (0008,0096)
Referring Physician's Name (0008,0090)
Referring Physician's Telephone Numbers (0008,0094)
Region of Residence (0010,2152)
Related Frame of Reference UID (3006,00C2)
Request Attributes Sequence (0040,0275)
Requested Contrast Agent (0032,1070)
Requested Procedure Comments (0040,1400)
Requested Procedure Description (0032,1060)
Requested Procedure ID (0040,1001)
Requested Procedure Location (0040,1005)
Requested SOP Instance UID (0000,1001)
Requesting Physician (0032,1032)
Requesting Service (0032,1033)
Responsible Organization (0010,2299)
Responsible Person (0010,2297)
Results Comments (4008,4000)
Results Distribution List Sequence (4008,0118)
Results ID Issuer (4008,0042)
Reviewer Name (300E,0008)
Scheduled Human Performers Sequence (0040,4034)
Scheduled Patient Institution Residence (0038,001E)
Scheduled Performing Physician Identification Sequence (0040,000B)
Scheduled Performing Physician Name (0040,0006)
Scheduled Procedure Step End Date (0040,0004)
Scheduled Procedure Step End Time (0040,0005)
Scheduled Procedure Step Description (0040,0007)
Scheduled Procedure Step Location (0040,0011)
Scheduled Procedure Step Start Date (0040,0002)
Scheduled Procedure Step Start Time (0040,0003)
Scheduled Station AE Title (0040,0001)
Scheduled Station Geographic Location Code Sequence (0040,4027)
Scheduled Station Name (0040,0010)
Scheduled Station Name Code Sequence (0040,4025)
Scheduled Study Location (0032,1020)
Scheduled Study Location AE Title (0032,1021)
Series Date (0008,0021)
Series Description (0008,103E)
Series Instance UID (0020,000E)
Series Time (0008,0031)
Service Episode Description (0038,0062)
Service Episode ID (0038,0060)
Smoking Status (0010,21A0)
SOP Instance UID (0008,0018)
Source Image Sequence (0008,2112)
Special Needs (0038,0050)
Station Name (0008,1010)
Storage Media File-set UID (0088,0140)
Study Comments (0032,4000)
Study Date (0008,0020)
Study Description (0008,1030)
Study ID (0020,0010)
Study ID Issuer (0032,0012)
Study Instance UID (0020,000D)
Study Time (0008,0030)
Synchronization Frame of Reference UID (0020,0200)
Template Extension Creator UID (0040,DB0D)
Template Extension Organization UID (0040,DB0C)
Text Comments (4000,4000)
Text String (2030,0020)
Timezone Offset From UTC (0008,0201)
Topic Author (0088,0910)
Topic Keywords (0088,0912)
Topic Subject (0088,0906)
Topic Title (0088,0904)
Transaction UID (0008,1195)
UID (0040,A124)
Verifying Observer Identification Code Sequence (0040,A088)
Verifying Observer Name (0040,A075)
Verifying Observer Sequence (0040,A073)
Verifying Organization (0040,A027)
Visit Comments (0038,4000)