FHIR Schema in Practice: How Real Systems Structure Data

FHIR schema — resource structure with extensions and profiles — has real-world patterns worth understanding. Six that show up in production.
Pattern 1: Profile-driven data model. Every resource conforms to a specific profile. US Core baseline; specialty profiles for specific use cases.
Pattern 2: Extension for site-specific data. Custom fields via Extension. Each extension has a StructureDefinition at a canonical URL.
Pattern 3: Reference discipline. Reference elements always by full URL; type-constrained; never contained for shared entities.
Pattern 4: Bundle transaction for related writes. Related resources (Patient + Observation + Encounter) written as one Bundle transaction. URN placeholders for internal references.
Pattern 5: Terminology binding. All coded fields bound to specific ValueSets. Version-pinned; validated at write.
Pattern 6: Meta consistency. Meta.lastUpdated monotonic; Meta.versionId incremented on write; Meta.profile reflects actual conformance.
Practical implications
1. Extension governance. Central registry of custom extensions. 2. Version management. Profile versions pinned in code and tests. 3. Terminology governance. ValueSet expansions cached. 4. Reference resolution. Cross-resource joins via _include. 5. Bundle discipline. Right Bundle type for the use case.
Common schema mistakes
1. Custom fields without StructureDefinition. 2. Reference by ID string instead of full reference. 3. Ignoring profile constraints. 4. Missing terminology bindings. 5. Manual Meta.lastUpdated manipulation.
Governance workflow
1. Design extension → publish StructureDefinition. 2. Version-control extension changes. 3. Update $validate to include extension. 4. Test coverage for extension use cases. 5. Documentation of extension purpose.
Vendor state (mid-2026)
| Server | Custom extensions | Profile validation | Terminology binding |
|---|---|---|---|
| HAPI FHIR | Full | Full | Full |
| Aidbox | Full | Full | Full |
| Medplum | Full | Full | Basic |
| Microsoft FHIR | Full | Full | External |
FHIR schema in practice depends on governance discipline. Sites with schema governance ship maintainable systems for years.
