Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

C-CDA to FHIR Mapping: C-CDA vs. FHIR Architecture, Section OID & LOINC Crosswalk, and the HL7 C-CDA on FHIR IG

A technical reference to C-CDA to FHIR conversion and the HL7 C-CDA on FHIR Implementation Guide, comparing C-CDA R2.1 XML documents against FHIR R4 JSON resources and mapping section OIDs and LOINC codes (Problems, Medications, Allergies, Results, Vital Signs) to US Core FHIR profiles.

Written and maintained by CASRAI Editorial Board

Last updated

C-CDA to FHIR conversion is the health informatics process of parsing clinical documents encoded in the HL7 Consolidated Clinical Document Architecture Release 2.1 (C-CDA R2.1 XML) and transforming their header metadata, human-readable narrative blocks, and machine-readable clinical entries into discrete HL7 Fast Healthcare Interoperability Resources (FHIR Release 4) JSON or XML resources conforming to the US Core FHIR Implementation Guide. Because national health information exchange frameworks—such as Carequality, CommonWell Health Alliance, Direct Secure Messaging, and the Trusted Exchange Framework and Common Agreement (TEFCA)—still exchange hundreds of millions of C-CDA Continuity of Care Documents (CCDs) and Discharge Summaries annually, automated C-CDA-to-FHIR translation pipelines are foundational to modern EHR integration, clinical data aggregators, and real-world data (RWD) research repositories.

What Is the Difference Between C-CDA and FHIR? (HL7 CDA vs. FHIR Compared)

Although both standards are published by Health Level Seven International (HL7) and map to the same federal USCDI clinical vocabulary standards (SNOMED CT, LOINC, RxNorm, ICD-10-CM, and CVX), HL7 CDA / C-CDA and HL7 FHIR are built on fundamentally different data paradigms:

Architectural Dimension HL7 C-CDA (Consolidated CDA R2.1) HL7 FHIR (Release 4 / US Core)
Core Data Paradigm Document-Centric Snapshot: A point-in-time, legally attested clinical summary (e.g., CCD, Discharge Summary, Referral Note) packaged as a single indivisible file Resource-Centric Graph: Modular, independently addressable clinical objects (Patient, Condition, Observation) linked by RESTful URI references
Underlying Information Model Derived from the abstract HL7 v3 Reference Information Model (RIM) (Act, Entity, Role, Participation, classCode, moodCode) Pragmatic 80/20 domain object model designed directly around clinical and administrative developer workflows; uses extensions for local data
Wire Serialization Deeply nested XML validated against W3C XML Schema (XSD) and Schematron rules triggered by ISO Object Identifiers (templateId OIDs) Lightweight JSON (most common), XML, or RDF Turtle validated against FHIR StructureDefinition profiles and FHIRPath invariants
Transport & Query Granularity Exchanged as whole documents via IHE XDS.b/XCA SOAP web services or Direct S/MIME; retrieving one lab result requires downloading the entire XML document Queried granularly over HTTPS RESTful APIs (e.g., GET /Observation?patient=123&code=4548-4) or exported asynchronously via Bulk FHIR NDJSON
Human Readability Contract Mandatory CDA Narrative Block (<text>): A CDA document is legally defined by its human-readable XHTML-like narrative table; coded <entry> elements are secondary Optional DomainResource.text XHTML narrative summary; primary interoperability relies on structured JSON attributes and MustSupport elements

How Do You Map C-CDA Sections (Problems, Medications, Allergies) to FHIR Resources?

In a C-CDA R2.1 document, the <ClinicalDocument> header contains patient demographics, authors, custodians, and encounter metadata, while the <structuredBody> contains clinical <section> blocks identified by both a LOINC section code and a C-CDA Section Template OID. Inside each section, machine-readable clinical data are nested in RIM <entry> wrappers (typically a Concern Act wrapping an Observation or SubstanceAdministration).

The table below details the canonical HL7 C-CDA-to-FHIR R4 mapping across the core clinical sections:

C-CDA Section Name Section LOINC Code C-CDA R2.1 Section & Entry Template OIDs Target US Core FHIR R4 Resource Key Element & Status Mapping Rules
Document Header (recordTarget, author, encompassingEncounter) Document code (e.g., 34133-9 CCD) US Realm Header: 2.16.840.1.113883.10.20.22.1.1 Composition, Patient, Practitioner, Organization, Encounter recordTarget/patientRole maps to Patient; encompassingEncounter maps to Encounter; header metadata binds into Composition
Problems Section 11450-4 (Problem list – Reported) Section: ...22.2.5.1
Problem Concern Act: ...22.4.3
Problem Observation: ...22.4.4
Condition (US Core Condition Problems and Health Concerns) Problem Observation value (SNOMED CT / ICD-10-CM) → Condition.code; Observation status + Concern Act statusCode → Condition.clinicalStatus; effectiveTime/low → onsetDateTime
Medications Section 10160-0 (History of Medication use) Section: ...22.2.1.1
Medication Activity: ...22.4.16
MedicationRequest (or MedicationStatement) consumable/manufacturedProduct (RxNorm) → medicationCodeableConcept; moodCode="INT" (intent) vs. "EVN" (event) determines intent and status; doseQuantity & routeCode → dosageInstruction
Allergies and Intolerances Section 48765-2 (Allergies, adverse reactions) Section: ...22.2.6.1
Allergy Concern Act: ...22.4.30
Allergy Intolerance Obs: ...22.4.7
AllergyIntolerance participant/participantRole/playingEntity (RxNorm/UNII/SNOMED) → AllergyIntolerance.code; Reaction Observation (...22.4.9) → reaction.manifestation; Severity (...22.4.8) → reaction.severity
Results Section (Laboratory & Diagnostic) 30954-2 (Relevant diagnostic tests/lab data) Section: ...22.2.3.1
Result Organizer: ...22.4.1
Result Observation: ...22.4.2
DiagnosticReport + Observation (Laboratory Result) Result Organizer maps to DiagnosticReport (with result[] references); each nested Result Observation maps to an Observation with LOINC code, UCUM valueQuantity, and referenceRange
Vital Signs Section 8716-3 (Vital signs) Section: ...22.2.4.1
Vital Signs Organizer: ...22.4.26
Vital Sign Observation: ...22.4.27
Observation (US Core Vital Signs Profiles) Systolic and diastolic blood pressure observations inside the same organizer are combined into a single FHIR Observation (85354-9) with two component slices
Procedures Section 47519-4 (History of Procedures) Section: ...22.2.7.1
Procedure Activity Procedure: ...22.4.14
Procedure code (CPT / SNOMED CT / ICD-10-PCS) → Procedure.code; statusCode → Procedure.status; effectiveTime → performedDateTime or performedPeriod
Immunizations Section 11369-6 (History of Immunization) Section: ...22.2.2.1
Immunization Activity: ...22.4.52
Immunization consumable CVX code → Immunization.vaccineCode; negationInd="true" maps to status = "not-done" with statusReason

Note: All abbreviated template OIDs above begin with the HL7 C-CDA root prefix 2.16.840.1.113883.10.20.22.*.

What Is the HL7 C-CDA on FHIR Implementation Guide?

While many integration engines extract standalone FHIR resources from a C-CDA file, discarding the document container loses the legal attestation, section layout, and narrative context of the original clinical document. To preserve full document fidelity in FHIR, the HL7 Structured Documents Work Group published the HL7 C-CDA on FHIR Implementation Guide (canonical URL http://hl7.org/fhir/us/ccda).

Under C-CDA on FHIR, a clinical document is represented as a FHIR Bundle with Bundle.type = "document":

  • Bundle.entry[0] MUST be a Composition Resource: The Composition resource acts as the direct FHIR equivalent of the C-CDA XML header and <structuredBody>. It carries the LOINC document type code (e.g., 34133-9 for a Continuity of Care Document), subject (Patient reference), encounter, author, and attester.
  • Composition.section[] Array: Each C-CDA section (Problems, Medications, Allergies, Results) becomes a Composition.section element containing the section’s LOINC code, the human-readable XHTML narrative table in section.text, and an array of section.entry[] references pointing to the discrete US Core FHIR resources packaged in the remainder of the Bundle.
  • Cross-Paradigm Mapping Specification: In 2023–2024, HL7 expanded this work via the C-CDA to and from US Core Mapping Implementation Guide, providing formal FHIR StructureMap / ConceptMap rules to ensure consistent bidirectional transformation between C-CDA R2.1 templates and US Core STU 6.1.0 profiles.

Four Critical Technical Pitfalls in C-CDA to FHIR Conversion

Engineering a production C-CDA-to-FHIR converter (using tools such as the open-source LinuxForHealth / Microsoft FHIR Converter, Smile CDR, or Rhapsody/Mirth pipelines) requires handling four structural edge cases:

  1. Reconciling Outer Concern Act Status vs. Inner Observation Status: In C-CDA, a Problem Concern Act (...22.4.3) tracks whether a clinician is actively monitoring a concern (active vs. completed), while the nested Problem Observation (...22.4.4) tracks the clinical state of the disease itself. Mapping the outer Concern Act’s statusCode directly to Condition.clinicalStatus without inspecting the inner Problem Observation status observation (2.16.840.1.113883.10.20.22.4.6) frequently misclassifies resolved conditions as active.
  2. Handling RIM Negation (negationInd="true") and NullFlavors: In HL7 v3/C-CDA, stating “No Known Allergies” is encoded by setting negationInd="true" on an Allergy Intolerance Observation with a generic ” propensity to adverse reactions” code. A naive converter that ignores the negationInd XML attribute will invert the clinical meaning and record an active allergy! Compliant converters inspect negationInd="true" and map it to the specific SNOMED CT negated concept (e.g., 716186003 No known allergy) or verificationStatus = "refuted".
  3. Unlinked Narrative Text (<originalText> References): C-CDA entries often omit inline display strings on coded elements and instead use an XPointer reference (<originalText><reference value="#prob-1"/></originalText>) pointing to a <content ID="prob-1"> span inside the section’s XHTML narrative block. A parser must dereference these internal XML IDs to populate CodeableConcept.text in FHIR.
  4. Multi-Document Deduplication and Provenance: When a patient’s record is queried across Carequality or TEFCA, an EHR may receive 15 overlapping C-CDA documents from different hospitals, each repeating the same chronic diagnoses and medications with different local XML <id> values. Post-conversion pipelines must attach a FHIR Provenance resource linking each extracted resource back to its source C-CDA DocumentReference and perform terminology-aware deduplication (matching RxNorm SCD/SBD codes and SNOMED CT hierarchies).

Frequently Asked Questions

What is the difference between C-CDA and FHIR?

C-CDA (Consolidated Clinical Document Architecture) is a document-centric HL7 v3 XML standard that packages a patient’s clinical summary into a single static document snapshot containing mandatory human-readable narrative tables and RIM-based coded entries. FHIR (Fast Healthcare Interoperability Resources) is a modular, API-centric standard that exposes individual clinical data elements (such as Patient, Condition, MedicationRequest, and Observation) as discrete JSON or XML resources over RESTful HTTPS endpoints.

How do you map C-CDA sections (Problems, Medications, Allergies) to FHIR resources?

A C-CDA-to-FHIR converter matches each C-CDA section by its LOINC code and template OID and transforms its nested entries into US Core FHIR R4 resources: the Problems section (LOINC 11450-4, OID 2.16.840.1.113883.10.20.22.2.5.1) maps to FHIR Condition; the Medications section (LOINC 10160-0, OID ...22.2.1.1) maps to MedicationRequest or MedicationStatement; and the Allergies section (LOINC 48765-2, OID ...22.2.6.1) maps to AllergyIntolerance.

What is the HL7 C-CDA on FHIR Implementation Guide?

The HL7 C-CDA on FHIR Implementation Guide (http://hl7.org/fhir/us/ccda) is the official HL7 specification that defines how to represent complete clinical documents (such as Continuity of Care Documents, Discharge Summaries, and Referral Notes) natively in FHIR using a Bundle of type document led by a profiled Composition resource that organizes US Core FHIR resources into standard LOINC-coded document sections.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about C-CDA to FHIR Mapping: C-CDA vs. FHIR Architecture, Section OID & LOINC Crosswalk, and the HL7 C-CDA on FHIR IG

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →