Skip to main content

CodeSystem Validate Code

Validates whether a specified code is part of the given CodeSystem.

[baseUrl]/CodeSystem/$validate-code
[baseUrl]/CodeSystem/[id]/$validate-code

Parameters

NameTypeDescriptionRequired
urluriThe canonical URL of the CodeSystem to validate againstNo*
versionstringThe version of the code system to search.No
codestringThe code to look up.No
codingCodingLook up via full Coding.No

* If no url is provided, the operation must be invoked on a specific ValueSet instance.

One of code or coding must be provided.

Output

The operation returns a Parameters resource containing the validation result.

NameTypeDescriptionRequired
resultbooleanWhether or not the coding is from the given CodeSystemYes
displaystringThe display text of the included codeNo

Examples

Request:

curl 'https://api.medplum.com/fhir/R4/CodeSystem/$validate-code' \
--get \
-H "Authorization: Bearer $MY_ACCESS_TOKEN" \
-d 'url=http://snomed.info/sct' \
-d 'code=255604002'

Response: (200 OK)

{
"resourceType": "Parameters",
"parameter": [
{ "name": "result", "valueBoolean": true },
{ "name": "display", "valueString": "Mild (qualifier value)" }
]
}