C-CDA R2.1 Documents
Transform C-CDA clinical documents to FHIR R4 bundles with US Core 6.1.0 profiles.
Overview
InteropSuite transforms C-CDA R2.1 documents into validated FHIR R4 bundles. The transformation engine supports 33 section mappers covering all clinical sections defined in C-CDA including Problems, Medications, Allergies, Results, Procedures, and more.
All C-CDA R2.1 clinical sections are mapped to appropriate FHIR resources with US Core profiles. Entry relationships and cross-references are preserved.
View a real CCD document transformation with Composition, Problems, Medications, Allergies, and more.
Supported Document Types
InteropSuite recognizes and processes these C-CDA document types:
| Document Type | LOINC Code | Description |
|---|---|---|
| CCD | 34133-9 | Continuity of Care Document |
| Discharge Summary | 18842-5 | Hospital Discharge Summary |
| Progress Note | 11506-3 | Progress Note |
| Consultation Note | 11488-4 | Consultation Note |
| History & Physical | 34117-2 | History and Physical Note |
| Operative Note | 11504-8 | Operative Note |
| Procedure Note | 28570-0 | Procedure Note |
| Referral Note | 57133-1 | Referral Note |
| Transfer Summary | 18761-7 | Transfer Summary Note |
| Care Plan | 52521-2 | Overall Plan of Care |
| Unstructured | 55107-7 | Unstructured Document |
Supported Sections (33 Mappers)
Core Clinical Sections
| Section | LOINC | FHIR Resources |
|---|---|---|
| Problems | 11450-4 | Condition (us-core-condition) |
| Allergies | 48765-2 | AllergyIntolerance (us-core-allergyintolerance) |
| Medications | 10160-0 | MedicationStatement, MedicationRequest |
| Results | 30954-2 | Observation (us-core-observation-lab), DiagnosticReport |
| Vital Signs | 8716-3 | Observation (us-core-vital-signs) |
| Procedures | 47519-4 | Procedure (us-core-procedure) |
| Immunizations | 11369-6 | Immunization (us-core-immunization) |
| Encounters | 46240-8 | Encounter (us-core-encounter) |
Social & Family History
| Section | LOINC | FHIR Resources |
|---|---|---|
| Social History | 29762-2 | Observation (smokingstatus, alcohol, etc.) |
| Family History | 10157-6 | FamilyMemberHistory |
Assessment & Plan
| Section | LOINC | FHIR Resources |
|---|---|---|
| Assessment | 51848-0 | ClinicalImpression |
| Plan of Treatment | 18776-5 | CarePlan, Goal |
| Goals | 61146-7 | Goal |
| Health Concerns | 75310-3 | Condition (health-concern) |
| Instructions | 69730-0 | Communication |
Administrative Sections
| Section | LOINC | FHIR Resources |
|---|---|---|
| Payers | 48768-6 | Coverage (us-core-coverage) |
| Advance Directives | 42348-3 | Consent |
| Functional Status | 47420-5 | Observation (functional-status) |
| Mental Status | 10190-7 | Observation (cognitive-status) |
| Medical Equipment | 46264-8 | DeviceUseStatement, Device |
| Care Team | 85847-2 | CareTeam (us-core-careteam) |
Additional Sections
| Section | LOINC | FHIR Resources |
|---|---|---|
| Reason for Visit | 29299-5 | Encounter.reasonCode |
| Chief Complaint | 10154-3 | Condition (chief-complaint) |
| History of Present Illness | 10164-2 | DocumentReference (narrative) |
| Review of Systems | 10187-3 | DocumentReference (narrative) |
| Physical Exam | 29545-1 | Observation, DocumentReference |
| Hospital Course | 8648-8 | DocumentReference (narrative) |
| Discharge Diagnosis | 11535-2 | Condition (discharge-diagnosis) |
| Discharge Medications | 10183-2 | MedicationRequest |
Usage
Basic Transformation
// Activate license (once at startup)
Interop.ActivateLicense(licenseKey);
// Read C-CDA document
string cdaXml = File.ReadAllText("ccd.xml");
// Transform to FHIR
var result = await Interop.CDAToFhirAsync(cdaXml);
if (result.Success)
{
string fhirJson = result.FhirBundle;
string docType = result.DetectedFormat; // e.g., "CDA^34133-9"
}
Large File Processing with Progress
For large C-CDA documents (10MB+), use the optional progress reporter to monitor chunked processing:
// Create progress reporter
var progress = new Progress<TransformProgress>(p =>
{
if (p.Phase == TransformPhase.ProcessingChunk)
{
Console.WriteLine($"Chunk {p.CurrentChunk}/{p.TotalChunks} - {p.PercentComplete:F1}%");
}
});
// Transform with progress reporting
var result = await Interop.CDAToFhirAsync(largeCdaXml, progress);
Large CDA files are automatically processed in chunks to prevent memory exhaustion. Each chunk contains up to 3,000 clinical entries.
Batch Processing
Process multiple C-CDA files at once. For mixed workloads, use unified batch processing (recommended).
Unified Processing Recommended
using InteropSuite.Fhir.Engine.Batch;
// Process all formats with RoundRobin interleaving
var options = new BatchOptions
{
Sources = new[]
{
new BatchSource("./input/hl7", "HL7", OutputFormat.UsCore),
new BatchSource("./input/x12", "X12", OutputFormat.UsCore),
new BatchSource("./input/cda", "CDA", OutputFormat.UsCore),
new BatchSource("./input/cms", "CMS-0057-F", OutputFormat.Cms0057F),
}
};
var result = await Interop.ProcessBatchAsync(options);
Sequential Processing
// Process C-CDA files only
var options = new BatchOptions
{
Domain = "CDA",
OutputFormat = OutputFormat.UsCore
};
var result = await Interop.ProcessBatchAsync("./input/cda", options);
Console.WriteLine($"Processed: {result.TotalFiles} files");
Console.WriteLine($"Succeeded: {result.Succeeded}");
See User Guide: Batch Processing for complete documentation.
FHIR Mapping
C-CDA elements map to FHIR resources with US Core profiles:
Header Mapping
| C-CDA Element | FHIR Resource |
|---|---|
| recordTarget/patientRole | Patient (us-core-patient) |
| author | Practitioner, PractitionerRole |
| custodian | Organization (us-core-organization) |
| documentationOf/serviceEvent | Encounter |
| componentOf/encompassingEncounter | Encounter (us-core-encounter) |
| informationRecipient | Practitioner |
| authenticator/legalAuthenticator | Provenance |
Entry Mapping
| C-CDA Template | FHIR Resource | Profile |
|---|---|---|
| Problem Observation | Condition | us-core-condition |
| Allergy Intolerance Observation | AllergyIntolerance | us-core-allergyintolerance |
| Medication Activity | MedicationStatement | - |
| Result Observation | Observation | us-core-observation-lab |
| Vital Sign Observation | Observation | us-core-vital-signs |
| Procedure Activity | Procedure | us-core-procedure |
| Immunization Activity | Immunization | us-core-immunization |
| Encounter Activity | Encounter | us-core-encounter |
| Coverage Activity | Coverage | us-core-coverage |
Examples
C-CDA Header Structure
<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns="urn:hl7-org:v3">
<realmCode code="US"/>
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1" extension="2015-08-01"/>
<templateId root="2.16.840.1.113883.10.20.22.1.2" extension="2015-08-01"/>
<id root="2.16.840.1.113883.19.5.99999.1" extension="TT988"/>
<code code="34133-9" codeSystem="2.16.840.1.113883.6.1"
displayName="Summarization of Episode Note"/>
<title>Community Health Continuity of Care Document</title>
<effectiveTime value="20240115120000-0500"/>
<confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>
<languageCode code="en-US"/>
<recordTarget>
<patientRole>
<id root="2.16.840.1.113883.19.5.99999.2" extension="MRN12345"/>
<patient>
<name><given>John</given><family>Smith</family></name>
<administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1"/>
<birthTime value="19800515"/>
</patient>
</patientRole>
</recordTarget>
...
</ClinicalDocument>
Problems Section Example
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.5.1" extension="2015-08-01"/>
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1"
displayName="Problem List"/>
<title>Problems</title>
<entry typeCode="DRIV">
<act classCode="ACT" moodCode="EVN">
<entryRelationship typeCode="SUBJ">
<observation classCode="OBS" moodCode="EVN">
<code code="55607006" displayName="Problem"
codeSystem="2.16.840.1.113883.6.96"/>
<statusCode code="completed"/>
<effectiveTime>
<low value="20200315"/>
</effectiveTime>
<value xsi:type="CD" code="I10" displayName="Essential Hypertension"
codeSystem="2.16.840.1.113883.6.90"/>
</observation>
</entryRelationship>
</act>
</entry>
</section>
</component>