# How to de-identify healthcare documents for testing

Medical records, EOBs, Medicare notices and claim forms are full of PHI. Teams testing claims systems or clinical document agents need realistic documents without real patients.

## Which identifiers to look for

The HIPAA Safe Harbor method lists 18 identifier types, including names, geographic subdivisions smaller than a state, dates directly related to a person (other than year), phone and fax numbers, email addresses, Social Security numbers, medical record numbers, health plan beneficiary numbers, account numbers, license numbers, vehicle and device identifiers, URLs and IP addresses, biometric identifiers, full-face photos, and any other unique identifying number. See the U.S. HHS guidance on de-identification for the authoritative text.

For test data, it usually makes sense to replace identifiers with realistic synthetic values rather than delete them, and to keep the clinical content (diagnoses, procedures, medications, lab results) that the system under test depends on.

## Doing it with CasePatch

CasePatch detects patient and member names, medical record and member numbers including Medicare beneficiary IDs, provider NPI and DEA numbers, dates of birth, addresses and ZIP codes, ages over 89, phone numbers and signatures, and replaces them in place in the original layout. Faces are replaced in the local app and samples; in hosted-beta uploads they are flagged for review. Diagnoses, medications, procedures and lab results are kept by default. Dates of service are kept. Upload at [the CasePatch home page](/) or open the public CMS sample there.

## What CasePatch is not

Synthetic replacement is not, by itself, a HIPAA de-identification. Safe Harbor also covers dates and other details that CasePatch keeps by default, and Expert Determination requires a qualified expert. CasePatch does not certify HIPAA compliance and its output is not a de-identification determination. Use test or specimen documents in the hosted beta, review every page, and run CasePatch in your own environment for production records. Related: [insurance claim files](/guides/anonymize-insurance-claims.html).
