FHIR
Functions to simplify working FHIR data
code(codeable)
Return the first code in the Codeable Concept.
Name | Required | Type | Description |
---|---|---|---|
codeable |
Yes |
CodableConcept instance |
Text |
fhir.code(codeable) => "25064002"
codes(codeable)
Return all codes in the Codeable Concept.
Name | Required | Type | Description |
---|---|---|---|
codeable |
Yes |
CodableConcept instance |
Collection of Text |
fhir.codes(codeable) => "[\"25064002\", \"128045006\"]"
extension(resource, url)
Function that extracts extension based on url from given FHIR resource and retrieves value found in that extension, following valueXXX pattern.
Name | Required | Type | Description |
---|---|---|---|
resource |
Yes |
Any |
FHIR resource |
url |
Yes |
Text |
URL that identifies extension |
Any |
fhir.extension(fhirResource, "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg") => "fhir"
questionaire answer(response, linkId)
Function that extracts answer for given questionaire response based on link id. Retrieves value following valueXXX pattern
Name | Required | Type | Description |
---|---|---|---|
response |
Yes |
Any |
FHIR Questionaire response |
linkId |
Yes |
Text |
Link id in the response |
Any |
fhir.questionaire answer(response, "1.1.1") => "1234"
reference matches(id, resource)
Function that checks if given FHIR resource matches the string id e.g. Patient/12345.
Name | Required | Type | Description |
---|---|---|---|
id |
Yes |
Text |
URL that identifies extension |
resource |
Yes |
Any |
FHIR resource |
Any |
fhir.reference matches("Patient/12345", fhirResource) => true
reference matches(identifier, resource)
Function that checks if given FHIR resource matches the identifier (system and value is primary match, if no system is set uses type/coding)
Name | Required | Type | Description |
---|---|---|---|
identifier |
Yes |
Any |
FHIR resource identifier |
resource |
Yes |
Any |
FHIR resource |
Any |
fhir.reference matches({"system" : "urn:oid:1.2.36.146.595.217.0.1", "value":"12345"}, fhirResource) => true
resources in bundle(bundle, [type])
Function that extracts resources from given FHIR resource bundle, optionally filter by resource type.
Name | Required | Type | Description |
---|---|---|---|
bundle |
Yes |
Any |
FHIR resource bundle |
type |
No |
Text |
Resource type to filter |
collectionOfAny |
fhir.resources in bundle(fhirBundle) => "[{\"resourceType\": \"Observation\"}, {\"resourceType\": \"Patient\"}]"
fhir.resources in bundle(fhirBundle, "Observation") => "[{\"resourceType\": \"Observation\"}, {\"resourceType\": \"Observation\"}]"
value(resource, [prefix])
Function that extracts values from given FHIR resource that are based on valueXXX pattern. This function will introspect all aviailable valueXXX properties and return one that has a value. It is expected that only one will have the value.In addition, prefix can also be specified to extract not value but for example 'effectiveXXX'
Name | Required | Type | Description |
---|---|---|---|
resource |
Yes |
Any |
FHIR resource |
prefix |
No |
Text |
Prefix of the property, if not given 'value' is used |
Any |
fhir.value(fhirResource) => "12345"
fhir.value(fhirResource, "effective") => true
Data Types
Coding
Coding
Properties
Name | Type | Description |
---|---|---|
code |
Text |
code |
display |
Text |
display |
system |
Text |
system |
userSelected |
Boolean |
userSelected |
version |
Text |
version |