Law
HIPAA de-identification before you use AI
HIPAA offers two ways to de-identify health information before using AI: Safe Harbor, which removes 18 listed identifiers with no actual knowledge that the rest could identify the patient, and Expert Determination, where a qualified expert finds the re-identification risk very small. Sequential tokens can serve as a permitted re-identification code; hashes of identifiers cannot.
Key points
- 45 CFR §164.514(b) sets out two methods: Safe Harbor and Expert Determination.
- Safe Harbor means removing all 18 identifiers, for the patient and their relatives, employers and household members.
- A re-identification code must not be derived from patient data: [PERSON_1] can qualify, a hash of a name cannot.
- If a vendor handles PHI, you need a Business Associate Agreement.
HIPAA de-identification: the two methods
Under the HIPAA Privacy Rule, health information is de-identified when it meets one of two standards in 45 CFR §164.514(b): Safe Harbor or Expert Determination. De-identified information is no longer protected health information (PHI), so the Privacy Rule no longer restricts how it is used or disclosed.
That matters for AI. If you send PHI to an AI provider, the provider is handling PHI on your behalf and the usual HIPAA obligations follow. If you send properly de-identified text, the provider does not receive PHI at all.
| Safe Harbor | Expert Determination | |
|---|---|---|
| How it works | Remove the 18 listed identifiers | A qualified expert applies statistical and scientific methods |
| Extra condition | No actual knowledge that the remaining information could identify the individual | The expert determines the risk of re-identification is very small, and documents the methods and results |
| Strengths | Clear and repeatable | Can keep more useful detail, such as some dates or locations |
| Typical use | Everyday documents, notes and letters | Research datasets and analytics |
The 18 Safe Harbor identifiers
Safe Harbor requires removing these identifiers of the individual and of the individual's relatives, employers and household members.
- Names.
- Geographic subdivisions smaller than a state, including street address, city, county, precinct and ZIP code (the first three digits of a ZIP code may be kept in some cases, if the area they cover has more than 20,000 people).
- All elements of dates, except the year, directly related to the individual, such as birth, admission, discharge and death dates; and all ages over 89 (which may be grouped as 90 or older).
- Telephone numbers.
- Fax numbers.
- Email addresses.
- Social Security numbers.
- Medical record numbers.
- Health plan beneficiary numbers.
- Account numbers.
- Certificate/license numbers.
- Vehicle identifiers and serial numbers, including license plate numbers.
- Device identifiers and serial numbers.
- Web URLs.
- IP addresses.
- Biometric identifiers, including finger and voice prints.
- Full-face photographs and comparable images.
- Any other unique identifying number, characteristic or code, except a permitted re-identification code.
Free-text clinical notes are where identifiers hide: a relative's name in a history, a date in a discharge summary, an employer mentioned in an occupational note. Detection needs to cover the whole text, not just the header fields.
Re-identification codes: why tokens differ from hashes
HIPAA allows you to keep a code that lets you re-identify de-identified data, under §164.514(c), provided two conditions are met. The code must not be derived from or related to information about the individual, and you must not use or disclose it for other purposes or disclose the mechanism for re-identification.
This is where the choice of replacement mode matters.
- Sequential tokens such as
[PERSON_1]are assigned in order of appearance. They are not derived from the patient's name or record, so, kept with a protected key, they can fit the description of a permitted re-identification code. - A hash of an identifier, such as an HMAC of a medical record number, is computed from that identifier. It is derived from information about the individual, so it would not qualify as a §164.514(c) code, even though it cannot be reversed mathematically.
Patient John Smith, phone +1 202 555 0147, email john.smith@example.com, lives at 1600 Elm Street.
Patient [PERSON_1], phone [PHONE_1], email [EMAIL_1], lives at [ADDRESS_1].
The differences between tokens, hashes and other modes are explained in seven ways to replace personal data and summarised in the replacement modes section.
When you need a Business Associate Agreement
If a vendor creates, receives, maintains or transmits PHI on your behalf, it is generally a business associate and you need a Business Associate Agreement with it.
That applies at two points in an AI workflow. First, the de-identification tool: if it processes PHI on its servers, it handles PHI. Second, the AI provider: if what you send is not de-identified, the provider handles PHI too.
LEXARIS Cloud processes documents on our servers in St Petersburg, Russia (EU, UK, US and Swiss regions are planned and not yet available), and cloud processing of PHI is not currently offered. With Keys stay with you, detection and replacement run in your browser and LEXARIS does not receive the document content, so you can remove Safe Harbor identifiers before text leaves your device. You remain responsible for confirming all 18 categories, including dates other than the year, are removed. This mode is limited to text and documents with a text layer. The guide to client-side keys explains the trade-offs.
A practical workflow for clinics and health-tech teams
A workable routine combines automated detection, a human check and a clear rule about what may leave your systems.
- Select the HIPAA profile. LEXARIS includes a HIPAA compliance profile alongside GDPR, UK GDPR, CCPA/CPRA and others, set out in the compliance profiles section.
- De-identify. Replace identifiers with tokens. The tool detects more than 116 data types, including names, addresses, phone numbers, email addresses, account details and medical codes.
- Check dates, places and free text. Safe Harbor is strict about dates other than the year and about geography smaller than a state. Review these carefully, along with any mention of relatives or employers.
- Pass the GO/NO-GO check. When you send through LEXARIS, an unchecked document cannot be sent. The check reduces risk; review the result before sharing.
- Send to the AI. The AI works on tokens only.
- Restore inside your environment. Put the real details back into the answer where authorised staff can see them, and keep the key access-controlled.
If you also work under the GDPR
HIPAA de-identification and GDPR anonymisation are different tests. Data de-identified under Safe Harbor may still be personal data under the GDPR, particularly when a re-identification code and key exist.
If you handle patients or users in both the US and Europe, read pseudonymisation versus anonymisation under the GDPR alongside this guide, and involve both your HIPAA privacy officer and your data protection officer.
Frequently asked questions
Can I use ChatGPT with patient data under HIPAA?
Only if the data are properly de-identified, or if the provider has signed a Business Associate Agreement covering that use. De-identifying records first means the AI receives no protected health information.
What are the 18 HIPAA identifiers?
They include names, small geographic areas, dates other than year, phone and fax numbers, email addresses, Social Security numbers, record and account numbers, device and vehicle identifiers, URLs, IP addresses, biometrics, full-face photos and any other unique code.
Is a hashed patient ID de-identified under HIPAA?
Generally not as a re-identification code. §164.514(c) requires the code not to be derived from information about the individual, and a hash of an identifier is derived from it.
What is the difference between Safe Harbor and Expert Determination?
Safe Harbor is a checklist: remove the 18 identifiers and have no actual knowledge the remainder could identify someone. Expert Determination relies on a qualified expert's documented analysis that the risk of re-identification is very small.
Sources
This guide is general information, not legal advice. Check the current text of the law and regulator guidance for your situation.
Try it on your own document
The demo runs entirely in your browser. Nothing is sent anywhere.