Your team wants an LLM to summarize visit notes, draft patient messages or triage intake forms. The prototype works in a week. Then someone asks a simple question nobody can answer: is the text we’re sending to the model API protected health information, and if it is, are we allowed to send it at all?
That answer decides your architecture, your vendor list and your launch date. This guide covers what counts as PHI, when an AI vendor becomes a business associate, how the two HIPAA de-identification methods differ, and a checklist to run before patient data leaves your servers.
This guide is written for US health products and isn’t legal advice, so bring in legal counsel for the final calls.
What Counts as PHI When an AI Feature Sees It?
HIPAA doesn’t protect “health data” in general. It protects individually identifiable health information held by covered entities (health plans, clearinghouses and most providers that bill electronically) and by their business associates, the vendors that handle that information on their behalf. If you’re building for a clinic, a hospital or an insurer, the data your feature touches is almost certainly PHI.
Identifiability is what teams underestimate. A diagnosis alone isn’t PHI. A diagnosis next to an appointment date, a ZIP code or a device ID often is. The Safe Harbor method lists 18 identifier types, and many of them show up in places you wouldn’t think to look:
- Names, plus addresses and any geographic unit smaller than a state
- All date elements except the year (birth, admission, discharge, death)
- Phone numbers, email addresses, account numbers and medical record numbers
- Device identifiers, IP addresses and URLs
- Full-face photos and biometric identifiers such as voiceprints
What About Consumer Health Apps?
Consumer products are different. If you sell a symptom tracker directly to consumers, with no covered entity involved, HIPAA may not apply at all. That doesn’t make the data a free-for-all.
The FTC’s Health Breach Notification Rule covers many health apps that sit outside HIPAA. The final rule the FTC approved in April 2024, effective July 29, 2024, made clear that an unauthorized disclosure counts as a breach, not just a hack. Sharing health data with an analytics or AI vendor without the user’s authorization can trigger notice obligations. So “we’re not HIPAA-covered” isn’t the end of the analysis.
Does Your LLM Vendor Need a BAA?
If you’re a covered entity or a business associate and you send PHI to a model API, that API provider is creating, receiving or maintaining PHI on your behalf. That makes it a business associate, and you need a business associate agreement (BAA) in place before the first request goes out.
“But it’s encrypted” doesn’t get you out of this. HHS cloud computing guidance says a provider that stores encrypted ePHI is still a business associate even when it doesn’t hold the decryption key. An LLM API that actually reads your plaintext prompts is in an even stronger position to see PHI.
Some major AI vendors do sign BAAs, but the coverage is narrower than the marketing page suggests. OpenAI’s help center, for example, describes API HIPAA eligibility as requiring a signed BAA, limits it to specific listed endpoints, and ties it to a particular data retention configuration on your account. Read the endpoint list, then check that the features you actually call (file uploads, web search, stored conversation state) are on it. Model offerings and endpoints change often, so keep an eye on large language model news and recheck coverage after every major update.
Bolting an LLM call onto an existing app often sends PHI through logging tools, error trackers and analytics SDKs nobody reviewed. When PHI boundaries, audit trails and vendor routing have to be designed in from the first sprint, teams often bring in custom healthcare software development rather than retrofitting an app that was never built to track where patient data goes. Whoever builds it, the BAA only protects you if the data actually stays inside the services it covers.
Safe Harbor or Expert Determination: Which De-identification Route Fits?
De-identified data isn’t PHI, so HIPAA’s restrictions stop applying to it. That makes de-identification the cleanest way to use an AI vendor that won’t sign a BAA, or to build training and evaluation datasets. Under 45 CFR 164.514(b), there are two ways to get there, and HHS explains both in its de-identification guidance for the Privacy Rule.
| Safe Harbor | Expert Determination | |
|---|---|---|
| How it works | Remove all 18 identifier types for the patient and their relatives, employers and household members | A qualified expert analyzes the data and context and documents that re-identification risk is very small |
| Extra condition | You have no actual knowledge that what remains could identify someone | The expert’s methods and results must be documented |
| What you keep | Year only for dates; ZIP truncated to three digits, and only where that area has more than 20,000 people | Can keep more detail (finer dates or geography) if the risk analysis supports it |
| Best fit | Structured fields, simple pipelines, low analytic needs | Research, model evaluation, longitudinal data |
| Cost | Mostly engineering time | Expert fees plus a re-review when data or context changes |
Safe Harbor is attractive because it’s a checklist. The catch is the “actual knowledge” clause: if your team knows a rare diagnosis plus a state plus a birth year points to one person, stripping the 18 fields doesn’t protect you. Expert Determination costs more, but it’s the only route that keeps the timing detail most clinical AI use cases need.
Why Are Clinical Notes So Hard to Scrub?
Structured fields are easy: drop the column. Free text is harder, and it’s exactly what LLM features rely on.
Clinicians write identifiers into narrative constantly:
- “Pt’s daughter Maria drove her in from the Fresno clinic.”
- “Follow-up after the March 3rd fall.”
- “Works night shift at the county jail.”
Each sentence carries a name, a place or a date that a regex for phone numbers won’t catch. Rare conditions and unusual jobs can identify someone even with every formal identifier removed.
Automated de-identification tools help, but treat their output as a first pass. A missed name in one note out of a thousand is still a disclosure. If clinical notes are your input, pick one of three paths:
- Send them only to BAA-covered services.
- Run them through de-identification backed by an expert’s sign-off on your process.
- Keep the model inside infrastructure you already control, for example with a privately hosted custom AI solution.
Limited Data Sets, Minimum Necessary and the Settings Nobody Checks
Limited Data Sets
There’s a middle ground between full PHI and de-identified data. A limited data set strips direct identifiers like names, street addresses and record numbers but can keep dates, city, state and five-digit ZIP codes. It’s still PHI.
You can use or share a limited data set for research, public health or health care operations, but only under a data use agreement that bars the recipient from trying to re-identify anyone. It isn’t “basically de-identified,” and treating it that way shows up in audits.
The Minimum Necessary Standard
Even with a BAA, send the model only what the task needs. A scheduling assistant doesn’t need lab results, and a trimmed context window is cheaper too.
The Settings That Actually Leak PHI
Finally, check the boring settings, because that’s where PHI actually leaks:
- Retention: How long does the vendor keep prompts and outputs, both for abuse monitoring and for application state?
- Training: Is your data excluded from model training by contract, not just by a toggle someone can flip?
- Logging: Do your own logs, traces and error reports capture full prompts? They usually do by default.
- Access: Who on your team can read stored prompts, and is that access recorded?
A Pre-Launch Checklist for Your Product Team
Rerun this checklist whenever you add a vendor or a feature.
- Map the data flow. Draw every hop from the user’s screen to the model and back, including logs, queues, caches and analytics.
- Classify each field. Mark what is PHI, what falls under the FTC rule and what is genuinely non-identifying.
- Confirm BAA status per service. Not per vendor, but per endpoint and per configuration you actually call.
- Pick a de-identification method where you need one. Safe Harbor for simple structured data, Expert Determination for anything with dates or free text.
- Set retention and training terms. Put them in the contract, then verify the account settings match.
- Apply minimum necessary. Strip fields from prompts that the task doesn’t use.
- Turn on audit logging. Record who sent what class of data to which model and when, without logging the PHI itself.
- Name an owner. One person signs off on the data map before release.
Where to Start This Week
Draw the data flow diagram first, because every other decision depends on it. Then compare each model provider’s BAA endpoint list line by line against the calls in your code. If your feature runs on clinical notes, decide now between BAA-covered services and Expert Determination, because switching later means rebuilding the pipeline.
Frequently Asked Questions
Can we use a consumer chatbot to summarize patient notes?
Not with real PHI, unless the specific product and plan you use is covered by a BAA. Consumer chat apps generally aren’t. De-identify the text first, or use a service your organization has a signed agreement with.
Is hashing a patient ID enough to de-identify a record?
Usually not. A hashed record number can often be linked back, and the rest of the record may still identify the person. Safe Harbor does allow a re-identification code, but only if it isn’t derived from the patient’s information and the key isn’t disclosed.
Does the FTC rule apply to us if we already follow HIPAA?
Generally not for data you hold as a covered entity or business associate. Many products mix both, though, so map each data stream separately.
