This page is part of the FHIR Specification (v1.6.0: STU 3 Ballot 4). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3
This resource has 3 operations associated with it:
$lookup | Concept Look Up |
$subsumes | Subsumption Testing |
$infer | Performing inferencing based on a set of codes - e.g. a mix of composition and decomposition |
For more information about operations, including how they are invoked, see Operations.
Given a code/system, or a Coding, get additional details about the concept
Formal Definition (as a OperationDefinition).
URL: [base]/CodeSystem/$lookup
In Parameters: | |||||
Name | Cardinality | Type | Binding | Profile | Documentation |
code | 0..1 | code | The code that is to be validated. If a code is provided, a system must be provided | ||
system | 0..1 | uri | The system for the code that is to be validated | ||
version | 0..1 | string | The version of the system, if one was provided in the source data | ||
coding | 0..1 | Coding | A coding to look up | ||
date | 0..1 | dateTime | The date for which the information should be returned. Normally, this is the current conditions (which is the default value) but under some circumstances, systems need to acccess this information as it would have been in the past. A typical example of this would be where code selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that which date is appropriate is a matter for implementation policy. | ||
property | 0..* | code | A property that the client wishes to be returned in the output. If no properties are specified, the server chooses what to return. The following properties are defined for all code systems: system, version, display, definition, designation, parent, child, and lang.X where X is a language code in a designation. These properties refer to the directly return parameters documented for the operation | ||
Out Parameters: | |||||
Name | Cardinality | Type | Binding | Profile | Documentation |
name | 1..1 | string | A display name for the code system | ||
version | 0..1 | string | The version that these details are based on | ||
display | 1..1 | string | The preferred display for this concept | ||
property | 0..* | ||||
property.code | 0..1 | code | |||
property.value | 1..1 | string | |||
property.description | 0..1 | string | Human Readable representation of the propery value | ||
designation | 0..* | Additional representations for this concept | |||
designation.language | 0..1 | code | The language this designation is defined for | ||
designation.use | 0..1 | Coding | A code that details how this designation would be used | ||
designation.value | 1..1 | string | The text value for this designation |
Note that the $lookup operation is more than just a code system search - the server finds the concept, and gathers the return information from the value set and the underlying code system definitions.
Looking up a code/system (Request):
GET [base]/CodeSystem/$lookup?system=http://loinc.org&code=1963-8
Lookup using a Coding (Request):
POST [base]/CodeSystem/$lookup [other headers] <Parameters xmlns="http://hl7.org/fhir"> <parameter> <name value="coding"/> <valueCoding> <system value="http://loinc.org"/> <code value="1963-8"/> </valueCoding> </parameter> </Parameters>
Response:
HTTP/1.1 200 OK [other headers] { "resourceType" : "Parameters", "parameter" : [ { "name" : "name", "valueString" : "LOINC" }, { "name" : "version", "valueString" : "2.48" }, { "name" : "designation", "valueString" : "Bicarbonate [Moles/volume] in Serum" }, { "name" : "abstract", "valueString" : "false" }, { "name" : "designation", "part" : [ { "name" : "value", "valueString" : "Bicarbonate [Moles/volume] in Serum " } ] } ] }
Test whether code "sub" is subsumed by code "super" given the semantics of subsumption in the underlying code system
Formal Definition (as a OperationDefinition).
URL: [base]/CodeSystem/$subsumes
URL: [base]/CodeSystem/[id]/$subsumes
In Parameters: | |||||
Name | Cardinality | Type | Binding | Profile | Documentation |
codeA | 0..1 | code | The "sub" code that is to be tested. If a code is provided, a system must be provided | ||
codeB | 0..1 | code | The "super" code that is to be validated. If a code is provided, a system must be provided | ||
system | 0..1 | uri | The system in which subsumption testing is to be performed. This must be provided unless the operation is invoked on a code system instance | ||
version | 0..1 | string | The version of the system, if one was provided in the source data | ||
codingA | 0..1 | Coding | The "sub" coding to test. If the coding system does not have to match the specified subsumption system, but the relationships between the systems must be well established | ||
codingB | 0..1 | Coding | The "super" coding to test. If the coding system does not have to match the specified subsumption system, but the relationships between the systems must be well established | ||
Out Parameters: | |||||
Name | Cardinality | Type | Binding | Profile | Documentation |
outcome | 1..1 | code | Whether "sub" is subsumed by "super". There are 4 possible codes to be returned: equivalent, subsumes, subsumed-by, and not-subsumed. If the server is unable to determine the relationship between the codes, then it returns an error (i.e. an OperationOutcome) |
Using simple parameters: is viral hepatitis a disorder of the liver? (Request):
GET [base]/CodeSystem/$subsumes?system=http://snomed.info/sct&codeA=3738000&codeB=235856003
Using Codings (Request):
POST [base]/CodeSystem/$subsumes [other headers] <Parameters xmlns="http://hl7.org/fhir"> <!-- Subsumption testing - use SNOMED CT rules --> <parameter> <name value="system"/> <valuUri value="http://snomed.info/sct"/> </parameter> <!-- Australian distribution --> <parameter> <name value="version"/> <valuString value="http://snomed.info/sct/32506021000036107/version/20160430"/> </parameter> <parameter> <name value="codingA"/> <valueCoding> <system value="http://snomed.info/sct"/> <code value="3738000"/> </valueCoding> </parameter> <parameter> <name value="codingB"/> <valueCoding> <system value="http://snomed.info/sct"/> <code value="235856003"/> </valueCoding> </parameter> </Parameters>
Response:
HTTP/1.1 200 OK [other headers] { "resourceType" : "Parameters", "parameter" : [ { "name" : "outcome", "valueCode" : "subsumes" } }
Given a set of property/concept pairs, return a set of concepts for requested properties.
Typically, this operation is used to perform composition - given one or more properties, see if there is a common single code for all of them - or decomposition - given a code or expression, find out what it implies about the value of a specific property. It is defined a single operation, though, because it may be necessary to provide multiple inputs and outputs for both cases.
To use this operation, a client provides a set of property / concept pairs. One (or more) of the properties may be be labeled with the special property name $main which indicates that is a full code. In addition, the client provides one or more "request" parameter listing the properties it wishes returned, which may include $main. The server determines what of the request properties it is able to return, and returns a set of property/concept pairs as requested. In addition, the server can return a message with information about the inferencing it was able to perform. If the server cannot process the request at all, it should return an OperationOutcome with one or more errors.
Formal Definition (as a OperationDefinition).
URL: [base]/CodeSystem/$infer
URL: [base]/CodeSystem/[id]/$infer
In Parameters: | |||||
Name | Cardinality | Type | Binding | Profile | Documentation |
system | 0..1 | uri | The system in which inferencing is to be performed. This must be provided unless the operation is invoked on a code system instance | ||
version | 0..1 | string | The version of the system for the inferencing to be performed | ||
concept | 1..* | Concepts provided by the client on which inferencing is to be performed | |||
concept.property | 1..1 | code | The property that this concept represents, or $main if it doesn't represent a particular property | ||
concept.code | 1..1 | code | The code or expression for the property | ||
property | 0..* | code | A property that is requested to be returned | ||
Out Parameters: | |||||
Name | Cardinality | Type | Binding | Profile | Documentation |
message | 0..1 | string | Information from the server about the request. Note that if there is an error processing the request, an operation outcome will be returned instead. The message may be used when the operation is partially successful | ||
output | 0..* | Concepts returned by the server as a result of the inferencing operation | |||
output.property | 1..1 | code | The property that this concept represents, or $main if it doesn't represent a particular property | ||
output.code | 1..1 | code | The code or expression for the property | ||
output.display | 0..1 | string | Display for the returned code, to save the client from performing a $lookup immediately (recommended) |
Using simple parameters: what's the method for this LOINC code? (there isn't one) (Request):
GET [base]/CodeSystem/$infer?system=http://loinc.org&code=1977-8&property=METHOD_TYP
SNOMED Composition - provide 3 properties, and ask for a single code for the whole: 417163006 (Traumatic AND/OR non-traumatic injury) + 246112005 (Severity) = 24484000 (Severe)+ 363698007 (Finding site) = 40983000 (Upper arm structure) (Request):
POST [base]/CodeSystem/$infer [other headers] <Parameters xmlns="http://hl7.org/fhir"> <!-- Inferencing - use SNOMED CT rules --> <parameter> <name value="system"/> <valuUri value="http://snomed.info/sct"/> </parameter> <!-- Traumatic injury --> <parameter> <name value="concept"/> <part> <name value="property"/> <valueCode value="$main"/> <part> <part> <name value="code"/> <valueCode value="417163006"/> <part> </parameter> <!-- Finding site: upper arm --> <parameter> <name value="concept"/> <part> <name value="property"/> <valueCode value="363698007"/> <part> <part> <name value="code"/> <valueCode value="40983000"/> <part> </parameter> <!-- Severity = severe --> <parameter> <name value="concept"/> <part> <name value="property"/> <valueCode value="246112005"/> <part> <part> <name value="code"/> <valueCode value="24484000"/> <part> </parameter> <!-- compose a code with those in it --> <parameter> <name value="request"/> <valueCode value="$main"/> </parameter> </Parameters>
SNOMED Composition - provide 3 properties, and ask for a single code for the whole (210528007: Severe multi tissue damage upper arm) (Response):
HTTP/1.1 200 OK [other headers] { "resourceType" : "Parameters", "parameter" : [ { "name" : "message", "valueBoolean" : "No method for LOINC code 1977-8" } "parameter" : [ { "name" : "output", "part" : [ { "name" : "output.concept", "value" : "METHOD_TYP" }] } } HTTP/1.1 200 OK [other headers] <Parameters xmlns="http://hl7.org/fhir"> <!-- Inferencing - use SNOMED CT rules --> <parameter> <name value="message"/> <valuUri value="All OK"/> </parameter> <parameter> <name value="output"/> <part> <name value="property"/> <valueCode value="$main"/> <part> <part> <name value="code"/> <valueCode value="210528007"/> <part> <part> <name value="display"/> <valueCode value="Severe multi tissue damage upper arm"/> <part> </parameter> </Parameters>