Examples
For these examples we assume THO and SNOMED International are loaded.
Lookup a code in a code system
GET /fhir/CodeSystem/$lookup?system=http://snomed.info/sct&code=73211009
{
"resourceType": "Parameters",
"parameter": [
{
"name": "code",
"valueCode": "73211009"
},
{
"name": "display",
"valueString": "Diabetes mellitus (disorder)"
},
{
"name": "name",
"valueString": "snomed-ct"
},
{
"name": "system",
"valueUri": "http://snomed.info/sct"
},
// ...
}
Validate a code in a code system
Validating that 73211009 | Diabetes mellitus is valid for SNOMED
GET /fhir/CodeSystem/$validate-code?url=http://snomed.info/sct&code=73211009
{
"resourceType": "Parameters",
"parameter": [
{
"name": "result",
"valueBoolean": true
},
{
"name": "code",
"valueCode": "73211009"
},
{
"name": "display",
"valueString": "Diabetes mellitus (disorder)"
},
{
"name": "system",
"valueUri": "http://snomed.info/sct"
},
{
"name": "version",
"valueString": "http://snomed.info/sct/900000000000207008/version/20260201"
}
]
}
Validate a code using an implicit value set
Here we're validating that code 38341003 is valid in the implicit value set http://snomed.info/sct?fhir_vs=isa/404684003, which is, the value set of all SNOMED concepts that are a 404684003 | Clinical finding
GET /fhir/ValueSet/$validate-code?url=http://snomed.info/sct?fhir_vs=isa/404684003&code=38341003&inferSystem=true
{
"resourceType": "Parameters",
"parameter": [
{
"name": "result",
"valueBoolean": true
},
{
"name": "code",
"valueCode": "38341003"
},
{
"name": "display",
"valueString": "Hypertensive disorder, systemic arterial (disorder)"
},
{
"name": "system",
"valueUri": "http://snomed.info/sct"
},
{
"name": "version",
"valueString": "http://snomed.info/sct/900000000000207008/version/20260201"
}
]
}
Searching on an implicit value set
Here we're searching for the words "heart failure risk" on the implicit value set from the previous example (findings), top 10 results.
GET /fhir/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=isa/404684003&filter=heart+failure+risk&count=10
{
"resourceType": "ValueSet",
// ...
"contains": [
{
"code": "609386002",
"display": "At increased risk for heart failure (finding)",
"system": "http://snomed.info/sct"
},
{
"code": "609388001",
"display": "Stage A at high risk of heart failure (finding)",
"system": "http://snomed.info/sct"
},
// ...
]
// ...
}
}
Searching on an ad-hoc value set
We'll search now based on two property filters:
370135005 | pathological process=441862004 | Infectious process363698007 | findign site=113255004 | lung- and the text
fever
POST /fhir/ValueSet/$expand
Content-Type: application/json
{
"resourceType": "Parameters",
"parameter": [{
"name": "valueSet",
"resource": {
"resourceType": "ValueSet",
"compose": {
"include": [{
"system": "http://snomed.info/sct",
"filter": [{
"property": "370135005",
"op": "=",
"value": "441862004"
}, {
"property": "363698007",
"op": "=",
"value": "113255004"
}]
}]
}
}
}, {
"name": "filter",
"valueString": "fever"
}, {
"name": "count",
"valueInteger": 10
}]
}
{
"resourceType": "ValueSet",
"expansion": {
// ...
],
"contains": [
{
"code": "32286006",
"display": "Pneumonia in Q fever (disorder)",
"system": "http://snomed.info/sct"
},
{
"code": "45312009",
"display": "Pneumonia in typhoid fever (disorder)",
"system": "http://snomed.info/sct"
},
{
"code": "763888005",
"display": "Necrotizing pneumonia caused by Panton-Valentine leukocidin producing Staphylococcus aureus (disorder)",
"system": "http://snomed.info/sct"
},
{
"code": "1208602000",
"display": "Pneumonia caused by Pseudomonas aeruginosa (disorder)",
"system": "http://snomed.info/sct"
}
]
}
}