FQL is a query language that allows you to retrieve, filter and project data from any data source containing FHIR Resources. It brings the power of three existing languages together: SQL, JSON and FhirPath. It allows you to create tables and is useful for gaining insight and perform quality control.
Invocations
URL: [base]/CodeSystem/$lookup
Parameters (In)
Name | Cardinality | Type | Documentation |
code | 0..1 | Code | The code that is to be located. If a code is provided, a system must be provided |
system | 0..1 | Uri | The system for the code that is to be located |
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. |
displayLanguage | 0..1 | Code | The requested language for display (see ExpansionProfile.displayLanguage) |
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: url, name, version (code system info) and code information: display, definition, designation, parent and child, and for designations, lang.X where X is a designation language code. Some of the properties are returned explicit in named parameters (when the names match), and the rest (except for lang.X) in the property parameter group |
Return Values (Out)
Name | Cardinality | Type | 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 |
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 |
property | 0..* | One or more properties that contain additional information about the code, including status. For complex terminologies (e.g. SNOMED CT, LOINC, medications), these properties serve to decompose the code | |
property.code | 1..1 | Code | Identifies the property returned |
property.value | 0..1 | Code | The value of the property returned |
property.description | 0..1 | String | Human Readable representation of the property value (e.g. display for a code) |
property.subproperty | 0..* | Nested Properties (mainly used for SNOMED CT decomposition, for relationship Groups) | |
property.subproperty.code | 1..1 | Code | Identifies the sub-property returned |
property.subproperty.value | 1..1 | Code | The value of the sub-property returned |
property.subproperty.description | 0..1 | String | Human Readable representation of the property value (e.g. display for a code) |
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 underlying code system definitions.