Saltar al contenido principal

FHIR to OMOP

Category: Data
Node id: fhir-to-omop

Standards: OMOP-CDM-5.4, EHDS

Transforms FHIR R4 resources into OMOP CDM 5.4 table structures (24 tables, 16 resource types supported). Vocabulary mapping is deferred (concept_id=0, source_value preserved).

What it does​

  • Maps 16 FHIR resource types to 24 OMOP CDM 5.4 tables
  • Deterministic Person ID generation via SHA-256 from FHIR Patient ID
  • Automatic routing of Observations to measurement vs observation tables by category
  • Derived table computation: observation_period, condition_era, drug_era, dose_era
  • Multi-source input support: merges resources from parallel query nodes
  • FHIR Bundle unwrapping with entry-level resource extraction
  • Context cancellation support for large dataset processing

Use cases​

  • Convert EHR FHIR exports into OMOP CDM for observational research
  • Populate OHDSI analytics databases from clinical FHIR data
  • Enable cross-institutional data harmonization using OMOP as common model
  • Support EHDS compliance by transforming FHIR to standardized research format

Runtime​

  • Performance tier: medium
  • Effect: read

Input ports​

NameTypeRequiredDescription
resourcesjsonNoArray of FHIR resources or a FHIR Bundle
datajsonNoAlternative input: array of FHIR resources
bundlejsonNoAlternative input: FHIR Bundle resource

Output ports​

NameTypeRequiredDescription
resultjsonNoOMOP CDM result: omop_tables (24 tables), mapping_stats, unmapped_resources
successbooleanNoWhether all resources were mapped without errors

Errors​

CodeDescription
EMPTY_RESOURCESNo FHIR resources found in any input port
INVALID_RESOURCEInput element is not a valid FHIR resource map
CONTEXT_CANCELLEDProcessing cancelled via context (e.g., timeout)

Runtime notes​

  • result.omop_tables contains 24 tables as arrays of row objects — each table key matches the OMOP CDM 5.4 table name
  • concept_id fields are always 0 (vocabulary mapping deferred) — source_value fields preserve the original FHIR codes
  • Observations with category 'vital-signs' or 'laboratory' route to measurement table; all others go to observation table
  • Accepts FHIR Bundles, resource arrays, or individual resources from any input port — multiple ports are merged

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..