Configuration ExamplesΒΆ

We are listing here, for illustration purpose ONLY, a configuration profile that covers most of the available settings:

name: An example de-id profile

description: An illustrative de-id profile that covers most of the use cases

dicom:
  remove-private-tags: true
  date-increment: 10
  filenames:
    - input-regex: '.*'
      output: '{SOPInstanceUID}.dcm'
  fields:
    - name: PatientID
      replace-with: MY_PATIENT_ID
    - name: StudyInstanceUID
      hashuid: true
    - name: SeriesInstanceUID
      hashuid: true
    - name: SOPInstanceUID
      hashuid: true
    - name: PatientName
      remove: true
    - name: AccessionNumber
      remove: true
    - name: InstitutionName
      remove: true
    - name: InstitutionAddress
      remove: true
    - name: ReferringPhysicianName
      remove: true
    - name: ReferringPhysicianAddress
      remove: true
    - name: ReferringPhysicianTelephoneNumbers
      remove: true
    - name: InstitutionalDepartmentName
      remove: true
    - name: PhysiciansOfRecord
      remove: true
    - name: PerformingPhysicianName
      remove: true
    - name: NameOfPhysiciansReadingStudy
      remove: true
    - name: OperatorsName
      remove: true
    - name: AdmittingDiagnosesDescription
      remove: true
    - name: PatientBirthTime
      remove: true
    - name: PatientInsurancePlanCodeSequence
      remove: true
    - name: OtherPatientIDs
      remove: true
    - name: OtherPatientNames
      remove: true
    - name: OtherPatientIDsSequence
      remove: true
    - name: PatientBirthName
      remove: true
    - name: PatientAddress
      remove: true
    - name: PatientMotherBirthName
      remove: true
    - name: MilitaryRank
      remove: true
    - name: MedicalRecordLocator
      remove: true
    - name: PatientTelephoneNumbers
      remove: true
    - name: EthnicGroup
      remove: true
    - name: Occupation
      remove: true
    - name: AdditionalPatientHistory
      remove: true
    - name: ResponsiblePerson
      remove: true
    - name: PatientComments
      remove: true
    - name: ClinicalTrialSponsorName
      remove: true
    - name: ClinicalTrialProtocolID
      remove: true
    - name: ClinicalTrialProtocolName
      remove: true
    - name: ClinicalTrialSiteID
      remove: true
    - name: ClinicalTrialSiteName
      remove: true
    - name: ClinicalTrialSubjectID
      remove: true
    - name: ClinicalTrialTimePointID
      remove: true
    - name: ClinicalTrialTimePointDescription
      remove: true
    - name: ClinicalTrialCoordinatingCenterName
      remove: true
    - name: ProtocolName
      remove: true
    - name: ImageComments
      remove: true
    - name: StudyComments
      remove: true
    - name: RequestingPhysician
      remove: true
    - name: RequestAttributesSequence
      remove: true
    - name: NamesOfIntendedRecipientsOfResults
      remove: true
    - name: PersonIdentificationCodeSequence
      remove: true
    - name: PersonAddress
      remove: true
    - name: PersonTelephoneNumbers
      remove: true
    - name: VerifyingObserverName
      remove: true
    - name: PersonName
      remove: true
    - name: ContentSequence
      remove: true
    - name: ContentCreatorName
      remove: true
    - name: ReviewerName
      remove: true
    - name: OriginalAttributesSequence
      remove: true
    - name: StudyDescription
      remove: true
    - name: DerivationDescription
      remove: true
    - name: ClinicalTrialSeriesDescription
      remove: true
    - name: TherapyDescription
      remove: true
    - name: InterventionDescription
      remove: true
    - name: RequestedProcedureDescription
      remove: true
    - name: AcquisitionProtocolDescription
      remove: true
    - name: ScheduledStationAETitle
      remove: true
    - name: ScheduledPerformingPhysicianName
      remove: true
    - name: DeviceDescription
      remove: true
    - name: DischargeDiagnosisDescription
      remove: true
    - name: StationName
      remove: true
    - name: ScheduledStationName
      remove: true
    - name: PerformedStationAETitle
      remove: true
    - name: PerformedStationName
      remove: true
    - name: PerformedProcedureStepDescription
      remove: true
    - name: DeviceSerialNumber
      remove: true
    - name: PerformedProcedureStepID
      remove: true
    - name: ClinicalTrialSubjectReadingID
      remove: true
    - name: IssuerOfPatientID
      remove: true
    - name: DigitalSignaturesSequence
      remove: true
    - regex: .*IdentificationSequence.*
      remove: true
    - name: NameOfPhysiciansReadingStudy
      remove: true
    - regex: .*DateTime.*
      increment-datetime: true
    - regex: .*Date(?!Time).*
      increment-date: true
    - name: FrameOfReferenceUID
      hashuid: true
    - regex: .*InstanceCreatorUID.*
      hashuid: true
    - regex: .*DimensionOrganizationUID.*
      hashuid: true
    - regex: .*ReferencedSOPInstanceUID.*
      hashuid: true

zip:
  filenames:
  - input-regex: '(?P<used>.*).dcm.zip$'
    output: '{used}.dcm.zip'
  hash-subdirectories: true
  validate-zip-members: true
  fields:
  - name: comment
    replace-with: FLYWHEEL

jpg:
  filenames:
    - output: '{name}.jpg'
      input-regex: '(?P<name>.*)\.jpg$'
  date-increment: -17
  remove-gps: True
  fields:
  - name: DateTime
    increment-datetime: true
  - name: Artist
    remove: true
  - name: DateTimeOriginal
    increment-datetime: true
  - name: DateTimeDigitized
    increment-datetime: true
  - name: CameraOwnerName
    replace-with: 'REDACTED'

png:
  filenames:
    - output: '{name_value}.png'
      input-regex: '(?P<name_value>.*)\.png'
  remove-private-chunks: True
  fields:
    - name: tEXt
      remove: true
    - name: eXIf
      remove: true

tiff:
  filenames:
    - output: '{DateTime}_{name_value}.tiff'
      input-regex: '(?P<name_value>.*)\.tiff'
  date-increment: -17
  remove-private-tags: True
  fields:
    - name: DateTime
      increment-datetime: true
    - name: Software
      remove: true
    - name: Model
      replace-with: 'REDACTED'

xml:
  date-increment: -17
  fields:
    - name: /Patient/Patient_Date_Of_Birth
      replace-with: '1900-01-01'
    - name: /Patient/Patient_Name
      remove: true
    - name: /Patient/SUBJECT_ID
      hash: true
    - name: /Patient/Visit/Scan/ScanTime
      increment-datetime: true

json:
  date-increment: 1
  filenames:
    - output: '{label}_{filename}.json'
      input-regex: '(?P<filename>.*)\.json$'
  fields:
    - name: timestamp
      increment-datetime: True
    - name: info.SiteID
      remove: True
      # regex-sub will be applied first in fields list when processing file
    - name: label
      regex-sub:
        - input-regex: '(?P<current_label>.*)'
          output: '{current_label}_{subject.lastname}_{timestamp}'
          groups:
            - name: current_label
              replace-with: 'one_cool_cat'
            - name: subject.lastname
              keep: true
            - name: timestamp
              increment-datetime: True
    - regex: info\.subject_raw\..*
      replace-with: "REDACTED"
    - name: info.test
      replace-with:
        new: value
        type: dict

key-value-text-file:
  delimiter: '\s+=\s+'
  encoding: 'utf-8'
  filenames:
    - input-regex: '(?P<first>.*)-(?P<second>.*)-OD-(?P<third>.*)-OCT.mhd'
      output: '{first}-{second}-OD-{third}-OCT.mhd'
      groups:
        - name: first
          replace-with: '111111'
        - name: second
          hash: true
  fields:
    - name: ElementDataFile
      regex-sub:
        - input-regex: '(?P<first>.*)-(?P<second>.*)-OD-(?P<third>.*)-OCT.raw'
          output: '{first}-{second}-OD-{third}-OCT.raw'
          groups:
            - name: first
              replace-with: '111111'
            - name: second
              hash: true
    - name: Spam
      replace-with: Eggs

csv:
  date-increment: 1
  date-format: "%Y-%m-%d"
  datetime-format: "%d%b%Y %H:%M:%S"
  filenames:
    - output: '{info}_{date}.dcm'
      input-regex: '^(?P<info>\w+)-(?P<date>\d{4}-\d{2}-\d{2}).dcm$'
      groups:
        - name: date
          increment-date: true
  fields:
    - name: SeriesDateTime
      increment-datetime: True
    - name: SeriesNumber
      remove: True
      # regex-sub will be applied first in fields list when processing file
    - name: SiteSubject
      regex-sub:
        - input-regex: '(?P<current_value>.*)'
          output: '{current_value}_{SeriesNumber}_{SeriesDateTime}'
          groups:
            - name: current_value
              replace-with: 'one_cool_cat'
            - name: SeriesNumber
              keep: true
            - name: SeriesDateTime
              increment-datetime: True