Your User Friendly Name for MyContentIG Here
0.4.7 - 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.7 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.7
Draft as of 2024-12-09 Computable Name: ExtensionAndSlicingExample

Example library illustrating access of FHIR slices and extensions within CQL

Knowledge Artifact Metadata
Name (machine-readable) ExtensionAndSlicingExample
Title (human-readable) Extension And Slicing Example
Status Draft
Experimental true
Description

Example library illustrating access of FHIR slices and extensions within CQL

Library Steward HL7 International - [Some] Work Group
Steward Contact Details http://hl7.org/Special/committees/[something]
Dependency Description: FHIR model information
Resource: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
Canonical URL: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
Dependency Description: Library FHIRHelpers
Resource: http://hl7.org/fhir/Library/FHIRHelpers|4.0.1
Canonical URL: http://hl7.org/fhir/Library/FHIRHelpers|4.0.1
Dependency Description: Code system LOINC
Resource: Logical Observation Identifiers, Names and Codes (LOINC)
Canonical URL: http://loinc.org
Dependency Description: Code system CDC Race and Ethnicity Codes
Resource: CDC Race and Ethnicity
Canonical URL: urn:oid:2.16.840.1.113883.6.238
Library Metadata
Version Number 0.4.7
Library Type Logic Library
Library Subject Patient
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.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")
ELM XML Content
Encoded data (70028 characters)
ELM JSON Content
Encoded data (136836 characters)
Generated using version 0.4.7 of the sample-content-ig Liquid templates