Starter FHIR Implementation Guide
1.0.1 - draft
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
Official URL: http://jembi.org/fhir/Library/ViralLoadStatusLibrary | Version: 1.0.1 | |||
Draft as of 2024-11-17 | Computable Name: ViralLoadStatusLibrary |
Checks for the most recent viral load and determines the suppression status.
Generated Narrative: Library ViralLoadStatusLibrary
Depends On | Library FHIRHelpers | http://jembi.org/fhir/Library/FHIRHelpers|4.0.1 |
Depends On | Library FHIRCommon | http://jembi.org/fhir/Library/FHIRCommon|4.0.1 |
Depends On | Library HIVC | http://jembi.org/fhir/Library/HIVCommon |
Depends On | Library LOCALC | http://jembi.org/fhir/Library/LocalCommon |
Measurement Period | in | 0 | 1 | Period |
Patient | out | 0 | 1 | Patient |
Most Recent Viral Load Date | out | 0 | 1 | dateTime |
Total Viral Load Observations | out | 0 | 1 | integer |
Most Recent Viral Load Observation | out | 0 | 1 | Observation |
Most Recent Viral Load Indication | out | 0 | 1 | string |
text/cql
library ViralLoadStatus 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
include LocalCommon called LOCALC
parameter "Measurement Period" Interval<DateTime>
default Interval[@2023-12-01, @2023-12-31] //For testing only
context Patient
define "Most Recent Viral Load Date":
LOCALC.ObservationDate(LOCALC.MostRecent ( HIVC.ViralLoadResult ( "Measurement Period" ) ))
define "Total Viral Load Observations":
Count ( HIVC.ViralLoadResult ( "Measurement Period" ) )
define "Most Recent Viral Load Observation":
LOCALC.MostRecent ( HIVC.ViralLoadResult ( "Measurement Period" ) )
define "Most Recent Viral Load Indication":
SuppressionStatus(LOCALC.MostRecent(HIVC.ViralLoadResult("Measurement Period")))
define function SuppressionStatus(obs FHIR.Observation):
if ( obs.value as Quantity ).value > 1000 then 'Unsuppressed'
else if ( obs.value as Quantity ).value <= 1000 then 'Suppressed'
else null
Content not shown - (
application/elm+xml
, size = 23Kb )
Content not shown - (
application/elm+json
, size = 43Kb )