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.92 HCV cured among people living with HIV (Experimental)

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

% of people living with HIV and co-infected with HCV who were confirmed to be cured of HCV during the reporting period

Knowledge Artifact Metadata
Name (machine-readable) HIVIND92
Title (human-readable) HIV.IND.92 HCV cured among people living with HIV
Status Draft
Experimental true
Description

% of people living with HIV and co-infected with HCV who were confirmed to be cured of HCV during the reporting period

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.92.IP
Description:

Initial Population

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

Number of people living with HIV and co-infected with HCV who completed HCV treatment and were assessed for sustained virological response

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

Number of people living with HIV diagnosed with HCV infection who have completed HCV treatment and had a sustained virological response (SVR). SVR is assessed by a viral load measurement 12–24 weeks after the end of treatment.

Logic Definition: Numerator
Measure Logic
Primary Library HIV.IND.92 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 Elements
Resource: HIVElements
Canonical URL: http://smart.who.int/hiv/Library/HIVElements
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 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 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: Library WC
Resource: WHOCommon
Canonical URL: http://smart.who.int/hiv/Library/WHOCommon
Dependency Description: Code system HIVConcepts
Resource: WHO SMART HIV Concepts CodeSystem
Canonical URL: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Dependency Description: Code system ConditionClinicalStatusCodes
Resource: Condition Clinical Status Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-clinical
Dependency Description: Code system ConditionCategoryCodes
Resource: Condition Category Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-category
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
Direct Reference Code Display: HIV-positive
Code: HIV.B.DE116
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Code: active
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Display: Encounter Diagnosis
Code: encounter-diagnosis
System: http://terminology.hl7.org/CodeSystem/condition-category
Direct Reference Code Display: HIV status
Code: HIV.B.DE115
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Positive
Code: HIV.D.DE171
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: HCV test result
Code: HIV.D.DE170
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Not detected
Code: HIV.D.DE181
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Code: HCV viral load
System: https://worldhealthorganization.github.io/smart-hiv/CodeSystem/missing-concepts
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
Measure Logic Data Requirements
Data Requirement Type: Condition
Profile(s): Condition
Must Support Elements: code, clinicalStatus, category, onset
Code Filter(s):
Path: code
Code:
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, status, value, issued, effective
Code Filter(s):
Path: code
Code:
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, status, value, partOf
Code Filter(s):
Path: code
Code:
Data Requirement Type: MedicationStatement
Profile(s): MedicationStatement
Must Support Elements: reasonCode, effective
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: status, code, performed
Measure Logic Definitions
Logic Definition Library Name: HIVElements
define "HIV Status Positive Condition":
  [Condition: Concepts."HIV-positive - HIV.B.DE116"] C
    where C.clinicalStatus ~ ConceptsCustom."active"
      and exists(C.category CC where CC ~ ConceptsCustom."encounter-diagnosis")
    sort by start of onset.toInterval()
Logic Definition Library Name: HIVIndicatorElements
define "HIV Status Positive Condition":
  Elements."HIV Status Positive Condition" C
  where C.onset before end of "Measurement Period"
Logic Definition Library Name: HIVElements
/* End of HIV-inconclusive */

/*
@dataElement: HIV.B.DE115 - HIV status
@activity: HIV.B7 Test for HIV using testing algorithm
@description: HIV status reported after applying the national HIV testing algorithm. No single HIV test can provide an HIV-positive diagnosis.
*/
define "HIV Status Observation":
  [Observation: Concepts."HIV status"] O
    where O.status in { 'final', 'amended', 'corrected' }
Logic Definition Library Name: HIVElements
define "HIV Status Positive Observation":
"HIV Status Observation" O
    where O.value ~ Concepts."HIV-positive - HIV.B.DE116"
      sort by start of effective.toInterval()
Logic Definition Library Name: HIVIndicatorElements
define "HIV Status Positive Observation":
  Elements."HIV Status Positive Observation" O
  where O.issued before end of "Measurement Period"
  or O.effective.toInterval() starts before end of "Measurement Period"
Logic Definition Library Name: HIVIndicatorElements
define "Has HIV-positive Status":
  exists "HIV Status Positive Condition"
  or exists "HIV Status Positive Observation"
Logic Definition Library Name: HIVElements
/* End of Not detected D.DE181 */

/*
@dataElement: HIV.D.DE182 - HCV medicine type
@activity: HIV.D12 Determine recommended screenings and tests
@description: Type of medicine client is prescribed
*/

define "HCV medicine type":
[MedicationStatement] MS
    where exists(MS.reasonCode C where C ~ Concepts."Positive - HIV.D.DE171")
Logic Definition Library Name: HIVIndicatorElements
/* End of HCV treatment start date */

/*
@dataElement: HIV.D.DE176 - HCV treatment completion date
@activity: HIV.D12 Determine recommended screenings and tests
@description: Date when client completed treatment for hepatitis C virus (HCV)
*/

define "HCV treatment completion date":
  exists Elements."HCV medicine type" MS where end of MS.effective.toInterval() during "Measurement Period"
Logic Definition Library Name: HIVElements
/* End of HCV viral load test date D.DE178 */

/*
@dataElement: HIV.D.DE179 - HCV viral load test result
@activity: HIV.D12 Determine recommended screenings and tests
@description: Hepatitis C viral load test result (qualitative)
*/

define "HCV viral load test result D.DE179":
  [Observation: Concepts."HCV test result - HIV.D.DE170"] O
    where O.status in { 'final', 'amended', 'corrected' }
Logic Definition Library Name: HIVElements
/* End of Detected D.DE180 */

/*
@dataElement: HIV.D.DE181 - Not detected
@activity: HIV.D12 Determine recommended screenings and tests
@description: HCV was not detected
*/

define "Not detected D.DE181":
  "HCV viral load test result D.DE179" O where O.value ~ Concepts."Not detected - HIV.D.DE181"
Logic Definition Library Name: HIVElements
/* End of HCV treatment completion date */

/*
@dataElement: HIV.D.DE178 - HCV viral load test date
@activity: HIV.D12 Determine recommended screenings and tests
@description: Hepatitis C viral load test date
*/

define "HCV viral load test date D.DE178":
  [Procedure] P
  where P.status = 'completed'
  and P.code ~ ConceptsCustom."HCV viral load"
Logic Definition Library Name: HIVElements
/* End of HCV treatment start date */

/*
@dataElement: HIV.D.DE176 - HCV treatment completion date
@activity: HIV.D12 Determine recommended screenings and tests
@description: Date when client completed treatment for hepatitis C virus (HCV)
*/

define "HCV treatment completion date":
  "HCV medicine type" MS
  sort by end of effective.toInterval()
Logic Definition Library Name: HIVIND92Logic
/**
 * Numerator
 * 
 * Definition: Number of people living with HIV diagnosed with HCV infection who have completed HCV treatment and had a sustained virological response (SVR). SVR is assessed by a viral load measurement 12–24 weeks after the end of treatment.
 * Calculation: COUNT of clients with "HIV status"='HIV-positive' with "HCV treatment completion date" in the reporting period AND with "HCV viral load test date" is BETWEEN '12, 24' weeks after "HCV treatment completion date" AND "HCV viral load test result"='Not detected'
 */

define "Numerator":
  HIE."Has HIV-positive Status" and
  HIE."HCV treatment completion date" and
  exists(
    HE."Not detected D.DE181" O 
    with HE."HCV viral load test date D.DE178" P
    such that O.partOf.references(P) and (weeks between end of P.performed.toInterval() and date from end of Last(HE."HCV treatment completion date").effective.toInterval()> 12 weeks) and 
    (weeks between end of P.performed.toInterval() and date from end of Last(HE."HCV treatment completion date").effective.toInterval()< 24 weeks)
  )
Logic Definition Library Name: HIVIND92Logic
/**
 * Denominator
 *
 * Definition: Number of people living with HIV and co-infected with HCV who completed HCV treatment and were assessed for sustained virological response
 * Calculation: COUNT of clients with "HIV status"='HIV-positive' with "HCV treatment completion date" in the reporting period AND with "HCV viral load test date" is BETWEEN '12, 24' weeks after "HCV treatment completion date"
 */

define "Denominator":
  HIE."Has HIV-positive Status" and
  HIE."HCV treatment completion date" and
  exists(HE."HCV viral load test date D.DE178" P
    where (weeks between end of P.performed.toInterval() and date from end of Last(HE."HCV treatment completion date").effective.toInterval()> 12 weeks) and 
    (weeks between end of P.performed.toInterval() and date from end of Last(HE."HCV treatment completion date").effective.toInterval()< 24 weeks)
  )
Logic Definition Library Name: HIVIND92Logic
/* Populations */

/*
 *Initial Population
 */

define "Initial Population":
  true
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 ToDateTime(value dateTime): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ObservationStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToDateTime(value instant): 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
Generated using version 0.4.6 of the sample-content-ig Liquid templates