Using CQL With FHIR
3.0.0-ballot - STU 3 Ballot International flag

This page is part of the Using CQL with FHIR Implementation Guide (v3.0.0-ballot: STU 3 Ballot) based on FHIR (HL7® FHIR® Standard) R4. This version is a pre-release. The current official version is 2.0.0. For a full list of available versions, see the Directory of published versions

Library: ANC Cohort (Experimental)

Official URL: http://hl7.org/fhir/uv/cql/Library/ANCCohort Version: 3.0.0-ballot
Standards status: Informative Computable Name: ANCCohort
Other Identifiers: OID:2.16.840.1.113883.4.642.40.37.28.1

Example cohort definition for antenatal care

Metadata
Title ANC Cohort
Version 3.0.0-ballot
Identifier urn:oid:2.16.840.1.113883.4.642.40.37.28.1
Experimental true
Jurisdiction World
Steward (Publisher) HL7 International / Clinical Decision Support
Description

Example cohort definition for antenatal care

Type logic-library from http://terminology.hl7.org/CodeSystem/library-type
Dependency Description: Library FHIRHelpers
Resource: FHIR Helpers version: 4.0.2-ballot
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.2-ballot
Dependency Description: Library FHIRCommon
Resource: FHIR Common version: 3.0.0-ballot
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|3.0.0-ballot
Dependency Description: Code System ANCM Concept Codes
Resource: CQL IG Example Code System
Canonical URL: http://hl7.org/fhir/uv/cql/CodeSystem/example
Data Requirement Type: Observation
Profile(s): Observation
Code Filter(s):
Path: code
Code(s): CQL IG Example Code System: ANC.B4.DE1 (Pregnancy Confirmed)
Parameters
Name Use Card. Type Documentation
Is Pregnancy Confirmed Out 0..1 boolean
Is Antenatal Care Applicable Out 0..1 boolean
Library Content
CQL Content
library ANCCohort

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.2-ballot'
include FHIRCommon version '3.0.0-ballot'

codesystem "ANCM Concept Codes": 'http://hl7.org/fhir/uv/cql/CodeSystem/example'

code "Pregnancy Confirmed": 'ANC.B4.DE1' from "ANCM Concept Codes" display 'Pregnancy Confirmed'

define "Is Antenatal Care Applicable":
  "Is Pregnancy Confirmed" is true


/* Copied from ANCMContactDataElements */
/*
  @dataElement: ANC.B4.DE1 Pregnancy Confirmed
  @activity: ANC.B4 Confirm pregnancy
  @description: Pregnancy has been confirmed
*/
define "Is Pregnancy Confirmed":
  ([Observation: "Pregnancy Confirmed"]).resulted().mostRecent().value as boolean
ELM JSON Content
Encoded data 
Generated using version 0.5.6-cibuild of the sample-content-ig Liquid templates