Your User Friendly Name for MyContentIG Here
0.4.9-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.4.9-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: First Example (Experimental)

Official URL: http://somewhere.org/fhir/uv/mycontentig/Library/FirstExample Version: 0.4.9-cibuild
Draft as of 2025-07-03 Computable Name: FirstExample

Example library illustrating basic CQL constructs

Metadata
Title First Example
Version 0.4.9-cibuild
Status Draft
Experimental true
Subject Type Patient
Jurisdiction Global (Whole world)
Steward (Publisher) HL7 International - [Some] Work Group
Description

Example library illustrating basic CQL constructs

Type Logic Library
Parameter Name: Patient
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Patient
Parameter Name: PatientExample
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Patient
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: gender, active, birthDate, deceased, maritalStatus
Library Content
CQL Content
library FirstExample version '0.4.1'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

valueset "Marital Status": 'http://hl7.org/fhir/ValueSet/marital-status'

context Patient

define PatientExample:
  Patient P
    where P.gender = 'male'
      and P.active is true
      and P.birthDate 30 years or more before Today()
      and not(P.deceased)
      and P.maritalStatus in "Marital Status"
ELM XML Content
Encoded data (16140 characters)
ELM JSON Content
Encoded data (30612 characters)
Generated using version 0.4.9-cibuild of the sample-content-ig Liquid templates