Skip to content

How to De-identify Private DICOM Tags


It is important to remove personal health information (PHI), or de-identify data,before importing it to Flywheel. If your institution uses DICOM tags outside of the standard tags, you can de-identify those tags before importing the DICOMs in to Flywheel.

The process works by defining DICOM tag names for private tags. These values are passed into the CLI command in the form of a CSV file. Once tag names are defined for the Private tags, the new tag names can be used in the de-identification profile like any standard DICOM tag.

For more robust de-identification of private DICOM tags, upgrade to Flywheel version 15.4 or later. The improved de-id profile features allow you to de-identify private DICOM tags alongside standard fields. Learn more about creating a de-id profile.

The method described in this article still applies to Flywheel sites on versions earlier than 15.4.

Instruction Steps

Step 1: Define Your Private Tags in a CSV File

Follow these steps to define your private DICOM tags in a CSV:

  1. Open a spreadsheet application such as Microsoft Excel or Google Sheets.
  2. In the first row of the spreadsheet, add the following criteria as column titles:

    • Tag
    • VR
    • Keyword
    • Description
    • VM

    See NiBabel's documentation for more information about these values.

  3. In the second row, define these values for your private DICOM tag. For example:

    Tag VR Keyword Description VM
    0x111021b0 UN UnknownProperty1 An unknown property 1
  4. Continue adding rows until you have defined all of the private tags.

  5. Once complete, save the file as a CSV:

    • Google Sheets: Go to File > Download , and select comma-separated values (.csv, currentsheet)
    • Excel: Go to File > Save As.... From the File Format menu, select Comma Separated Values (.csv).

Step 2: Add the Private DICOM Tags to your De-identification Profile

  1. Follow the steps to Create your de-identification profile
  2. Add the Keyword you defined in the CSV for each private DICOM tag.
  3. For each keyword, designate a field transformation. For example:

    - name: UnknownProperty1
      replace-with: XXXX

Step 3: Preview Your De-identified DICOM Tags

  1. Before importing your data to Flywheel, verify the de-id profile and ensure the tags are de-identified as expected by using the fw deid command.

  2. Once you have confirmed that the fields are de-identified correctly, use the fw ingest dicom command with the --deidentify and --deid-profile options to deidentify and import your data into Flywheel.