OMOP to FHIR
The F2O translation also runs in reverse: given an OMOP standard concept_id, you can recover the source vocabulary codes (ICD-10-CM, SNOMED, RxNorm, …) that map to it. Echidna supports this via the OmopMappedFrom computed ConceptMap and via $expand with a relationship filter.
OmopMappedFrom — all source codes in one call
Pass the OMOP system URI and a standard concept_id to the OmopMappedFrom ConceptMap:
curl 'https://echidna.fhir.org/r4/ConceptMap/$translate?url=https://tx.echidna.systems/ConceptMap/OmopMappedFrom&system=https://fhir-terminology.ohdsi.org&code=201826'
This returns every source concept that has a Mapped from relationship to 201826 ("Type 2 diabetes mellitus"). For a broad standard concept like this, the response can be large — concept_id 201826 has 251 source concepts mapping to it, including ICD-10-CM E11.9 (35206882), ICD-9-CM 250.00, and many others.
Each match in the response carries equivalence relatedto and includes the source concept_id:
{
"resourceType": "Parameters",
"parameter": [
{ "name": "result", "valueBoolean": true },
{
"name": "match",
"part": [
{ "name": "equivalence", "valueCode": "relatedto" },
{ "name": "concept", "valueCoding": {
"system": "https://fhir-terminology.ohdsi.org",
"version": "20260227",
"code": "35206882",
"display": "Type 2 diabetes mellitus without complications"
}
}
]
}
]
}
Working with many sources
Reverse mapping is one-to-many by nature: a broad Standard concept can gather hundreds of source codes across many vocabularies (201826 has 251). Before consuming the result, decide what you actually need and filter accordingly:
- By vocabulary — if you only want, say, the ICD-10-CM sources, filter the returned matches on
vocabulary-idrather than consuming all systems at once. - By validity — some sources may be inactive or from retired releases; check
inactive/invalid-reasonif you need only currently valid codes. - By specificity — the set mixes the exact concept with more specific descendants (for
201826, everything from "Type 2 diabetes mellitus" to complication-specific codes). Decide whether you want the precise equivalent only or the whole family.
For a narrower pull you can go straight to ValueSet/$expand with a Maps to filter plus a vocabulary-id filter, which does the filtering server-side instead of returning all 251 and filtering in your own code. Filters within an include are ANDed, so this returns only the ICD-10-CM sources for 201826:
curl -X POST 'https://echidna.fhir.org/r4/ValueSet/$expand' \
-H 'Content-Type: application/fhir+json' \
-d '{
"resourceType": "Parameters",
"parameter": [
{ "name": "valueSet", "resource": {
"resourceType": "ValueSet",
"compose": { "include": [ {
"system": "https://fhir-terminology.ohdsi.org",
"filter": [
{ "property": "Maps to", "op": "=", "value": "201826" },
{ "property": "vocabulary-id", "op": "=", "value": "ICD10CM" }
]
} ] }
} }
]
}'
Response (abridged — 3 of 74):
{
"resourceType": "ValueSet",
"expansion": {
"total": 74,
"contains": [
{ "system": "https://fhir-terminology.ohdsi.org", "code": "1326491", "display": "Type 2 diabetes mellitus with ketoacidosis" },
{ "system": "https://fhir-terminology.ohdsi.org", "code": "1326492", "display": "Type 2 diabetes mellitus with ketoacidosis without coma" },
{ "system": "https://fhir-terminology.ohdsi.org", "code": "1326493", "display": "Type 2 diabetes mellitus with ketoacidosis with coma" }
]
}
}
Recovering the native source code
Requesting source-concept-code on a source concept returns its native code and system:
curl 'https://echidna.fhir.org/r4/CodeSystem/$lookup?system=https://fhir-terminology.ohdsi.org&code=35206882&property=source-concept-code&property=vocabulary-id'
Response (abridged):
{
"resourceType": "Parameters",
"parameter": [
{ "name": "code", "valueCode": "35206882" },
{ "name": "display", "valueString": "Type 2 diabetes mellitus without complications" },
{
"name": "property",
"part": [
{ "name": "code", "valueCode": "source-concept-code" },
{ "name": "value", "valueCoding": {
"code": "E11.9",
"system": "http://hl7.org/fhir/sid/icd-10-cm"
}
}
]
},
{
"name": "property",
"part": [
{ "name": "code", "valueCode": "vocabulary-id" },
{ "name": "value", "valueCode": "ICD10CM" }
]
}
]
}
Note: carry the system through with the code. A bare E11.9 is ambiguous without its vocabulary URI, and downstream FHIR consumers need the system to build a valid Coding.