Your User Friendly Name for MyContentIG Here
0.5.1-cibuild - 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.5.1-cibuild 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: ExtensionAndSlicingExample

Official URL: http://somewhere.org/fhir/uv/mycontentig/Library/ExtensionAndSlicingExample Version: 0.5.1-cibuild
Draft as of 2025-09-07 Computable Name: ExtensionAndSlicingExample
Metadata
Version 0.5.1-cibuild
Status Draft
Jurisdiction 001 from http://unstats.un.org/unsd/methods/m49/m49.htm
Steward (Publisher) HL7 International - [Some] Work Group
Type logic-library from http://terminology.hl7.org/CodeSystem/library-type
Parameter Name: Patient
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Patient
Parameter Name: TestSlices
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Observation
Parameter Name: TestSimpleExtensions
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Patient
Parameter Name: TestComplexExtensions
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Patient
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: extension
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, component
Code Filter(s):
Path: code
Code(s): LOINC 85354-9: Blood pressure panel with all children optional
Library Content
CQL Content
library ExtensionAndSlicingExample version '0.5.0-cibuild'

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")
ELM XML Content
Encoded data (69356 characters)
ELM JSON Content
Encoded data (135976 characters)
Generated using version 0.5.1-cibuild of the sample-content-ig Liquid templates