Common CQL Artifacts for FHIR (US-Based)
1.0.0-ballot - STU 1 Ballot United States of America flag

Common CQL Artifacts for FHIR (US-Based), published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 1.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/us-cql-ig/ and changes regularly. See the Directory of published versions

Library: US Core Common Tests (Experimental)

Official URL: http://hl7.org/fhir/us/cql/Library/USCoreCommonTests Version: 1.0.0-ballot
Standards status: Informative Maturity Level: 3 Computable Name: USCoreCommonTests

Tests for the expressions and functions defined in the US Core Common library.

Title: US Core Common Tests
Id: USCoreCommonTests
Version: 1.0.0-ballot
Url: US Core Common Tests
Experimental: true
Type:

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

code: logic-library

Date: 2025-09-10 20:00:05+0000
Publisher: HL7 International / Clinical Decision Support
Description:

Tests for the expressions and functions defined in the US Core Common library.

Jurisdiction: US
Topic:
Related Artifacts:

Dependencies

Content: text/cql
library USCoreCommonTests

using FHIR version '4.0.1'
using USCore version '7.0.0'

include USCoreCommon called UC

context Patient

//* _01_ define fluent function race(patient Patient):
define _01_TestRace: Patient.race()

//* _02_ define fluent function ethnicity(patient Patient):
define _02_TestEthnicity: Patient.ethnicity()

//* _03_ define fluent function tribalAffiliation(patient Patient):
define _03_TestTribalAffiliation: Patient.tribalAffiliation()

//* _04_ define fluent function birthSex(patient Patient):
define _04_TestBirthSex: Patient.birthSex()

//* _05_ define fluent function systolic(bloodPressureProfile BloodPressureProfile):
define _05_TestSystolic:
  [Observation] O
    return O.systolic()

//* _06_ define fluent function diastolic(bloodPressureProfile BloodPressureProfile):
define _06_TestDiastolic:
  [Observation] O
    return O.diastolic()

//* _07_ define fluent function isHealthConcern(condition FHIR.Condition):
define _07_TestIsHealthConcern:
  [Condition] C
    where C.isHealthConcern()

Content: application/elm+xml
Encoded data (16476 characters)
Content: application/elm+json
Encoded data (29244 characters)