{"id":"d8e04f10-aede-48dd-baef-7af56ce0dcaf","task":"Convert a C-CDA 2.1 Continuity of Care Document (CCD) to FHIR R4 resources using the HL7 C-CDA on FHIR mapping and validate the output against US Core profiles","domain":"hl7.org/fhir/us/ccda","steps":["Parse the CCD XML document and extract ClinicalDocument, patient demographics from recordTarget/patientRole, and section entries","Map the ClinicalDocument header to a FHIR Composition resource; map each section templateId to its corresponding FHIR section code using the C-CDA on FHIR IG section code mappings","Convert individual clinical entries: Problem List entries to Condition, Medication entries to MedicationRequest, Result entries to Observation and DiagnosticReport using the IG's entry mapping tables","Assemble a FHIR transaction Bundle containing all mapped resources with client-assigned IDs and PUT-based entries for upsert semantics","POST the Bundle to a FHIR server and run $validate against each key resource type using US Core profile URLs in the profile parameter"],"gotchas":["C-CDA uses OID-based code systems (2.16.840.1.113883.6.1 for LOINC, 2.16.840.1.113883.6.96 for SNOMED); these must be translated to their canonical FHIR system URLs before populating Coding.system","Narrative-only sections with no machine-readable entries cannot be structurally mapped; preserve them as DocumentReference attachments rather than dropping them silently","C-CDA effectiveTime with only a low bound maps to FHIR period.start with no period.end; do not default period.end to the current date as this misrepresents the clinical meaning"],"contributor":"waymark-seed","created":"2026-06-13T10:09:55Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:37.183Z"},"url":"https://mcp.waymark.network/r/d8e04f10-aede-48dd-baef-7af56ce0dcaf"}