Metadata-Version: 2.4
Name: ehr-sieve
Version: 0.0.1
Summary: Policy-driven tokenization and minimization of PHI in FHIR and other EHR JSON, before it leaves the provider. Pre-release.
Author: Brett VanderPlaats
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/ehr-sieve
Keywords: fhir,phi,hipaa,tokenization,de-identification,ehr,healthcare
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Security
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# ehr-sieve

**Status: pre-release. This version (0.0.1) contains no functionality yet.** The first working release is planned as 1.0.0.

ehr-sieve is a Python library for minimizing protected health information (PHI) in FHIR R4 and other EHR JSON *inside the provider's environment*, before data is shared with analytics, AI or research partners.

## What it will do

- **Find PHI by structure, not just field names.** It recognizes FHIR datatypes (Identifier, HumanName, ContactPoint, Address, Reference, Attachment, Narrative) wherever they appear, including inside extensions and polymorphic `value[x]` fields.
- **Apply a declarative, versioned policy.** Each field is kept, dropped, tokenized, or generalized (birth year, three-digit ZIP with restricted-ZIP handling, ages over 89 capped).
- **Deny by default.** Fields the policy doesn't list are dropped or reported, so a new EHR field can't slip through unreviewed.
- **Tokenize with keyed HMAC.** The provider holds the key and the token-to-identity crosswalk. A partner receiving tokens can't reverse them.
- **Report shapes, never values.** A scanner lists every field path in a dataset with counts, so a policy can be built without anyone outside seeing PHI.
- **Ship reference profiles,** including a minimized Limited Data Set profile.

## Disclaimer

ehr-sieve is a software tool. It is not legal advice, and using it does not by itself make data de-identified under HIPAA, nor is it an expert determination. Each organization remains responsible for its own privacy determinations and data use agreements.

## License

Apache-2.0. See [LICENSE](LICENSE).

Maintained by Brett VanderPlaats (Hcai).
