Skip to main content

No project description provided

Project description

CCD Deidentification

This Python project is designed to de-identify Continuity of Care Documents (CCDs), which are XML files used in healthcare to encode patient information.

Features

  • Masks sensitive information in various parts of the CCD, such as names, IDs, birth times, addresses, and telecom values.
  • Uses spaCy for natural language processing to mask free-text sections.
  • Consistently masks the same original text with the same masked value.
  • Logs details about masked items.
  • Can convert the log of masked items into a Spark DataFrame.
  • Can parse a CCD XML string, de-identify sensitive info, and return modified XML.

Dependencies

This project depends on several Python packages, including:

  • lxml
  • spacy
  • pydantic
  • jinja2
  • markupsafe2

These can be installed using pip:

pip install -r requirements.txt

Usage

First, create an instance of CCDDeidentifier:

from ccd_deidentification.deidentifier import CCDDeidentifier

deidentifier = CCDDeidentifier()

Then, you can use the deidentify_ccd_xml method to de-identify a CCD XML string:

deidentified_xml = deidentifier.deidentify_ccd_xml(original_xml)

The deidentify_ccd_xml method returns a new XML string with sensitive information masked.

You can also use the mask_map_to_data_frame method to convert the log of masked items into a Spark DataFrame:

df = deidentifier.mask_map_to_data_frame()

Note

This project is designed for production use in Health Information Exchanges or similar environments. As with any software that handles sensitive data, it should be thoroughly reviewed and tested to ensure it meets all relevant legal and ethical standards for data handling and privacy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccd_deidentification-0.2.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccd_deidentification-0.2.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file ccd_deidentification-0.2.1.tar.gz.

File metadata

  • Download URL: ccd_deidentification-0.2.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for ccd_deidentification-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b09ca8a1374539a1b0eb946aa177f73622bee0dae255cea536743313296a5572
MD5 e66007f429dcf7c7cfa48b9b0731daa0
BLAKE2b-256 58651a398f0bdd589e35526eaf7489d609012699ec2cf97c25fb1eb3b28c784e

See more details on using hashes here.

File details

Details for the file ccd_deidentification-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ccd_deidentification-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c1900e50928917595dc933a2c833b9b2bc9530fa50e7512e865d4a5cd8a4bad
MD5 639a098913757bd7a4e084d95e1cadd4
BLAKE2b-256 2f2a0492b8f329d7ee4b7d2bdc0679ae9d2237e8bf1995d8af0037ff00ad5147

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page