Your User Friendly Name for MyContentIG Here
0.4.6 - CI Build International flag

Your User Friendly Name for MyContentIG Here, published by HL7 International - [Some] Work Group. This guide is not an authorized publication; it is the continuous build for version 0.4.6 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/sample-content-ig/ and changes regularly. See the Directory of published versions

Library: Extension And Slicing Example (Experimental)

Official URL: http://somewhere.org/fhir/uv/mycontentig/Library/ExtensionAndSlicingExample Version: 0.4.6
Draft as of 2024-09-19 Computable Name: ExtensionAndSlicingExample

Example library illustrating access of FHIR slices and extensions within CQL

Title: Extension And Slicing Example
Id: ExtensionAndSlicingExample
Version: 0.4.6
Url: Extension And Slicing Example
Status: draft
Experimental: true
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Subject:

system: http://hl7.org/fhir/resource-types

code: Patient

Date: 2024-09-19 19:22:59+0000
Publisher: HL7 International - [Some] Work Group
Description:

Example library illustrating access of FHIR slices and extensions within CQL

Jurisdiction: 001
Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
PatientPatient01Out
TestSlicesObservation0*Out
TestSimpleExtensionsPatient01Out
TestComplexExtensionsPatient01Out
Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/StructureDefinition/Patient ;
Observation http://hl7.org/fhir/StructureDefinition/Observation ;; code filter:
path: code

system: http://loinc.org

code: 85354-9

display: Blood pressure panel with all children optional

Content: text/cql
library ExtensionAndSlicingExample version '0.4.1'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

codesystem "LOINC": 'http://loinc.org'
codesystem "CDC Race and Ethnicity Codes": 'urn:oid:2.16.840.1.113883.6.238'

code "Blood pressure": '85354-9' from "LOINC" display 'Blood pressure panel with all children optional'
code "Diastolic blood pressure": '8462-4' from "LOINC" display 'Diastolic blood pressure'
code "Systolic blood pressure": '8480-6' from "LOINC" display 'Systolic blood pressure'
code "American Indian or Alaska Native": '1002-5' from "CDC Race and Ethnicity Codes"
code "Alaska Native": '1735-0' from "CDC Race and Ethnicity Codes"

context Patient

define TestSlices:
  [Observation: "Blood pressure"] BP
    let
      SystolicBP: singleton from (BP.component C where C.code ~ "Systolic blood pressure"),
      DiastolicBP: singleton from (BP.component C where C.code ~ "Diastolic blood pressure")
    where SystolicBP.value < 140 'mm[Hg]'
      and DiastolicBP.value < 90 'mm[Hg]'

define TestSimpleExtensions:
  Patient P
    let birthsex: singleton from (P.extension E
        where E.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex'
      )
    where birthsex.value = 'M'

define TestComplexExtensions:
  Patient P
    let
      race: singleton from (P.extension E
        where E.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'),
      ombCategory: race.extension E where E.url = 'ombCategory',
      detailed: race.extension E where E.url = 'detailed'
    where exists (ombCategory O where O.value ~ "American Indian or Alaska Native")
      and exists (detailed O where O.value ~ "Alaska Native")
Content: application/elm+xml
Encoded data (70028 characters)
Content: application/elm+json
Encoded data (136836 characters)