Your User Friendly Name for MyIG Here
0.2.0 - CI Build International flag

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

Library: Example CQL Library (Experimental)

Official URL: http://somewhere.org/fhir/uv/myig/Library/example Version: 0.2.0
Standards status: Informative Computable Name: Example

Some example library


English


Metadata
Title Example CQL Library
Version 0.2.0
Status Draft
Experimental true
Subject Type http://hl7.org/fhir/resource-types#Patient
Jurisdiction http://unstats.un.org/unsd/methods/m49/m49.htm#001
Steward (Publisher) HL7 International - [Some] Work Group
Description

Some example library

Type http://terminology.hl7.org/CodeSystem/library-type#logic-library
Data Requirement Type: Patient
Profile(s): Patient
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Encounter Inpatient
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Emergency Department Visit
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Telephone Evaluation
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Telephone Management
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, category, status, effective
Code Filter(s):
Path: code
ValueSet: TBD
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
Patient Out 0..1 Patient
Inpatient, Emergency, or Telephone Evaluation or Management Encounter Out 0..* Encounter
Initial Population Out 0..1 boolean
Denominator Out 0..1 boolean
COVID-19 Communicable Disease Screening Out 0..* Observation
Numerator Out 0..1 boolean
Library Content
CQL Content
library example version '1.0.0'

using FHIR version '4.0.1'

include fhir.cqf.common.FHIRHelpers version '4.0.1'

codesystem "Observation Category Codes": 'http://terminology.hl7.org/CodeSystem/observation-category'

valueset "Encounter Inpatient": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307'
valueset "Emergency Department Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292'
valueset "Telephone Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1082'
valueset "Telephone Management": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1053'

valueset "COVID-19 Screening Result": 'TBD'

code "Laboratory Observation Category": 'laboratory' from "Observation Category Codes"

parameter "Measurement Period" Interval<DateTime>

context Patient

define "Inpatient, Emergency, or Telephone Evaluation or Management Encounter":
  (
    [Encounter: "Encounter Inpatient"]
      union [Encounter: "Emergency Department Visit"]
      union [Encounter: "Telephone Evaluation"]
      union [Encounter: "Telephone Management"]
  ) Encounter
    where Encounter.status = 'finished'
      and Encounter.period during "Measurement Period"

define "Initial Population":
  exists ("Inpatient, Emergency, or Telephone Evaluation or Management Encounter")

define "Denominator":
  true

define "COVID-19 Communicable Disease Screening":
  [Observation: "COVID-19 Screening Result"] Result
    where exists (Result.category C where C ~ "Laboratory Observation Category")
      and Result.status in { 'final', 'amended', 'corrected' }
      and Result.effective during "Measurement Period"

define "Numerator":
  exists ("COVID-19 Communicable Disease Screening")
ELM XML Content
Encoded data 
ELM JSON Content
Encoded data 
Citations and References
Dependency Description: Library FHIRHelpers
Resource: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
Canonical URL: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
Dependency Description: Code System Observation Category Codes
Resource: Observation Category Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/observation-category
Dependency Description: Value Set Encounter Inpatient
Resource: Encounter Inpatient
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Dependency Description: Value Set Emergency Department Visit
Resource: Emergency Department Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
Dependency Description: Value Set Telephone Evaluation
Resource: Telephone Evaluation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1082
Dependency Description: Value Set Telephone Management
Resource: Telephone Management
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1053
Dependency Description: Value Set COVID-19 Screening Result
Resource: TBD
Canonical URL: TBD
Generated using version 0.5.6 of the sample-content-ig Liquid templates