
FHIR Resources Explained: Types, Structure and Examples
Learn FHIR resources step by step: what each resource type holds, how IDs, references and extensions work, and how to choose the right ones.
Medical AI and patient data: when HIPAA applies, BAAs for AI vendors, de-identification methods, minimum necessary, training data rights and security basics.

Medical AI runs on patient data, so privacy questions come up at every stage: collecting data to build a model, sending data to an AI service, storing outputs and sharing results. In the United States, the HIPAA Privacy and Security Rules set the baseline. This guide explains the basics for healthtech and provider teams: what counts as protected health information, when vendors need a business associate agreement, how de-identification works, the minimum necessary standard and other rules to watch. For the broader picture of medical AI, see our guide to medical artificial intelligence.
HIPAA applies to covered entities, meaning health plans, health care clearinghouses and most health care providers, and to their business associates. It protects individually identifiable health information, known as protected health information or PHI. A consumer health app that is not working for a covered entity may fall outside HIPAA, but it can still be subject to other laws, such as Federal Trade Commission rules and state privacy laws.
Any company that creates, receives, maintains or transmits PHI on behalf of a covered entity is a business associate and must sign a business associate agreement (HHS sample BAA provisions). For medical AI, that usually includes:
The AI product vendor.
Any model provider the vendor calls, such as an LLM API.
Cloud hosting, transcription and other subcontractors that handle PHI.
Check that the BAA covers the exact service and configuration you use, and how long prompts, audio and outputs are kept. Our guide to HIPAA-compliant AI compares the major LLM providers' terms.

Data that is properly de-identified is no longer PHI, so the Privacy Rule no longer restricts its use. That makes de-identification the most common route for building and testing models. HIPAA allows two methods (HHS de-identification guidance):
| Method | How it works | Trade-off |
|---|---|---|
| Safe Harbor | Remove 18 specified types of identifiers, including names, small geographic units, most date elements and record numbers, and have no actual knowledge that the rest could identify someone | Simple and predictable, but removes detail that models often need, such as exact dates |
| Expert Determination | A qualified expert applies statistical methods and documents that the risk of re-identification is very small | Keeps more useful detail, but needs an expert and documentation |
Two cautions apply to AI. Free-text notes, images and audio can contain identifiers in unexpected places, such as names in a note or burned-in text on an image, so de-identification needs checking, not just automated removal. And combining de-identified datasets can raise re-identification risk, which an expert determination should consider.
For many uses and disclosures, HIPAA requires covered entities to limit PHI to the minimum necessary for the purpose (HHS minimum necessary guidance). In AI terms, send a model only the fields it needs, not the whole record, and limit which staff and systems can see outputs. The standard does not apply to disclosures for treatment, but limiting data is still good security practice.
Having data for care is not the same as having permission to use it to build products. Before training on patient data, confirm the legal basis. Common routes include de-identified data, data used for the covered entity's own health care operations under its policies, research under an authorization or an institutional review board or privacy board waiver, and limited data sets under a data use agreement. Vendors should check that their contracts and BAAs allow model training; many do not by default.
The HIPAA Security Rule requires administrative, physical and technical safeguards for electronic PHI (HHS Security Rule). For AI systems, pay particular attention to:
Encryption of data in transit and at rest, including prompts, embeddings and logs.
Access controls and audit logs for who used the AI tool and what it saw.
Risk analysis that includes AI-specific threats, such as prompt injection and data leaking through model outputs.
Vendor management, including subcontractors behind the AI service.
Substance use disorder records have extra protection under federal confidentiality rules.
State laws may add protections for specific types of health data or for consumer health apps.
Outside the US, rules such as the EU's GDPR treat health data as a special category with stricter conditions.
Teams building medical AI products that handle PHI can see our approach on the SaMD solutions page.
Privacy for medical AI comes down to a few basics: know whether HIPAA applies, sign BAAs with every vendor that handles PHI, de-identify properly when building models, send models only the data they need and secure every place data is stored, including prompts and logs. Settle the legal basis for training data before you start, not after a customer asks.
If you need help designing privacy into a medical AI product, talk to Ekipa's HealthTech engineers.
This article is general information, not legal advice.
Yes, when the AI is used by or on behalf of a covered entity and handles protected health information. Consumer apps outside that relationship may fall under other laws instead.
Yes, if they create, receive, store or transmit PHI on behalf of a covered entity. Their subcontractors that handle PHI, including model providers, also need to be covered.
Safe Harbor, which removes 18 types of identifiers, and Expert Determination, where a qualified expert documents that the risk of re-identification is very small.
Only with a valid legal basis, such as properly de-identified data, permitted health care operations, research authorization or waiver, or a data use agreement for a limited data set, and contracts that allow it.
It is no longer PHI under HIPAA, but combining datasets can raise re-identification risk, so contracts and technical controls are still wise.

Learn FHIR resources step by step: what each resource type holds, how IDs, references and extensions work, and how to choose the right ones.

Medical device software development explained: IEC 62304 lifecycle, ISO 14971 risk, FDA documentation, cybersecurity and AI change control.

Telemedicine software development guide covering features, HIPAA and BAA rules, state licensure, FHIR integration and a step-by-step build plan.
Connect with our team to explore how AI expertise can transform your business.