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:
-
Tag
-
VR
-
Keyword
-
Description
-
VM
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:
Tag
VR
Keyword
Description
VM
0x111021b0
UN
UnknownProperty1
An unknown property
1
-
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
-
Add the
Keyword
you 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.
-
Use the
import dicom
command along with the--private-dicom-tags
,--profile
, and--output-folder
options. 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"
Other ways to de-identify data
Flywheel offers other methods for de-identifying data depending on the type of data you are uploading:
-
Flywheel connector: Your Flywheel connector can be configured to de-identified data once it leaves the scanner and before it is sent to Flywheel. This is customized for your institution and is often different for each research center. Contact your site administrator for details.
-
Uploading DICOMs via your web browser: When de-identification is enabled, this option removes the following DICOM fields: Patient ID,Patient Name , and Patient Date of Birth.
-
--de-identify option in the Flywheel CLI:This option also removes the following DICOM fields: Patient ID, Patient Name, and Patient Date of Birth
-
DICOM tags:You can define how to de-identify standard DICOM tags by using the de-identification profile