Phenoml Logo

Map FHIR resources to OMOP CDM v5.4

FHIR2OMOP/create
POST/fhir2omop/create

Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows (person, visit_occurrence, condition_occurrence, drug_exposure, procedure_occurrence, measurement, observation).

Resource support is intentionally limited to the OMOP tables returned by this endpoint:

  • Patient -> person
  • Encounter -> visit_occurrence
  • Condition -> condition_occurrence
  • Procedure -> procedure_occurrence
  • MedicationRequest, MedicationStatement, and MedicationAdministration -> drug_exposure
  • Immunization -> drug_exposure
  • Observation with a numeric valueQuantity, valueInteger, or numeric-looking valueString (for example "<2") -> measurement
  • non-numeric Observation -> observation
  • AllergyIntolerance -> observation

Medication is supported only as reference data for medication resources; it is not emitted as its own row because OMOP CDM has no Medication table. Other reference/admin resources such as Practitioner, Organization, Location, Coverage, and Claim, and clinical workflow/document resources such as DiagnosticReport, ServiceRequest, CarePlan, DocumentReference, Composition, Specimen, and DeviceUseStatement, are currently accepted in a Bundle but are not shaped into OMOP rows. Unsupported resource types are ignored rather than listed under dropped; dropped is reserved for supported resource types that were missing the subject/patient, code, or medication reference data needed to produce a valid row.

Each resource's primary clinical coding is resolved to a standard OMOP concept_id. Alongside the OMOP rows grouped by table (tables), the response carries mappings (how each source coding resolved, linked back to the row it produced), dropped (resources that could not be shaped into a row), vocab_version (the OMOP vocabulary release codes were resolved against), and a small summary of the resolution outcomes.

A concept_id of 0 is reported, not omitted (OMOP "no matching concept" semantics): it covers both a coding with no standard match (UNMAPPED) and an unverified suggestion for a text-only resource (UNCHECKED). Only the primary clinical coding is resolved, so gender/race/ethnicity/visit/value/unit concept_ids are always 0; the one populated non-resolved concept is measurement operator_concept_id, set from a value comparator (<, <=, >, >=) rather than the resolver. Each *_source_value carries the verbatim FHIR coding (system#code), and *_type_concept_id is set to 32817 (EHR).

Medication codes are resolved whether they appear inline (medicationCodeableConcept) or via a medicationReference to a contained, relative (Type/id), or bundle-entry (urn:uuid) Medication resource. Resources that cannot be shaped into a row — a medication with no usable code, resolvable reference, or display, or any clinical resource whose subject/patient reference cannot be tied to a person — are reported under dropped rather than emitted as blank rows. The bundle must contain at least one Patient resource.

Patient, Condition, and a MedicationRequest whose drug code lives in a contained Medication resource.

Input
Result
Success
Operation completed successfully
vocab version: example

Patient

abc-123-def-456

example

10

example

ABC123

Example Name

example

ABC123

Example Name

active

example

Terms of Service|Privacy Policy