For developers

C-CDA from TEFCA in, FHIR resources out.

Yes, there is an API that converts C-CDA documents from TEFCA into FHIR resources. Flexpa retrieves a patient's records through TEFCA Individual Access Services after they verify their identity in Flexpa Consent, then converts each C-CDA document into Condition, MedicationRequest, AllergyIntolerance, Observation, Immunization and Procedure resources using the C-CDA on FHIR mappings. Your app queries them through the Flexpa FHIR API next to the rest of the patient's data. Each source DocumentReference keeps the original C-CDA and is tagged with the outcome, and a Provenance record links the derived resources to it.

Updated 2026-12-03

How it works

  1. Patient verifies identity
    TEFCA Individual Access Services
  2. C-CDA documents
    stored as DocumentReference
  3. FHIR resources
    plus Provenance
The original C-CDA stays attached to its DocumentReference, so nothing is replaced.

What comes out

Flexpa converts these C-CDA sections. Sections the converter does not support are skipped, not failed.

C-CDA sectionFHIR resource
ProblemsCondition
MedicationsMedicationRequest
AllergiesAllergyIntolerance
ResultsObservation
ImmunizationsImmunization
ProceduresProcedure

Check what was converted

transformed
The C-CDA document was converted into FHIR resources.
fhir-inlined
The document arrived as a FHIR Bundle already, and its resources were inlined.
not-ccda and not-transformed
Nothing was converted from this document. Read the original attachment.
Provenance
Search Provenance with target set to a resource, such as Condition/{id}, to trace it back to the DocumentReference it came from.

Good to know

  • Conversion runs on the C-CDA documents Flexpa retrieves through TEFCA. Without the add-on, you receive the original document attached to a DocumentReference and parse it yourself.
  • The C-CDA on FHIR guide targets about 80% coverage of common content. Keep the original document for anything the conversion does not carry over.
  • Your app does not need to become a QHIN. Flexpa is a request-only IAS Provider, and results depend on network participation and matching records.
  • When a person needs to read the same documents, Patient $pdf renders them as a PDF.
  • C-CDA to FHIR conversion is included in the Scale, Omni and Infrastructure plans. On Startup and Growth, it is $5,000 a year.

Example

Requestbash
# Clinical documents from TEFCA, with the original C-CDA attached
curl 'https://api.flexpa.com/fhir/DocumentReference' \
  -H "Authorization: Bearer $ACCESS_TOKEN"

# Conditions, including those converted from C-CDA
curl 'https://api.flexpa.com/fhir/Condition' \
  -H "Authorization: Bearer $ACCESS_TOKEN"

# Trace one Condition back to its source document
curl "https://api.flexpa.com/fhir/Provenance?target=Condition/$CONDITION_ID" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Questions

Is there an API that converts C-CDA documents from TEFCA into FHIR resources?

Yes. Flexpa retrieves a patient's records through TEFCA Individual Access Services after they verify their identity in Flexpa Consent, then converts each C-CDA document into FHIR resources such as Condition, MedicationRequest, AllergyIntolerance, Observation, Immunization and Procedure using the C-CDA on FHIR mappings. Your app queries them through the Flexpa FHIR API with the patient access token. The source DocumentReference keeps the original C-CDA and is tagged with the outcome, and a Provenance record links each derived resource to it.

Does my app need to become a QHIN to get TEFCA documents?

No. Flexpa is a request-only IAS Provider that connects through the Kno2 and CommonWell QHINs. Your app integrates Flexpa Consent for identity verification and authorization, then uses the Flexpa FHIR API.

Is anything lost in conversion?

The C-CDA on FHIR guide aims for about 80% coverage, so some local or unusual content may not carry over. The original document is kept on the DocumentReference.

Can I convert C-CDA files I already have from another source?

Flexpa's conversion runs on the C-CDA documents it retrieves through TEFCA. For files from other sources, the DocumentReference docs list open-source libraries that implement the C-CDA on FHIR mappings.

Which Flexpa plans include C-CDA to FHIR conversion?

It is included in the Scale, Omni and Infrastructure plans. On Startup and Growth, it is $5,000 a year.

More

See a TEFCA record as FHIR.

Connect a sandbox patient in the demo and see the structured record that comes out of it.

Try the interactive demo