Map FHIR resources to OMOP CDM v5.4
/fhir2omop/createMaps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows,
grouped by destination table in tables.
Set vocab_version to select the OMOP vocabulary release used for coded
concept resolution. If omitted or empty, the API uses its default
release. The response's vocab_version, when present, identifies the
release used. Specify a release explicitly when reproducibility matters.
Standards basis: FHIR R4 (v4.0.1) defines the accepted source elements and OMOP CDM v5.4 defines the output columns. The published Vulcan FHIR-to-OMOP IG v1.0.0 is an informative FHIR R5 baseline; this endpoint documents and implements the equivalent R4 source elements, rather than accepting R5-only fields.
This response is a mapping result, not a complete CDM load pipeline.
When a source cannot supply a field that CDM v5.4 requires, the row is
still returned with that field unset; the value is not inferred. Common
cases are year_of_birth without a usable birthDate,
drug_exposure_end_date without an explicit end or single-event timing,
and a required event date (such as condition_start_date,
procedure_date, or death_date) whose source has no timing with at
least day precision. Apply your own policy to such rows before loading
them into a strictly conformant CDM instance.
Current resource coverage:
Patient->person;deceased[x]can also producedeath, the first address can producelocation, and more than one supplied race producesobservationrace rows (see Patient demographics below)observation_period-> one request-local derived row per person, spanning dates from that person's visit, clinical, and death records, including source end dates even when the output table has no end column; this is not enrollment or capture-completeness evidenceLocation->locationandcare_siteOrganization->care_site; its first address can producelocationHealthcareService->care_sitePractitionerandPractitionerRole->providerEncounter->visit_occurrenceSpecimen->specimen, with an explicit Patient subject; missing collection date or material retains a partial row with diagnosticsCondition-> domain-selected clinical table; defaultcondition_occurrenceProcedure-> domain-selected clinical table; defaultprocedure_occurrenceMedicationRequest,MedicationStatement, andMedicationAdministration-> domain-selected clinical table; defaultdrug_exposureImmunization-> domain-selected clinical table; defaultdrug_exposureObservation-> domain-selected clinical table. Numeric values prefermeasurementand other values preferobservationwhen the code is valid for both tables. For text-only Observations, numeric values route tomeasurementand nonnumeric values toobservation.AllergyIntolerance-> domain-selected clinical table excludingdrug_exposure; defaultobservation
Clinical placement follows the informative Vulcan IG's vocabulary-driven
domain assignment. Supported destinations are condition_occurrence,
procedure_occurrence, drug_exposure, measurement, and observation.
Coded clinical records are returned in the table corresponding to the
domain of their mapped OMOP standard concept. The source resource
determines eligibility, field values, and the default table when no
supported mapping is available.
Allergy substance codes must not create drug exposures.
For example, a Condition coded with ICD10CM Z79.4 can produce a mapped
observation row. Z86.73 and ICD-O-3 8140/3 also map to concepts in
the Observation domain. Use mappings.omop_table and mappings.omop_id
to locate each result; the FHIR resource type alone does not determine
the output table.
Clinical rows include available person/visit/provider links, concept and
source concept IDs, source value, source type provenance, and start
timing. Dates follow the source resource's timing rules below, regardless
of the output table. For example, a Condition follows its
onset[x] / recordedDate timing rule even when returned as an
observation. End dates are populated only in tables with end columns;
they also contribute to the request-local observation period when the
output table has no end column.
Source-specific fields are populated only for the corresponding source
and destination: Condition status in condition_occurrence, medication
dosage/supply and Immunization lot details in drug_exposure, and
Observation values/units/ranges in measurement or observation where
those columns exist. Mapping notes explain the output table and which
fields are populated. Coded medication/immunization routes on rows outside
drug_exposure, and Observation values on rows outside measurement /
observation, are retained in mappings linked to the output row, with
omop_field omitted and selected: false. Coded routes are checked
against the OMOP Route domain; those Observation values are preserved
without concept resolution.
Device and Note destinations are unsupported. If no standard concept
valid for a supported destination is found, the resource produces a row
in its default table with concept and source concept IDs of 0 and
UNMAPPED status. A DOMAIN_MISMATCH outcome is identified in the mapping
note. For example, a Procedure coded with HCPCS C5271 produces a partial
procedure_occurrence row because its mapped domain is Device. Text-only
inputs use their default tables. A resource produces one clinical row
even when its code has multiple vocabulary mapping targets. Vocabulary
Maps to value mappings are not applied.
Medication is reference data for medication resources; it does not
create its own row because OMOP CDM has no Medication table. Administrative
linkages (provider, care site, and location) are best-effort and limited to
references supplied in the request. Patient.managingOrganization is a
record custodian, not a care-delivery site. Provider specialty is not
mapped. Recorded Practitioner.gender is distinct from Person
demographics: male and female resolve to validated OMOP Gender
concepts in provider.gender_concept_id; other, unknown, and absent
gender remain unmapped. Address.country is resolved to location.country_concept_id,
and CMS Place of Service codings in Location.type are resolved to
care_site.place_of_service_concept_id.
Within one request, Practitioners with the same single distinct non-empty
NPI under http://hl7.org/fhir/sid/us-npi merge into one provider row only
when all supplied mapped identity attributes in the entire NPI group agree.
This includes Practitioners contained in valid role references. System and
value matches are exact; other identifier systems and names do not trigger
a merge. Missing attributes can enrich a compatible merged row.
Compatibility compares the name rendered from each Practitioner's first
name entry, its gender, its first non-empty DEA identifier, and its parsed
birth year. Differences in birth month/day within one year do not conflict.
Rendered names are compared exactly: Jane Smith and Dr. Jane Smith
conflict even when they share an NPI.
If any of these attributes conflict, every resource in that NPI group stays
separate, including resources missing the conflicting attribute. Source
attributes and unambiguous structural reference links are preserved; no
conflicting value is selected. Each affected row has CONFLICTING
diagnostics at name, gender, identifier, or birthDate, linked by
omop_table: provider and omop_id. All source gender mappings link to
their retained or merged provider row.
Repeated copies of one NPI on a resource are allowed. A resource with
multiple distinct NPIs stays separate, leaves npi unset, preserves its
source-resource identity in provider_source_value, and reports a
CONFLICTING diagnostic at identifier linked by
omop_table: provider and omop_id.
Row IDs are per response. The API does not merge across requests. For a
Practitioner with one NPI, provider_source_value is that NPI, even when
its group conflicts. Consumers can use it to deduplicate compatible
providers across requests, but must preserve rows flagged by identity
conflict diagnostics and check compatibility across responses. Without
one unambiguous NPI, source-resource identity is preserved without a
person-level deduplication guarantee.
A PractitionerRole that identifies one supplied Practitioner aliases
that canonical provider: by a top-level structural reference, a
parent-contained #id reference, or an exact identifier.system and
identifier.value match against a top-level Practitioner. No remote
identifier lookup is performed. When Reference.type is present it must
be Practitioner; duplicate contained IDs and identifier matches to
different canonical providers are ambiguous. An explicit reference that
is unresolved, ambiguous, or unsupported retains a role-fallback provider
row and is returned in diagnostics. provider_role_contexts preserves role-specific
specialty and care-site context that a canonical OMOP provider row cannot
represent together.
Patient demographics:
- Sex at birth, race, and ethnicity are read from these US Core
extensions, with their US Core 6.1.0 structures and value sets, on
any Patient (US Core profile conformance is not required). Sex at
birth falls back to Patient
gender. Other extensions, including US Core sex and gender identity, are ignored.- Birth sex:
http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex(valueCodefromhttp://hl7.org/fhir/us/core/ValueSet/birthsex) - Race:
http://hl7.org/fhir/us/core/StructureDefinition/us-core-race(ombCategoryfromhttp://hl7.org/fhir/us/core/ValueSet/omb-race-category) - Ethnicity:
http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity(ombCategoryfromhttp://hl7.org/fhir/us/core/ValueSet/omb-ethnicity-category)
- Birth sex:
gender_concept_idis sex at birth. A supplied birth sex always decides it:MandFare resolved;UNK,ASKU,OTH, a code outside the value set, conflicting values, and a birth sex withoutvalueCodeleave it0, and Patientgenderis not used.- Without a birth sex, Patient
gendermaleorfemaleis resolved under the OMOP convention that the supplied gender represents sex at birth;otherandunknownkeep concept0. gender_source_valueis the chosen source code (Ffor birth sex,femalefor Patientgender).- Each race category is resolved separately, and null flavors (
UNK,ASKU) are ignored. One distinct standard race setsrace_concept_id. More than one sets it to1546847(More than one race) and adds oneobservationrow per race, withobservation_concept_id4013886(Race), the race invalue_as_concept_id,observation_type_concept_id32817, the category code invalue_source_value, and noobservation_source_valueorobservation_date. A loading pipeline that requiresobservation_datemust apply its own date policy. - The single non-null ethnicity category is resolved, and null flavors
are ignored; more than one distinct category leaves
ethnicity_concept_id0. Ethnicity is not derived from race, and no demographic is inferred from names, addresses, or other extensions. race_source_valueandethnicity_source_valuelist every supplied category and detailed code in source order, joined with|, or the extension text when no code is supplied. Detailed codes and text are not resolved.- Every supplied birth sex, gender, and OMB category code has a
mappingsentry whosenotenames its source and outcome. When a birth sex is supplied, Patientgenderis reported unselected with the noteFHIR administrative gender; not used, birth sex supplied. Conflicting values and a birth sex withoutvalueCodeare also returned indiagnosticswith pathextension:birthsexorextension:ethnicity.summarycounts each demographic field once, as described underSummary. - Differences from the reference conventions: Vulcan's example gender
ConceptMap maps
otherandunknownto concepts, which stay0here; more than one race follows the OHDSI THEMIS convention, also used by Vulcan, rather than the CDM 5.4 note that mixed races use0; and Vulcan's suggestedobservationrows for multiple ethnicities are not produced.
Specimen produces a specimen row only with an explicitly resolvable
top-level Patient subject. Missing collection dates or material retain
useful partial rows with linked diagnostics; those rows may require
downstream completion before loading into a strict CDM instance.
References support Patient/id and exact Bundle
fullUrl matches (including URNs and absolute URLs); contained, logical,
display-only, missing, non-Patient, and unresolved subjects never use the
sole Patient fallback. Reference.type, when supplied, must identify Patient.
Unsafe patient attribution and ineligible status drop only that Specimen
with dropped and diagnostics; a missing Patient in the entire request
remains a 400. Missing material is concept ID 0 with a type diagnostic
and no terminology mapping/summary count. Supplied unmapped material is
also 0, with its separate vocabulary mapping outcome and retained source code.
Material (type) resolves against the Specimen domain, coded UCUM
collection quantity units against Unit, and collection.bodySite against
Spec Anatomic Site. Supplied unmapped optional concepts are 0; absent
unit and site IDs are explicit null. Text-only body sites preserve their
source text with site concept ID 0 and an UNMAPPED mapping; they do not
produce a text-based concept suggestion. Text-only material can produce
an UNCHECKED suggestion with material concept ID 0.
Numeric quantity is copied without
unit conversion; invalid or comparator-bearing quantities are omitted
with diagnostics without dropping the row. Missing optional data is allowed.
Collection time uses collection.collectedDateTime or
collection.collectedPeriod.start; end-only, partial, invalid, and absent
dates leave specimen_date/specimen_datetime omitted with linked diagnostics.
Both collected forms together are conflicting: retain the row without
selecting a date. Period end and receivedTime never substitute for collection
start. specimen_source_contexts.collection_timing preserves raw dateTime,
Period boundaries, receivedTime, and the selected source path when a date
is populated, including partial precision and original timezone offsets.
specimen_collection_date_missing, specimen_collection_date_partial, and
specimen_collection_date_unusable distinguish absent, partial, and invalid
source dates; specimen_collection_multiple_forms reports conflicting choices.
specimen_type_concept_id: 32817 is EHR provenance, independent of material
and availability. Status absent/available/unavailable/unsatisfactory is
supported; entered-in-error and unrecognized statuses drop the specimen.
specimen_source_contexts.status preserves the supplied availability
status for emitted rows; it is omitted when no status was supplied.
Disease status is not inferred. Source identity precedence is resource id,
then first identifier with a nonempty value in source array order, then
accessionIdentifier.value, then Bundle fullUrl. No identity is fabricated;
specimen_source_contexts preserves all valued identifier system/value
pairs, accession identity, resource id/fullUrl, and the selected source path.
Parent/derived specimens emit independently when each has its own Patient;
missing date/material remains partial rather than being inherited. Parent
and Measurement-to-Specimen links are not represented. Consuming CDM
loaders own required-date completion, durable IDs, and dataset completeness.
Source baseline is FHIR R4 4.0.1, with supported common fields reviewed against
US Core Specimen 7.0.0; full profile conformance is not validated here.
DiagnosticReport, ServiceRequest, CarePlan, DocumentReference,
Composition, DeviceUseStatement, Coverage, Claim, and
other unsupported resource types are accepted in a Bundle but ignored: they
create no row and no dropped entry. dropped is reserved for supported
row-producing resources that cannot safely produce a positive OMOP row:
required subject/patient, clinical code/text, or medication data may be
unusable, or the resource may explicitly negate or fail the documented
clinical-event eligibility policy. A single-Patient Bundle uses the sole
Patient only when subject/patient is absent. An explicit subject/patient
reference that is unresolved, ambiguous, or unsupported drops the clinical
resource in every request scope.
Eligibility distinguishes clinical validity, performed/taken evidence, and
administrative workflow state. Entered-in-error and explicitly
non-performed events never produce a positive clinical-event row, and
an unrecognized required status fails closed. Condition
requires absent or confirmed canonical-HL7 verificationStatus; clinical course is not a
diagnosis-role mapping. Procedures accept completed or stopped events.
Medication requests are prescription evidence only: doNotPerform, drafts,
cancellations, and non-authorizing intents are dropped. Medication statements
accept active, completed, stopped, or on-hold reported use; administrations
accept completed, in-progress, on-hold, or stopped events. An on-hold
administration also needs an effectiveDateTime or effectivePeriod.start
that supplies start evidence; a valid partial date remains an undated row.
An on-hold administration is started evidence that is temporarily paused and
expected to continue. Immunizations require completed
status. Observations require final,
amended, or corrected status; registered,
preliminary, cancelled, entered-in-error, unknown, and missing statuses are
dropped. AllergyIntolerance accepts absent, unconfirmed, or confirmed canonical-HL7
verificationStatus as a reported allergy, but drops refuted,
entered-in-error, and unreadable supplied verification statuses. Encounter
accepts arrived, triaged, in-progress, onleave, or finished status, but drops
planned, cancelled, entered-in-error, unknown, and missing statuses. An eligible
encounter without Period.end remains a partial visit; no end date is invented.
The mapped OMOP concept's domain determines the clinical output table.
For Observations, numeric and nonnumeric value[x] forms determine the
preferred table only when the code is valid for both measurement and
observation. Text-only Observations produce measurement rows for
numeric values and observation rows for other values. In these two
tables, numeric values populate value_as_number; other non-coded values
populate value_as_string for an observation or value_source_value
for a measurement. Coded valueCodeableConcept values are resolved
against value_as_concept_id in these tables and use the selected
bare code in value_source_value, leaving an observation's
value_as_string empty; unmapped or target-invalid coded values remain
0. Active standard concepts from any OMOP domain are valid for
value_as_concept_id per CDM 5.4. For example, a blood-culture Measurement
can record Staphylococcus aureus as its coded result, even though the
organism concept belongs to OMOP's Observation domain.
For other clinical output tables, Observation values are retained only
in mappings, without concept resolution or an omop_field, and with
selected: false.
Other unsupported value[x] forms and Observation components do not
populate separate converted values. A
numeric comparator (<, <=, >, >=) is represented only by a
measurement's operator_concept_id.
For Observations returned as measurement or observation rows,
Quantity units resolve independently against the table's
unit_concept_id. Other clinical output tables have no unit columns;
their units are not resolved or included as separate mapping outcomes.
Only coded UCUM (http://unitsofmeasure.org or its
OID 2.16.840.1.113883.6.8, bare or urn:oid:) is supported. Codes are
case-sensitive: no spelling aliases, text-only guesses, or numeric
conversion are applied. Coded UCUM units map to valid standard OMOP
Unit concepts using the release selected by vocab_version (default
v20260227 when omitted or empty). Mappings are direct or follow an
active OMOP Maps to relationship; UCUM units do not use a UMLS bridge.
Unknown codes,
vocabulary gaps, text-only units, missing coding, and unsupported
systems keep the row and use 0; absent units use JSON null (the
field is present). Explicit dimensionless code 1 is a supplied unit
and resolves or remains 0; it is never treated as absent.
unit_source_value contains Quantity.code when supplied, otherwise
Quantity.unit. A separate unit mappings entry preserves the original
Quantity.system/code in source_system/source_code and the exact
human-readable Quantity.unit in source_name, with its own outcome.
Quantity.unit provides display text and does not affect unit matching.
Measurement also returns nullable unit_source_concept_id, identifying
the OMOP source concept for Quantity.system/code when available,
otherwise 0 for a supplied unit.
Observation has no such column. Resolving a unit does not change
numeric values, comparators, or reference ranges.
Supported coded UCUM units include resolution in their mappings,
whether the unit resolves or remains unmapped:
its outcome and reason code distinguish vocabulary gaps, target-domain
mismatches, and ambiguity. Unresolved or ambiguous units retain the row
with concept ID 0. Resolved mappings retain the selected concept's
direct or crosswalk provenance. Text-only units, units with missing
coding, and unsupported unit systems omit resolution; their note
explains the unmapped outcome.
Compatibility: absent unit_concept_id values previously returned 0
and now return null. Coded units use their code in unit_source_value
rather than their human-readable text; the text remains in mappings.
The Measurement unit_source_concept_id field is new.
A standard OMOP concept_id is selected for each eligible primary clinical coding
after considering all of the resource's supplied codings. An unambiguous
coded medication or immunization route is checked independently against
the OMOP Route domain. For drug_exposure rows, route_concept_id
contains the resolved concept ID, or 0 if unmapped; for other output
tables the route is reported only in
mappings, without omop_field and with selected: false.
Alongside the OMOP rows grouped by
table (tables), the response carries mappings (an entry for every
supported source coding from a resource that shaped a row, linked back to
that row; some, such
as demographic null flavors, are reported without being resolved),
provider_role_contexts (source role details linked to provider rows),
dropped (resources that could not be shaped into a row),
diagnostics (explicit references that could not safely create a link,
conflicting Practitioner identity attributes, conflicting or unsupported
Patient demographic extensions, and conflicting Encounter classifications),
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). Supported Encounter.class or Encounter.type values
may populate visit_concept_id. Person demographics and Provider
recorded gender follow the policies above.
Coded Observation values may populate value_as_concept_id.
Measurement operator_concept_id represents a value comparator (<,
<=, >, >=); multiple-race concepts follow the conventions described
above. Clinical *_source_value fields contain the selected FHIR code
(or source text for text-only resources).
The corresponding selected mappings entry preserves the coding system
and full source-coding provenance.
Known OID-form coding systems are accepted as either FHIR OID URNs (for
example, urn:oid:2.16.840.1.113883.6.1 for LOINC) or bare OIDs, and
produce the same mappings as their canonical system URLs. Coding
mappings report that canonical URL in source_system; Quantity unit
mappings preserve the original Quantity.system, including OID spelling.
An unknown OID remains unchanged in source_system and may be
UNMAPPED.
Other *_source_value fields preserve row-specific raw source values,
such as resource identifiers, names, units, or status codes.
MedicationRequest uses 32838 (EHR prescription) for
drug_type_concept_id; other current resources use 32817 (EHR). This
is a coarse provenance policy: it does not infer patient-reported,
medication-history, or other more-specific type concepts from FHIR
status fields.
Dates and datetimes:
- A
*_dateis the calendar date (YYYY-MM-DD) of a source value with at least day precision. A*_datetimeis set only when that value has a time of day, as local time without a UTC offset (YYYY-MM-DDTHH:MM:SS, with fractional seconds to microseconds when supplied):2024-01-15T23:30:00-05:00becomes2024-01-15T23:30:00. A datetime without a timezone is read as local time. - A partial date (
2024or2024-03) leaves both columns unset. It still counts as that source's value, so later sources in the list below are not used. - Free-text timing (such as
onsetString),AgeandRangeforms, and values that are not dates are ignored, so a later source in the list is used if there is one. - Other than the sources below and the same-day ends of single-event medication records, no date is imputed: partial dates are not completed, and a row is not dated from another resource such as its Encounter.
- Valid date values never cause a request to be rejected, and the response reports unusable date elements for Specimen while retaining the partial row for downstream load completion. Other rows do not report which date elements were unusable. An on-hold MedicationAdministration is an eligibility exception: it needs a supplied effective start as evidence that administration began.
Timing sources, in priority order where several are listed. These rules
apply regardless of the clinical output table; end dates are populated
only where the table has an end column, and verbatim_end_date is set
only for medication resources returned as drug_exposure rows:
Patient:birthDatesetsyear_of_birth,month_of_birth, andday_of_birthfrom the parts it supplies;birth_datetimeis not set.deceasedDateTimesets thedeathdates.Practitioner:birthDatesets the provider'syear_of_birth.Encounter:period.startandperiod.end.Condition: start fromonsetDateTimeoronsetPeriod.start, thenrecordedDate(when the condition was recorded, not when it began); end fromabatementDateTimeorabatementPeriod.end.Procedure: start fromperformedDateTimeorperformedPeriod.start; end fromperformedPeriod.endonly.Specimen:collection.collectedDateTimeorcollection.collectedPeriod.start; missing day precision retains an undated specimen with diagnostics.Observation:effectiveDateTime,effectivePeriod.start, oreffectiveInstant.AllergyIntolerance:recordedDate, thenonsetDateTimeoronsetPeriod.start.MedicationStatement: start fromeffectiveDateTimeoreffectivePeriod.start; end andverbatim_end_datefromeffectivePeriod.end.dateAssertedrecords when the statement was made and is not used.MedicationAdministration: aneffectiveDateTimeis a single event that sets both start and end; aneffectivePeriodsets the start and, when present, the end andverbatim_end_date.Immunization:occurrenceDateTimeis a single event that sets both start and end;expirationDateis not used.MedicationRequest:authoredOn, the order date, sets the start; it is not evidence of administration. No end is set, and the validity period is not used as an exposure duration.- Differences from the Vulcan maps:
birth_datetimeis not set frombirthDate, Condition also readsonsetPeriod.start, and AllergyIntolerance falls back to its onset whenrecordedDateis missing.
Medication details for resources returned as drug_exposure rows:
- For
MedicationRequest,dispenseRequest.numberOfRepeatsAllowedsetsrefillsand a whole-dayexpectedSupplyDurationsetsdays_supply. - All non-empty dosage text is preserved in
sig. - Coded dosage routes and
Immunization.routeare target-validated in the OMOP Route domain. Conflicting routes are left unset; route codings shared by every dosage instruction identify the same route. Immunization.lotNumberis preserved inlot_number.
Encounter details:
-
Encounter classifications must supply both
Coding.systemandCoding.codeto map to a standard OMOP Visit concept. For HL7 encounter class codes with systemhttp://terminology.hl7.org/CodeSystem/v3-ActCodeorhttp://hl7.org/fhir/v3/ActCode, the supported mappings are:IMP(inpatient encounter) -> 9201 (Inpatient Visit)AMB(ambulatory encounter) -> 9202 (Outpatient Visit)EMER(emergency encounter) -> 9203 (Emergency Room Visit)VR(virtual encounter) -> 722455 (Telehealth)HH(home health encounter) -> 581476 (Home Visit)
OBSENC(observation encounter) has no direct class mapping. Other class or type codes can be used when they have a valid standard OMOP Visit mapping in the selected vocabulary release. Unsupported classifications retainvisit_concept_idof0unless a supported type supplies the Visit as described below; they never default to outpatient. -
A mapped
Encounter.classdeterminesvisit_concept_id. A mapped type that disagrees with it produces aCONFLICTINGdiagnostic with pathclass/type, while the class mapping remains selected. If class is missing or unmapped, type supplies the Visit only when all mapped type classifications agree on the same standard Visit concept. Codings within one type CodeableConcept are alternative encodings of that classification. When separate type classifications map to different Visit concepts, no type is selected,visit_concept_idremains0, and aCONFLICTINGdiagnostic has pathtype. -
visit_source_valuecontains the selected class or type code;mappingspreserves its coding system and identifies which classification was selected.visit_source_concept_ididentifies the selected original source coding's OMOP concept when available, and is0otherwise, including for the HL7 encounter class codes listed above. Each eligible Encounter produces one Visit;classHistory,partOf, and admission/discharge concepts are not mapped.
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.
A reference that resolves to another resource type is dropped even when it
supplies display text; an unresolved or display-only reference may use
its display as text-only medication input.
Resources that cannot be shaped into a row — a medication with no usable
code, resolvable reference, or display; any clinical resource whose
subject/patient reference cannot be tied to a person; or an event excluded
by eligibility — are reported under dropped rather than emitted as blank
rows. The Bundle must contain at least one Patient resource.
Structural references resolve only to top-level resources supplied in the
request, by Type/id or an exactly matching Bundle fullUrl (including
urn:uuid). Contained references are supported for medication code lookup
and PractitionerRole.practitioner enrichment; the latter also supports
exact request-local identifier matching without a remote lookup. Every
nonzero structural foreign key targets a row in the same response. Missing
optional links remain unset without a diagnostic; an explicit optional
reference that is unresolved, ambiguous, conflicting with the row's
person, or unsupported remains unset and is returned in diagnostics
with its source path and outcome.
All row IDs start at 1 for each request and are not stable or global.
For clinical conversion rows whose resource supplies an id, mappings
associates each row with that source FHIR resource ID. A person row
retains the Patient ID or its first identifier value in
person_source_value, when present; other reference and derived rows do
not uniformly carry a FHIR resource ID. Input resources without those
source identifiers cannot be correlated across responses from the
returned rows alone. Consumers combining responses need to establish
their own stable keys and remap every primary and foreign key together.
Body parameters
OMOP vocabulary release to use for coded concept resolution. If
omitted or empty, the API uses its default release (v20260829).
Specify a release explicitly when reproducibility matters. The response's
vocab_version, when present, identifies the release used.
FHIR resources (single resource or Bundle). Must contain at least one Patient resource. Supported row-producing resources are Patient, Location, Organization, HealthcareService, Practitioner, PractitionerRole, Encounter, Specimen, Condition, Procedure, MedicationRequest, MedicationStatement, MedicationAdministration, Immunization, Observation, and AllergyIntolerance. Standalone Medication resources are consumed by medication references rather than mapped to their own table. Unsupported resource types are accepted in a Bundle but ignored.
FHIR resources mapped to OMOP CDM v5.4
Response fields
OMOP CDM v5.4 rows grouped by destination table. IDs are sequential and
scoped to one response; they are not stable keys across requests.
Fields with no value are unset (omitted from the row), except concept
IDs reported as 0. Each *_datetime comes from the same source as its
*_date and is set only when that source has a time of day.
Single distinct non-empty source NPI. Omitted when the Practitioner has multiple distinct NPIs.
Year from Practitioner.birthDate.
For recorded Practitioner.gender, male and female resolve to validated OMOP Gender concepts. other, unknown, and absent values remain 0.
The single distinct source NPI, when present. Compatible providers
can use this value as a cross-request deduplication key; row IDs are
per response, and the API does not merge across requests. Conflicting
NPI groups retain separate rows sharing this value. Preserve rows
flagged by identity diagnostics using omop_table: provider and
omop_id, and check identity compatibility across responses before
deduplicating.
Without one unambiguous NPI, this is the source practitioner identity.
Multiple distinct NPIs leave npi unset and use the resource ID,
full URL, or an explicitly marked response-local provider ordinal
such as @provider-index:1 when neither is supplied.
A Practitioner contained by a PractitionerRole without one unambiguous
NPI is scoped as PractitionerRole/<role-source-value>#<contained-id>
so identical local contained IDs do not collide; an id-less parent
uses an explicitly marked response-local role ordinal such as
@role-index:1.
The recorded FHIR administrative-gender value for this Provider.
Remains 0 because FHIR administrative-gender codes do not themselves identify OMOP source concepts.
Standard OMOP Gender concept for sex at birth, from US Core birth sex when supplied, otherwise from Patient gender male or female. 0 for absent, unknown, other, unsupported, or conflicting values.
Year from Patient.birthDate.
Month from Patient.birthDate, when it supplies one.
Day from Patient.birthDate, when it supplies one.
Not set; Patient.birthDate has no time of day.
Standard OMOP Race concept from a US Core race OMB category; 1546847 (More than one race) when more than one distinct race resolves, with each race in an observation row. 0 when no category resolves.
Standard OMOP Ethnicity concept from the US Core ethnicity OMB category. 0 when absent, unresolved, or conflicting; never derived from race.
The selected sex-at-birth source code: the US Core birth sex valueCode, or Patient gender when no birth sex is supplied. Conflicting birth sex values are joined with |; empty when the birth sex has no valueCode.
OMOP source concept of the selected sex-at-birth code, when that code is itself an OMOP source concept; 0 otherwise, as for FHIR administrative gender codes.
Every supplied US Core race category and detailed code, joined with | in source order, or the extension text when no code is supplied.
OMOP source concept of a single resolved race code, when that code is itself an OMOP source concept; 0 otherwise, including when more than one race resolves.
Every supplied US Core ethnicity category and detailed code, joined with | in source order, or the extension text when no code is supplied.
OMOP source concept of the resolved ethnicity code, when that code is itself an OMOP source concept; 0 otherwise.
Date from Patient.deceasedDateTime; unset for a boolean-only or partial value.
Earliest date selected by the source timing rules from the person's visit, clinical, and death records in this request; not enrollment evidence.
Latest date selected by the source timing rules from the person's visit, clinical, and death records in this request, including source end dates even when the output table has no end column; not enrollment evidence.
Date from Encounter.period.start.
Date from Encounter.period.end.
OMOP source concept for the selected Encounter.class or Encounter.type coding when available; 0 when the source coding has no OMOP source concept, including the HL7 encounter class codes listed above.
Start date selected by the source resource's timing rules. For a Condition, onsetDateTime or onsetPeriod.start, otherwise recordedDate; see the endpoint's timing sources for other resources.
End date selected by the source resource's timing rules, when available. For a Condition, abatementDateTime or abatementPeriod.end; see the endpoint's timing sources for other resources.
Start date selected by the source resource's timing rules, such as effective[x], occurrenceDateTime, or MedicationRequest.authoredOn; see the endpoint's timing sources for all supported resources.
End date selected by the source resource's timing rules, when available. For medication resources, an explicit effectivePeriod.end or the start date of a single-event administration or immunization; see the endpoint's timing sources for other resources.
Date from an explicit FHIR Period.end only; inferred same-day ends are not verbatim source values.
Direct MedicationRequest.dispenseRequest.numberOfRepeatsAllowed value, when supplied.
Direct positive whole-day MedicationRequest.dispenseRequest.expectedSupplyDuration; no dose or quantity conversion is applied.
Newline-joined non-empty FHIR Dosage.text instructions in source order.
Target-valid OMOP Route concept for an unambiguous coded FHIR route; 0 for an unmapped coded route, omitted for absent, text-only, or conflicting routes.
Direct FHIR R4 Immunization.lotNumber value.
Selected source coding or text for an unambiguous FHIR route.
Start date selected by the source resource's timing rules. For a Procedure, performedDateTime or performedPeriod.start; see the endpoint's timing sources for other resources.
End date selected by the source resource's timing rules, when available. For a Procedure, performedPeriod.end; see the endpoint's timing sources for other resources.
Start date selected by the source resource's timing rules. For an Observation, effectiveDateTime, effectivePeriod.start, or effectiveInstant; see the endpoint's timing sources for other resources.
OMOP "Meas Value Operator" standard concept qualifying value_as_number (<, <=, >, >=), parsed from a numeric-string value or a FHIR valueQuantity.comparator. 0 when no operator (a bare number).
Valid standard Unit concept for coded UCUM; 0 for supplied but unmapped units, null for absent units. Always present in JSON.
OMOP source concept ID corresponding to Quantity.system/code; 0 for supplied units without a matching source concept, null for absent units. Always present in JSON.
Original Quantity.code if supplied, otherwise Quantity.unit; human-readable unit text is preserved in the unit mapping's source_name.
Request-local generated row identity; distinct from specimen_source_id.
Explicitly resolved top-level Patient in this response.
Material validated against Specimen; 0 for supplied unmapped material or absent material. Absence has a linked type diagnostic and no mapping/summary count; supplied unmapped material has a vocabulary mapping outcome.
32817 (EHR record provenance), independent of material and availability.
Collection date from collectedDateTime or collectedPeriod.start when day precision exists. Omitted for missing, partial, invalid, or conflicting timing, with a linked diagnostic. Required by CDM 5.4 for loading, but not required for partial API output; downstream loaders own completion.
Collection local wall-clock time, only when supplied; no fabricated time or offset conversion.
Exact nonnegative collection.quantity.value, without comparator or numeric conversion.
Valid standard Unit concept for coded UCUM; 0 for supplied unmapped units, null for absence.
Valid standard Spec Anatomic Site concept for a coded site; 0 for a supplied unmapped or text-only site, null for absence. Text-only sites retain source text without a concept suggestion.
Resource id, first valued identifier, accession value, then fullUrl. All source identities and selection path are in specimen_source_contexts. Kept verbatim; downstream loaders must handle CDM varchar(50) limits.
Selected bare material code or source text.
Exact Quantity.code when supplied, otherwise Quantity.unit.
Selected bare bodySite code or source text.
Start date selected by the source resource's timing rules. For an Observation, effectiveDateTime, effectivePeriod.start, or effectiveInstant. For an AllergyIntolerance, recordedDate, otherwise onsetDateTime or onsetPeriod.start; see the endpoint's timing sources for other resources.
Valid standard Unit concept for coded UCUM; 0 for supplied but unmapped units, null for absent units. Always present in JSON.
Original Quantity.code if supplied, otherwise Quantity.unit; human-readable unit text is preserved in the unit mapping's source_name.
One entry per supported source coding from a resource that shaped a
row, plus entries for text-only primary resources and supplied
Quantity units or specimen sites without coding, describing each
resolution or source-preservation outcome and linking it to its row.
A coded route or Observation valueCodeableConcept is a separate
entry linked to the output row. Observation values returned outside
measurement / observation are preserved here without concept
resolution or a corresponding row column.
For Observations returned as measurement or observation rows, each
supplied Quantity unit has a separate entry linked to that row;
absent units have no entry.
Each supplied specimen unit or site also has a separate entry;
text-only sites are UNMAPPED without a resolution object.
A Patient demographic code links to its person row, or to its
observation race row when the person has more than one race.
The id of the OMOP row this coding produced (e.g. condition_occurrence_id),
within omop_table. A resource with multiple codings yields one entry
per coding, all sharing this id.
The OMOP concept-ID field populated from this source coding, such as condition_concept_id, route_concept_id, or race_concept_id. Omitted when the entry preserves source information without populating a row column.
The standard concept's own code: the source code itself for an ALREADY_STANDARD row, the standard concept's code for a MAPPED row, or the suggested code for an UNCHECKED row. Omitted for UNMAPPED rows.
ALREADY_STANDARD (source coding is already a standard OMOP concept),
MAPPED (source coding was mapped to a standard concept), UNCHECKED (a
standard code was suggested for a text-only resource but not verified
against the OMOP vocabulary, so concept_id stays 0), or UNMAPPED
(no target concept selected, including missing mappings,
target-domain mismatches and ambiguity, or source information
retained without concept resolution as explained in note).
ALREADY_STANDARDMAPPEDUNCHECKEDUNMAPPEDWhether this source coding was selected for the linked row's *_source_value field. Always present; false for alternate codings, text-only rows, and entries without a corresponding row column. For a Patient demographic, it marks the code that determined the PERSON field or race observation row, even when that code has no concept; it is false for race and ethnicity null flavors, conflicting values, a Patient gender overridden by birth sex, and race categories that did not determine the field.
Optional field-level mapping outcome and provenance. When a field has several source-coding entries, they share this outcome; paths describe the selected concept rather than separate mappings of every alternate coding. Omitted for unchecked text suggestions, text-only specimen sites, text-only units, units with missing coding, unsupported unit systems, and Observation values retained without resolution because the output table has no value column. Free-text diagnostics and unselected candidates are not returned.
Vocabulary resolution outcome. Any outcome other than RESOLVED yields mapping_status UNMAPPED and concept ID 0 while retaining an otherwise usable row.
RESOLVEDUNRESOLVEDDOMAIN_MISMATCHAMBIGUOUSMachine-readable explanation for an unresolved mapping, when available:
NO_SOURCE_CODE: no source coding was supplied.NO_OMOP_SOURCE_CONCEPT: no OMOP source concept matches the supplied coding.NO_STANDARD_MAP: no usable standard OMOP mapping was found for the supplied coding.AMBIGUOUS: multiple candidate concepts could not be disambiguated.DOMAIN_MISMATCH: candidate standard concepts do not match the domain required by the linked OMOP field.UNSUPPORTED_SYSTEM: the source code system is unsupported.UNSUPPORTED_CODE: the source code is unsupported for the linked OMOP field.
Unknown reason codes are omitted; status still records the outcome.
NO_SOURCE_CODENO_OMOP_SOURCE_CONCEPTNO_STANDARD_MAPAMBIGUOUSDOMAIN_MISMATCHUNSUPPORTED_SYSTEMUNSUPPORTED_CODEHow the selected concept was reached. DIRECT may use an OMOP Maps to relationship; UMLS_BRIDGE identifies resolution through a shared UMLS concept. Omitted when unavailable or no concept was selected.
DIRECTUMLS_BRIDGEMapping paths to the selected concept, in response order. Omitted when unavailable or no concept was selected.
Present and true when candidate matches were truncated during resolution. Absence means no truncation was reported.
Additional context for the entry, including the output table,
populated fields, source information without a corresponding row
column, and DOMAIN_MISMATCH outcomes. A coded route is noted as
FHIR route. Patient demographic entries name their source and, when
not applied, why:
US Core birth sex;US Core birth sex; null flavor;US Core birth sex; outside value set;US Core birth sex; conflicting valuesFHIR administrative gender; assumed sex at birth;FHIR administrative gender; not a sex-at-birth value;FHIR administrative gender; not used, birth sex suppliedUS Core race OMB category;US Core race OMB category; more than one race(linked to itsobservationrace row);US Core race; null flavorUS Core ethnicity OMB category;US Core ethnicity OMB category; conflicting categories;US Core ethnicity; null flavor
Source identities, availability status, and collection timing for emitted specimens, linked by request-local specimen_id. Preserves valued identifier system/value pairs, accession identity, resource id/fullUrl, the chosen source-ID path, and supplied collection/received timing with original precision and offsets.
Original FHIR Specimen.status for this emitted row, describing sample availability or suitability. Omitted when no status was supplied; no availability is inferred. This is source metadata, not an OMOP disease-status concept.
availableunavailableunsatisfactorySelected source path (id, identifier[index].value, accessionIdentifier.value, or fullUrl); absent if no source identity was supplied.
Supplied FHIR timing retained verbatim for audit and downstream completion. This is response provenance, not a CDM table or an inferred collection date.
Original collection.collectedDateTime, including partial precision, invalid text, or timezone offset.
Original receivedTime, never substituted for collection timing.
collection.collectedDateTime or collection.collectedPeriod.start when specimen_date was populated; omitted when no date could safely be selected.
Additive FHIR provenance for every supplied PractitionerRole. Each context identifies the canonical or role-fallback provider row and preserves source role facts that OMOP's singular provider columns cannot represent together.
The PractitionerRole source identity: its FHIR id, identifier value,
name, or fullUrl. When none is available, it is PractitionerRole.
The role's supplied practitioner reference, when present.
The logical identifier supplied on a PractitionerRole's practitioner reference.
Every organization, healthcareService, or location reference supplied by the role.
The FHIR element path on the PractitionerRole.
Supported resource instances that could not be shaped into an OMOP
row because the subject/patient, clinical code or text, or medication
data was missing or unusable, including an explicit subject/patient
reference that was unresolved, ambiguous, or unsupported, or because
their clinical-event eligibility status excluded them. A resource that
lacks only a date or another CDM-required field is usually returned
as a partial row. Specimen requires an explicit resolvable Patient
subject but retains missing dates/material with linked diagnostics.
Unsupported resource types are ignored and do not appear here.
Eligibility exclusions use stable, resource-specific reason codes;
other shaping failures retain an explanatory reason string.
Explanations for explicit references that could not safely produce
an OMOP link or canonicalize a PractitionerRole provider identity, or explicit
subject/patient references that caused a clinical row to be dropped.
Specimen missing/unusable collection dates, material, subject, status,
and invalid optional quantity are also explained here.
Missing optional references are normal and do not produce a diagnostic.
References resolve only against resources supplied in this request.
Outcomes distinguish unresolved, ambiguous, conflicting, and unsupported
conditions as defined in ReferenceDiagnostic.outcome. Patient
demographic extensions that conflict, or a birth sex without
valueCode, are also reported here; their path is
extension:birthsex or extension:ethnicity and they have no
reference. Practitioner identity conflicts that prevent merging also
have no reference: their paths are name, gender, birthDate, or
identifier, their outcome is CONFLICTING, and omop_table: provider
together with omop_id identifies the affected row. For a conflicting
NPI group, every member is flagged, including members missing the conflicting attribute.
The reason identifies the differing mapped attribute and explains why
the entire group remains separate, rather than asserting that each
member individually supplied a conflicting value.
Multiple distinct NPIs on one Practitioner are also diagnosed at
identifier with omop_table: provider and the retained row's omop_id.
Conflicting Encounter classifications are also reported with outcome
CONFLICTING and no reference: path class/type means a mapped
type disagrees with the selected class, which still determines the
Visit; path type means separate type classifications disagree and
no type can supply a Visit when class is missing or unmapped.
Table containing the affected row in this response. Present together with omop_id when that row is emitted.
Primary key of the affected row within omop_table in this response. Present together with omop_table when that row is emitted.
FHIR element path on the source resource.
The supplied Reference.reference value, when present.
UNRESOLVED: a source value needed to populate a field is missing,
such as specimen material or collection start, or a supported
reference cannot resolve to a resource or emitted target supplied
in this request.
AMBIGUOUS: a reference or identifier matches multiple possible
targets. Identifier-only PractitionerRole.practitioner references
are unambiguous when all matches map to one canonical provider.
Literal references matching multiple source resources remain
ambiguous even if those Practitioners merge into one provider.
CONFLICTING: supplied values or relationships cannot be combined
under the mapping policy, such as differing mapped provider identity
attributes, multiple distinct NPIs on one Practitioner, conflicting
Patient demographic extensions, or an Encounter belonging to a
different patient.
UNSUPPORTED: a supplied reference form, resource type, or value
shape is outside the supported mapping policy.
UNRESOLVEDAMBIGUOUSCONFLICTINGUNSUPPORTEDExplanation of the condition and, when applicable, its effect on mapping.
The OMOP vocabulary release used for coded concept resolution (for example, "v20260829"), for reproducibility. Omitted when no vocabulary resolution was performed.
The request's data-quality headline: how row-producing coded concepts,
supplied Quantity units on measurement, observation, or specimen rows,
supplied specimen sites,
coded medication/immunization routes (including those reported only in
mappings when the output table is not drug_exposure), and Patient
demographic fields split, and the share
that was not already in a target standard vocabulary. Each is counted
once even when it carried several codings — unlike mappings, which has
one entry per coding. For example, a medication code and its selected
coded route on the same drug_exposure row are separate outcomes;
each supplied Quantity unit on a measurement, observation, or specimen row also
counts once, including text-only units;
each supplied specimen site counts once, including text-only sites;
absent specimen material and sites do not count;
absent units do not count;
alternate route codings reported only in mappings do not alter
summary. A Patient demographic counts once per PERSON field, or per
race observation row, that received a non-null value; conflicting
values count once as unmapped. Null flavors, Patient gender other or
unknown, a Patient gender overridden by birth sex, and race
categories that did not determine the field are reported in mappings
only. Observation values retained only in mappings because the output
table is neither measurement nor observation do not add resolution
outcomes.
Resolution outcomes already a standard OMOP concept (ALREADY_STANDARD).
Resolution outcomes mapped or suggested to a standard concept (MAPPED or UNCHECKED).
Resolution outcomes with no standard concept valid for the destination selected (UNMAPPED).
Share of resolution outcomes not already standard ((normalized + unmapped) / total).