Starter FHIR Implementation Guide
1.0.1 - draft International flag

Starter FHIR Implementation Guide, published by Jembi Health Systems. This guide is not an authorized publication; it is the continuous build for version 1.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/jembi/Starter-FHIR-IG/ and changes regularly. See the Directory of published versions

Library: CQL - Viral Load (Outpatients only) (Experimental)

Official URL: http://jembi.org/fhir/Library/OutpatientViralLoadLibrary Version: 1.0.1
Draft as of 2024-11-17 Computable Name: OutpatientViralLoadLibrary

CQL Measure that reports on all outpatients who have a HIV viral load date within the reporting period.

Numerator: Count all outpatients who have an HIV viral load result within the reporting period.

Denominator: Count all patients where the encounter class is for outpatient and the encounter date is within the reporting period.

Generated Narrative: Library OutpatientViralLoadLibrary

Related Artifacts

Depends OnLibrary FHIRHelpershttp://jembi.org/fhir/Library/FHIRHelpers|4.0.1
Depends OnLibrary FHIRCommonhttp://jembi.org/fhir/Library/FHIRCommon|4.0.1
Depends OnLibrary HIVChttp://jembi.org/fhir/Library/HIVCommon
Depends OnCode System Encounter Class CodesActCode

Parameters

Measurement Periodin01Period
Patientout01Patient
Outpatientout0*Encounter
Initial Populationout01boolean
Denominatorout01boolean
Viral Load Resultsout0*Observation
Numeratorout01boolean

Data Requirements

Type: Encounter (Encounter)
FilterValue
classOne of these codes: ActCode AMB: ambulatory

Contents

text/cql

library OutpatientViralLoad version '0.1.0'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'
include FHIRCommon version '4.0.1'
include HIVCommon called HIVC

codesystem "Encounter Class Codes": 'http://terminology.hl7.org/CodeSystem/v3-ActCode'

code "Outpatient Encounter Class": 'AMB' from "Encounter Class Codes"

parameter "Measurement Period" Interval<DateTime>
default Interval[@2023-12-01, @2023-12-31] //For testing only

context Patient

define "Outpatient":
  [Encounter: class = "Outpatient Encounter Class"] E
    where E.period during "Measurement Period"
      and E.status = 'finished'

define "Initial Population":
  exists ( "Outpatient" )

define "Denominator":
  "Initial Population"

define "Viral Load Results":
  HIVC.ViralLoadResult ( "Measurement Period")

define "Numerator":
  exists ( "Viral Load Results" )
  

Content not shown - (application/elm+xml, size = 17Kb )

Content not shown - (application/elm+json, size = 31Kb )