Skip to content

DICOM Configuration

System configuration for DICOM anonymization and PACS integration.


Overview

DICOM (Digital Imaging and Communications in Medicine) configuration covers:

  • Auto-anonymization — Automatic PHI removal on upload
  • PACS integration — Connection to Picture Archiving and Communication Systems
  • Anonymization defaults — Default tag handling behavior

Environment Variables

Auto-Anonymization

# Enable automatic anonymization on upload to Sources
DICOM_ANONYMIZE_ON_UPLOAD=false

When enabled:

  • All DICOM files uploaded to Sources are anonymized automatically
  • Original files are not stored
  • Anonymization mapping is saved

PACS Server Configuration

# DICOM PACS server connection (for MCP connector)
DICOM_PACS_HOST=
DICOM_PACS_PORT=
DICOM_PACS_AE_TITLE=
Variable Description
DICOM_PACS_HOST PACS server hostname or IP
DICOM_PACS_PORT PACS server port (typically 11112)
DICOM_PACS_AE_TITLE Application Entity title for identification

Anonymization Configuration

Default Tags

The following tags are anonymized by default (HIPAA Safe Harbor):

Patient Identifiers:

  • PatientName
  • PatientID
  • PatientBirthDate
  • PatientSex
  • PatientAge
  • PatientAddress
  • PatientWeight
  • PatientTelephoneNumbers
  • OtherPatientIDs
  • OtherPatientNames
  • EthnicGroup

Institution Identifiers:

  • InstitutionName
  • InstitutionAddress
  • ReferringPhysicianName
  • PhysiciansOfRecord
  • PerformingPhysicianName
  • OperatorsName

Study/Series Identifiers:

  • StudyID
  • AccessionNumber
  • StudyDate, SeriesDate, AcquisitionDate, ContentDate
  • StudyTime, SeriesTime, AcquisitionTime, ContentTime

UID Tags

These UIDs are regenerated by default:

  • StudyInstanceUID
  • SeriesInstanceUID
  • SOPInstanceUID
  • FrameOfReferenceUID

PACS Integration

What PACS Integration Does

  • Query PACS server for studies
  • Retrieve DICOM files from PACS
  • Send anonymized files to PACS (optional)

Configuration Steps

  1. Obtain PACS credentials
  2. Contact your PACS administrator
  3. Get AE title, host, and port

  4. Configure environment bash DICOM_PACS_HOST=pacs.hospital.local DICOM_PACS_PORT=11112 DICOM_PACS_AE_TITLE=HALO_CORE

  5. Test connection

  6. Use DICOM Tools page to verify connectivity
  7. Check logs for connection errors

Security Considerations

  • PACS connections should be on secure networks
  • Consider VPN for remote access
  • Anonymize before sending to external PACS
  • Audit access to PACS integration

Compliance

HIPAA Safe Harbor

Default anonymization follows HIPAA Safe Harbor guidelines, removing all 18 identifiers:

  1. Names
  2. Geographic data
  3. Dates (except year)
  4. Phone numbers
  5. Fax numbers
  6. Email addresses
  7. Social Security numbers
  8. Medical record numbers
  9. Health plan beneficiary numbers
  10. Account numbers
  11. Certificate/license numbers
  12. Vehicle identifiers
  13. Device identifiers
  14. Web URLs
  15. IP addresses
  16. Biometric identifiers
  17. Full-face photos
  18. Any other unique identifying number

GDPR Considerations

For EU data subjects:

  • Document anonymization process
  • Ensure irreversibility of anonymization
  • Consider pseudonymization if linkage is needed
  • Maintain records of processing activities

Validation

After anonymization:

  1. Verify no PHI remains in standard tags
  2. Check private tags are removed
  3. Confirm UIDs are new and unique
  4. Test file opens in DICOM viewer

Troubleshooting

PACS Connection Fails

  1. Verify network connectivity to PACS host
  2. Check firewall rules for PACS port
  3. Verify AE title is registered with PACS
  4. Check PACS server logs

Auto-Anonymization Not Working

  1. Verify DICOM_ANONYMIZE_ON_UPLOAD=true
  2. Check file is valid DICOM format
  3. Review application logs for errors
  4. Verify pydicom dependency is installed

Anonymization Incomplete

  1. Check if tags are in selection
  2. Verify private tag removal is enabled
  3. Check for nested sequences containing PHI
  4. Review anonymization mapping output

Dependencies

Required Python packages:

pip install pydicom

Optional for PACS:

pip install pynetdicom

Next Steps