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/HIVCommonLibrary | Version: 1.0.1 | |||
Draft as of 2024-11-17 | Computable Name: HIVCommonLibrary |
Common CQL for HIV calculations.
Generated Narrative: Library HIVCommonLibrary
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 | Code System Observation Category Codes | Observation Category Codes |
Depends On | Code System SNOMED CT Codes | SNOMED CT (all versions) |
Depends On | Code System LOINC Codes | Logical Observation Identifiers, Names and Codes (LOINC) |
Depends On | Value Set HIV Test Types | HIV Test Types |
Depends On | Value Set ARV Drugs | ARV Drugs |
Patient | out | 0 | 1 | Patient |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: SNOMED CT 315124004: HIV viral load |
Type: Observation (Observation) | |
Filter | Value |
code | In ValueSet HIV Test Types |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: LOINC 47248-0: HIV Antiretroviral therapy Antiretroviral therapy status section |
text/cql
library HIVCommon version '0.1.0'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
include FHIRCommon version '4.0.1'
valueset "HIV Test Types": 'http://jembi.org/fhir/ValueSet/hiv-test-type-value-set'
valueset "ARV Drugs": 'http://jembi.org/fhir/ValueSet/arv-treatment-value-set'
codesystem "Observation Category Codes": 'http://terminology.hl7.org/CodeSystem/observation-category'
codesystem "SNOMED CT Codes": 'http://snomed.info/sct'
codesystem "LOINC Codes": 'http://loinc.org'
code "Laboratory Observation Category": 'laboratory' from "Observation Category Codes"
code "HIV Viral Load Observation Code": '315124004' from "SNOMED CT Codes"
code "HIV+ Code": 'LA24955-9' from "LOINC Codes"
code "Initiated ART Code": '63936-9' from "LOINC Codes"
code "ART Status Code": '47248-0' from "LOINC Codes"
context Patient
define function ViralLoadResult(period Interval<DateTime>):
[Observation: "HIV Viral Load Observation Code"] O
where exists ( O.category C
where C = "Laboratory Observation Category"
)
and O.status = 'final'
and ( O.value as Quantity ).value is not null
and ( ( O.effective as dateTime ).value during period
or ( O.effective as Period ) starts during period
)
define function HIVPostivePatients(period Interval<DateTime>):
[Observation: code in "HIV Test Types"] O
where ( O.value as CodeableConcept ) = "HIV+ Code"
and ( ( O.effective as dateTime ).value during period
or ( O.effective as Period ) starts during period
)
define function InitiatedART(period Interval<DateTime>):
[Observation: "ART Status Code"] O
where ( O.value as CodeableConcept ) = "Initiated ART Code"
and ( ( O.effective as dateTime ).value during period
or ( O.effective as Period ) starts during period
)
Content not shown - (
application/elm+xml
, size = 44Kb )
Content not shown - (
application/elm+json
, size = 81Kb )