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. See our other article for more information.
The method described in this article still applies to Flywheel sites on versions earlier than 15.4.
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 these 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, then your new tag names can be used in the de-identification profile just like any standard DICOM tag.
This article explains how to define the DICOM tags, so that you can add them to the de-identification profile.
Follow these steps to define your private DICOM tags in a CSV:
Open a spreadsheet application such as Microsoft Excel or Google Sheets.
In the first row of the spreadsheet, add the following criteria as column titles:
See NiBabel's documentation for an explanation of what these values mean
In the second row, define these values for your private DICOM tag. For example:
An unknown property
Continue adding rows until you define all of the private tags.
Once complete, save the file as a CSV:
In Google Sheets, Go to File > Download , and select comma-separated values (.csv, currentsheet)
In Excel, go to File > Save As.... From the File Format menu, select Comma Separated Values (.csv).
Follow the steps to Create your de-identification profile
Keywordyou defined in the CSV for each private DICOM tag.
For each keyword, designate a
field transformation. For example:
- name: UnknownProperty1 replace-with: XXXX
Before importing your data to Flywheel, verify that the tags are de-identified as expected.
Download and install the Flywheel CLI if you have not already.
Open Terminal or Windows Command Prompt.
import dicomcommand along with the
--output-folderoptions. For example:
fw import dicom --private-dicom-tags ExamplePrivateTag.csv --profile ~Documents/StudyDeIDProfile --output-folder ~Documents/PreviewTags ~/Documents/StudyData Psychology "Anxiety Study"
The Flywheel CLI displays a hierarchy of the DICOM data it found. When prompted with Confirm upload (yes/no) , enter yes.
The Flywheel CLI displays its progress. The Flywheel CLI does not upload the data to Flywheel when you have the --output-folder flag.
Go to the location of the de-id log you set in the profile. The log file shows the value of each field before and after de-identification.
The de-identification log includes PHI because it shows the DICOM fields before and after the de-identification. Depending on your environment, you may need to delete the log file after you review it.
Once you have confirmed that the fields are de-identified correctly, run the import dicom command without the --ouput-folder option. For example:
fw import dicom --private-dicom-tags ExamplePrivateTag.csv --profile ~Documents/StudyDeIDProfile ~/Documents/StudyData Psychology "Anxiety Study"