FHIR resources to SDTM-shaped rows
Synthetic data. Not submission-ready. Not a copy of official IG mapping tables. Licensed vocabularies are not republished here.
The problem
An EHR can emit FHIR Patient, AdverseEvent, and Observation resources. A submission-shaped warehouse wants SDTM-like domains. Official joint work exists: the FHIR to CDISC Joint Mapping Implementation Guide maps FHIR R4 to selected CDISC standards (it names SDTMIG 3.2, CDASH 2.1, and LAB 1.0.1). That IG is descriptive — official text says it does not currently define FHIR profiles. Use it. Do not replace it with the table below.
A working example
Conceptual, synthetic alignment (this is not a copy of the IG’s domain tables):
| FHIR (R4, public resource fields) | Illustrative SDTM-shaped landing | Notes |
|---|---|---|
Patient.id |
a subject identifier that will feed USUBJID |
You still have to form a unique, study-scoped identifier. |
Patient.gender |
a source sex value | Recode with official CT; do not invent codes here. |
Patient.birthDate |
a birth-date field | Precision may be year-only in FHIR; do not pad. |
AdverseEvent.occurrenceDateTime |
an onset –DTC-like field | Date-only vs date-time must be preserved. |
AdverseEvent narrative / note |
a verbatim term | Coding to a licensed dictionary is a separate, licensed step. |
Observation.effectiveDateTime + valueQuantity |
a VS- or LB-like finding | The official IG is the place to see which resource paths they chose for vital signs. |
Executed synthetic AE-shaped rows (DuckDB 2.0.0):
- SYN-001, verbatim “mild headache after first dose”, onset
2026-02-14T15:30:00 - SYN-002, verbatim “upset stomach”, onset
2026-02-15(date only)
A FHIR AdverseEvent also has notions (for example actuality) that do not have a one-line SDTM home. Official IG “mapping caveats” pages exist for a reason: EHR visit concepts, terminology systems (often SNOMED CT in FHIR vs other dictionaries in CDISC), and missing paths that would need extensions.
The gotcha
FHIR cardinality is not SDTM cardinality. One Patient may have several identifiers, several names, and several Observation entries per day. Flattening the first element (identifier[0]) quietly drops the others. The same grain problem as sibling array flattens in a warehouse.
Terminology systems differ. Official CDISC RWD material has noted that provider standards and research standards are not automatically harmonized (for example, FHIR data may be coded in one system while a CDISC submission expects another). This site will not invent crosswalks between those systems.
When not to use this
- Do not ship a “FHIR to SDTM” job based only on this page.
- Do not treat a single EHR tenant’s profiles as generic FHIR R4.
- Do not fill SDTM coded fields with FHIR display text.
The synthetic onset/verbatim rows were produced in DuckDB 2.0.0. The pointer to FHIR R4, SDTMIG 3.2, and the descriptive (non-profile) nature of the joint IG is from the official FHIR to CDISC IG. Official mapping tables were not copied.