Using LLMs With Patient Data: HIPAA Rules in Plain English
Can you send patient data to ChatGPT, Claude or Gemini? A plain-English guide to HIPAA, BAAs, de-identification, logging and safe LLM design for healthcare.
By the Clarigo Editorial Team · Reviewed by Vivek J., Senior Developer · December 5, 2026 5 min read
Want this done for your business? A senior engineer replies within one working day.
Get a free quoteShort answer: under HIPAA, you can use large language models with patient data only if every vendor that receives protected health information (PHI) has signed a Business Associate Agreement (BAA) with you, you send only the minimum data needed, and your system has proper access controls, encryption and audit logs. Consumer chatbot accounts are generally not appropriate for PHI. If you cannot get a BAA, de-identify the data first or keep it out of the model.
Clinics, hospitals and health-tech startups want to use AI for notes, summaries, patient messages, coding and intake. The technology is ready for many of these tasks. The compliance questions are what slow teams down. This guide explains the main HIPAA concepts as they apply to LLMs, in plain English. It is general information, not legal advice; your compliance officer or a healthcare attorney should review your specific setup.
The basics: who and what HIPAA covers
- Covered entities are healthcare providers, health plans and clearinghouses that handle health information electronically.
- Business associates are vendors that create, receive, store or transmit PHI on behalf of a covered entity: software companies, cloud hosts, billing services and, yes, AI providers.
- PHI is health information that can be linked to an individual: names, dates, contact details, record numbers, images and anything else that identifies the patient, combined with health or payment information.
If your AI feature touches PHI, every company in the chain that sees that data is part of your HIPAA picture.
Rule 1: no PHI to a vendor without a BAA
A BAA is a contract in which the vendor agrees to protect PHI, use it only for permitted purposes, report breaches and pass the same obligations to its own subcontractors.
What this means for LLMs:
- Consumer accounts of AI chat apps are generally not covered by a BAA. Staff should not paste patient details into them.
- Enterprise and API offerings from major providers, and the major cloud platforms that host models, may offer BAAs for eligible services under specific configurations. Check exactly which products, models and features are covered, and get it in writing before sending any PHI.
- Every hop counts. If your app sends data to a vector database, a logging tool, a transcription service or an analytics platform, each of those needs to be covered too, or must never receive PHI.
Rule 2: send the minimum necessary
HIPAA's minimum necessary standard means using and sharing only the PHI needed for the task. For LLM design this is very practical:
- Summarising a visit note may need the note, but probably not the patient's address or insurance ID.
- Drafting an appointment reminder may need a first name and time, not the diagnosis.
- Classifying an incoming message may need only the message text with identifiers stripped.
Build a step before the model call that selects or removes fields. This also reduces token costs.
Rule 3: de-identify when you can
Properly de-identified data is no longer PHI under HIPAA. There are two recognised methods:
- Safe Harbor: remove a defined list of 18 identifier types (such as names, most geographic details smaller than a state, most date elements other than year, phone numbers, emails, record numbers and full-face photos) and have no actual knowledge that the rest could identify someone.
- Expert Determination: a qualified expert analyses the data and documents that the risk of re-identification is very small.
Automated redaction tools help, but free text is messy. Names hide in sentences, and rare conditions plus a small town can identify someone. Test redaction on real samples and treat it as a risk-reduction layer, not a guarantee.
Rule 4: apply the Security Rule to the whole AI system
The HIPAA Security Rule requires administrative, physical and technical safeguards. For an LLM feature, that typically means:
- Access control: only authorised users and services can trigger AI on patient data, with role-based permissions.
- Encryption: in transit (TLS) and at rest, including embeddings, caches and stored prompts.
- Audit logs: record who requested what, which records were involved and what the AI produced.
- Risk analysis: document the AI feature in your risk assessment, including where data flows.
- Retention: decide how long prompts and outputs are stored, and confirm the provider's retention and training settings. Many enterprise offerings let you turn off use of your data for training; confirm this contractually.
A frequent gap is logging. Developers log full prompts for debugging, and those logs end up in a tool with no BAA. Mask PHI in logs or keep logs inside your compliant environment.
Rule 5: keep a human responsible for clinical use
HIPAA is about privacy and security, not accuracy, but accuracy matters a great deal in healthcare. LLMs can produce confident mistakes. For anything that affects care:
- Present AI output as a draft for a clinician to review and sign.
- Show the source text the summary was based on.
- Keep the AI away from final diagnosis or dosing decisions unless the product is designed and regulated for that use.
- Collect feedback on errors and review it regularly.
Some clinical software may also fall under medical device regulation in certain countries. Check early if your feature makes or supports clinical decisions.
A safe architecture pattern
A common, defensible setup looks like this:
- The app runs in a HIPAA-eligible cloud environment covered by a BAA.
- A gateway service checks the user's permissions and pulls only the needed fields.
- Identifiers are removed or replaced with tokens where the task allows.
- The request goes to an LLM endpoint covered by a BAA, with training on your data disabled.
- The response is re-linked to the record, stored with an audit entry, and shown to a clinician as a draft.
- Logs and monitoring stay inside the compliant environment with PHI masked.
For retrieval-augmented generation over patient records, apply the same permission checks to retrieval, so the AI can only see documents the user is allowed to see.
Other laws to keep in mind
If you serve patients outside the US, other rules apply alongside or instead of HIPAA, such as GDPR and UK GDPR in Europe and the UK, PIPEDA in Canada, the Australian Privacy Act, and India's DPDP Act. Some US states also have their own health privacy laws. Design for the strictest market you serve.
How Clarigo can help
Clarigo's HIPAA-trained team builds HIPAA-compliant software with HL7 and FHIR integrations, and designs LLM features with BAAs, minimum-necessary data flows and audit logging in mind. We also build our own healthcare products, Clarigo Clinic OS and Clarigo EHR. For the wider app picture, see our HIPAA-compliant app development guide, or contact us to review your AI plans.
Frequently asked questions
Can I put patient information into ChatGPT?
+
Not into a standard consumer account. PHI should only go to an AI service that is covered by a signed Business Associate Agreement and configured according to that agreement, or the data should be properly de-identified first.
Which LLM providers sign a BAA?
+
Several major AI and cloud providers offer BAAs for specific enterprise or API services. Coverage depends on the exact product, model and configuration, so confirm the details in writing with the provider before sending PHI.
Is de-identified data covered by HIPAA?
+
No. Data de-identified using the Safe Harbor method or Expert Determination is not PHI under HIPAA, although other laws and contracts may still apply.
Do AI prompts and logs count as PHI?
+
Yes, if they contain patient identifiers with health information. Prompts, outputs, embeddings, caches and logs all need the same protection as the rest of your PHI.
From our own work
Projects our team has delivered that relate to this article.
Healthcare
Clarigo Clinic OS
Our own product: an automation tool that handles a clinic's front-office work (calls, intake, insurance checks, prior authorizations, denied claims and reminders) while the EHR and staff stay exactly as they are.
Read the case study →
Healthcare
Clarigo EHR
Our own cloud EHR: clinical records, scheduling, billing and patient engagement in one system, with AI built into every step and HL7/FHIR interoperability, built to HIPAA compliance.
Read the case study →
About the author
Clarigo Editorial Team
Reviewed by Vivek J., Senior Developer at Clarigo Infotech, who works on AI, healthcare software and data.
Written by the team at Clarigo Infotech, an AI-first software and app development company in Indore, India. Since 2016 our in-house team has delivered 600+ projects for clients in 20+ countries, and our articles draw on that work. Read about the company, or see our case studies and portfolio.
Planning something like this?
Get a free consultation. A senior engineer replies within one working day with a scoped plan.
