WHO SMART Guidelines - HIV
0.4.4 - ci-build

WHO SMART Guidelines - HIV, published by WHO. This guide is not an authorized publication; it is the continuous build for version 0.4.4 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-hiv/tree/main and changes regularly. See the Directory of published versions

Measure: HIV.IND.57 Viral suppression among people living with HIV engaged in DSD ART models (Experimental)

Official URL: http://smart.who.int/hiv/Measure/HIVIND57 Version: 0.4.4
Draft as of 2024-08-18 Computable Name: HIVIND57

% of people living with HIV engaged in DSD ART models who have virological suppression

Knowledge Artifact Metadata
Name (machine-readable) HIVIND57
Title (human-readable) HIV.IND.57 Viral suppression among people living with HIV engaged in DSD ART models
Status Draft
Experimental true
Description

% of people living with HIV engaged in DSD ART models who have virological suppression

Measure Steward WHO
Steward Contact Details WHO: http://who.int
Measure Metadata
Version Number 0.4.4
Measure Scoring Proportion
Improvement Notation Increased score indicates improvement
Population Basis boolean
Measure Population Criteria
Initial Population ID: HIV.IND.57.IP
Description:

Initial Population

Logic Definition: Initial Population
Denominator ID: HIV.IND.57.DEN
Description:

Number of people enrolled in a DSD ART model with at least one routine viral load result in a medical or laboratory record during the reporting period

Logic Definition: Denominator
Numerator ID: HIV.IND.57.NUM
Description:

Number of people enrolled in a DSD ART model with at least one routine viral load test during the reporting period who have virological suppression (less than 1000 copies/mL) at 6 months after ART initiation and yearly thereafter (that is, at 24, 36, 48 and 60 months, etc. after ART initiation).

Logic Definition: Numerator
Stratifier ID: HIV.IND.57.S
Measure Logic
Primary Library HIV.IND.57 Logic
Dependency Description: FHIR model information
Resource: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
Canonical URL: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
Dependency Description: Library HIE
Resource: HIVIndicatorElements
Canonical URL: http://smart.who.int/hiv/Library/HIVIndicatorElements
Dependency Description: Library FHIRHelpers
Resource: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
Canonical URL: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
Dependency Description: Library Concepts
Resource: http://smart.who.int/hiv/Library/HIVConcepts|0.0.2
Canonical URL: http://smart.who.int/hiv/Library/HIVConcepts|0.0.2
Dependency Description: Library Elements
Resource: HIVElements
Canonical URL: http://smart.who.int/hiv/Library/HIVElements
Dependency Description: Library WC
Resource: WHOCommon
Canonical URL: http://smart.who.int/hiv/Library/WHOCommon
Dependency Description: Library ConceptsCustom
Resource: http://smart.who.int/hiv/Library/HIVConceptsCustom|0.0.1
Canonical URL: http://smart.who.int/hiv/Library/HIVConceptsCustom|0.0.1
Dependency Description: Code system HIVConcepts
Resource: WHO SMART HIV Concepts CodeSystem
Canonical URL: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Dependency Description: Code system missing concepts
Resource: https://worldhealthorganization.github.io/smart-hiv/CodeSystem/missing-concepts
Canonical URL: https://worldhealthorganization.github.io/smart-hiv/CodeSystem/missing-concepts
Dependency Description: Code system ObservationCategoryCodes
Resource: Observation Category Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/observation-category
Direct Reference Code Display: Currently enrolled in DSD ART model
Code: HIV.D.DE762
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Viral load test result
Code: HIV.D.DE387
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Code: viral load test
System: https://worldhealthorganization.github.io/smart-hiv/CodeSystem/missing-concepts
Direct Reference Code Display: Routine viral load test
Code: HIV.D.DE392
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Male
Code: HIV.A.DE20
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Female
Code: HIV.A.DE19
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Transgender female
Code: HIV.A.DE22
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Transgender male
Code: HIV.A.DE21
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Other
Code: HIV.A.DE23
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Key population member*
Code: HIV.B.DE49
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Social History
Code: social-history
System: http://terminology.hl7.org/CodeSystem/observation-category
Parameter Name: Measurement Period
Use: In
Min Cardinality: 0
Max Cardinality: 1
Type: Period
Parameter Name: Numerator
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Parameter Name: Denominator
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Parameter Name: Initial Population
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Parameter Name: Stratification
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: string
Measure Logic Data Requirements
Data Requirement Type: EpisodeOfCare
Profile(s): EpisodeOfCare
Must Support Elements: type, statusHistory, period
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, status, effective, partOf, value
Code Filter(s):
Path: code
Code:
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, status, category, effective, issued, code.coding
Code Filter(s):
Path: code
Code:
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: status, code, reasonCode, performed
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: use
Measure Logic Definitions
Logic Definition Library Name: HIVIndicatorElements
/* End of Date DSD ART eligibility assessed */

/*
@dataElement: HIV.D.DE762 - Currently enrolled in DSD ART model
@activity: HIV.D21 Determine regimen and treatment options
@description: Client currently enrolled in differentiated service delivery (DSD) ART model
*/

define "Currently enrolled in DSD ART model":
  exists(
    [EpisodeOfCare] EOC
    where exists(EOC.type T where T ~ Concepts."Currently enrolled in DSD ART model")
    and (exists (
      EOC.statusHistory H
      where H.period starts after start of "Measurement Period"
      and H.period starts before end of "Measurement Period"
    ) 
    or (
      EOC.period starts after start of "Measurement Period"
      and EOC.period starts before end of "Measurement Period"
    )
    )
  )
Logic Definition Library Name: HIVElements
/* End of Time to start ART */

/*
@dataElement: HIV.D.DE387 - Viral load test result
@activity: HIV.D20 Diagnostics
@description: Result from the viral load test in number of copies/mL
*/

define "Viral load test result D.DE387":
  [Observation: Concepts."Viral load test result - HIV.D.DE387"] O
    where O.status in { 'final', 'amended', 'corrected' }
Logic Definition Library Name: HIVIndicatorElements
/* End of Date of baseline CD4 count test D.DE368 */

/*
@dataElement: HIV.D.DE387 - Viral load test result
@activity: HIV.D20 Diagnostics
@description: Result from the viral load test in number of copies/mL
*/

define "Viral load test result D.DE387":
  Elements."Viral load test result D.DE387" O
    where O.effective.toInterval() during "Measurement Period"
Logic Definition Library Name: HIVElements
define "routine viral load sample collection":
  [Procedure] P
  where P.status = 'completed'
  and P.code ~ ConceptsCustom."viral load test"
  and exists(P.reasonCode RC where RC ~ Concepts."Routine viral load test")
Logic Definition Library Name: HIVIND57Logic
/**
 * Numerator
 * 
 * Definition: Number of people enrolled in a DSD ART model with at least one routine viral load test during the reporting period who have virological suppression (<1000 copies/mL) at 6 months after ART initiation and yearly thereafter (that is, at 24, 36, 48 and 60 months, etc. after ART initiation).
 * Calculation: COUNT of clients with "Currently enrolled in DSD ART model"=True AND "Date of viral load sample collection" during the reporting period AND "Reason for HIV viral load test"='Routine viral load test' AND "Viral load test result" LESS THAN 1000 copies/mL
 */

define "Numerator":
  HIE."Currently enrolled in DSD ART model"
   and exists(
    HIE."Viral load test result D.DE387" VL
    with HE."routine viral load sample collection" P 
    such that VL.partOf.references(P) and  P.performed.toInterval() during "Measurement Period"
    where VL.value < 1000
    )
Logic Definition Library Name: HIVIND57Logic
/**
 * Denominator
 *
 * Definition: Number of people enrolled in a DSD ART model with at least one routine viral load result in a medical or laboratory record during the reporting period
 * Calculation: COUNT of clients with "Currently enrolled in DSD ART model"=True AND "Date of viral load sample collection" during the reporting period AND "Reason for HIV viral load test"='Routine viral load test'
 */

define "Denominator":
  HIE."Currently enrolled in DSD ART model"
   and exists(
    HIE."Viral load test result D.DE387" VL
    with HE."routine viral load sample collection" P 
    such that VL.partOf.references(P) and  P.performed.toInterval() during "Measurement Period"
    )
Logic Definition Library Name: HIVIND57Logic
/* Populations */

/*
 *Initial Population
 */

define "Initial Population":
  true
Logic Definition Library Name: HIVIndicatorElements
/*
@dataElement: HIV.A.DE18 - Gender
@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record
@description: Gender of the client
*/

/*
 * By Administrative Gender of Patient Stratifier
 * Need to expand codes
 */

define "By Administrative Gender Stratifier":
  case 
      when Patient.gender = 'male' then Concepts."Male"
      when Patient.gender = 'female' then Concepts."Female"
      when Patient.gender = 'transgender female' then Concepts."Transgender female"
      when Patient.gender = 'transgender male' then Concepts."Transgender male"
      else Concepts."Other - HIV.A.DE23"
  end
Logic Definition Library Name: HIVIndicatorElements
/* End of Visit date A.DE3 */

/*
@dataElement: HIV.A.DE17 - Age
@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record
@description: Calculated age (number of years) of the client based on date of birth
*/
define "Age In Years":
  AgeInYearsAt(start of "Measurement Period")
Logic Definition Library Name: HIVIndicatorElements
//(0–4, 5–14, 15–24, 25+ years) 
define "By Age Stratifier 8":
  case 
      when "Age In Years" <= 4 then '0-4'
      when "Age In Years" <= 14 then '5-14'
      when "Age In Years" <= 24 then '15-24'
      when "Age In Years" >= 25 then '25+'
      else null
  end
Logic Definition Library Name: HIVIndicatorElements
// Geographic Region
define "By Geographic Region Stratifier":
    First(Patient.address A where A.use in { 'home' }).state
Logic Definition Library Name: HIVElements
/* End of Key population member B.DE49 */

/*
@dataElement: HIV.B.DE50 - Key population member type
@activity: HIV.B6 Capture or update client history
@description: The type of key population that the client is included in
*/
define "Key population member type Observation":
  [Observation: Concepts."Key population member - HIV.B.DE49"] O
    where O.status in { 'final', 'amended', 'corrected' }
    and exists(O.category OC where OC ~ ConceptsCustom."social-history")
Logic Definition Library Name: HIVIndicatorElements
define "Key population member type Observation":
  Elements."Key population member type Observation" O
    where O.effective.toInterval() before end of "Measurement Period"
    or O.issued before end of "Measurement Period"
Logic Definition Library Name: HIVIndicatorElements
// Stratifier
define patientGroups:
  "Key population member type Observation" O
  return Combine(O.code.coding.code, ':')
Logic Definition Library Name: HIVIND57Logic
define "Stratification":
 HIE."By Administrative Gender Stratifier".code 
  + ':' + HIE."By Age Stratifier 8"
+ ':' + HIE."By Geographic Region Stratifier"
+ Combine(HIE.patientGroups, ':')
Logic Definition Library Name: FHIRHelpers
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }
Logic Definition Library Name: FHIRHelpers
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }
Logic Definition Library Name: FHIRHelpers
define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period."start" is null then
            Interval(period."start".value, period."end".value]
        else
            Interval[period."start".value, period."end".value]
Logic Definition Library Name: FHIRHelpers
define function ToString(value ObservationStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ProcedureStatus): value.value
Logic Definition Library Name: WHOCommon
/*
@description: Returns true if any of the given references are to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(references List<FHIR.Reference>, resource FHIR.Resource):
  exists (references R where R.references(resource))
Logic Definition Library Name: WHOCommon
/*
@description: Returns true if the given reference is to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference FHIR.Reference, resource FHIR.Resource):
  resource.id = Last(Split(reference.reference, '/'))
Logic Definition Library Name: FHIRHelpers
define function ToString(value string): value.value
Logic Definition Library Name: FHIRHelpers
define function ToInteger(value integer): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value AdministrativeGender): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value AddressUse): value.value
Logic Definition Library Name: FHIRHelpers
define function ToDateTime(value instant): value.value
Generated using version 0.4.6 of the sample-content-ig Liquid templates