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.16 VMMC adverse events (Experimental)

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

a) Number or (b) % of adverse events during the reporting period

Knowledge Artifact Metadata
Name (machine-readable) HIVIND16
Title (human-readable) HIV.IND.16 VMMC adverse events
Status Draft
Experimental true
Description

a) Number or (b) % of adverse events 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 Decreased score indicates improvement
Population Basis boolean
Measure Population Criteria
Initial Population ID: HIV.IND.16.IP
Description:

Initial Population

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

a) 1 | b) Total number of individuals under going VMMC performed according to national standard during the reporting period

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

Number of people experiencing at least one moderate or severe adverse event during or following circumcision surgery during the reporting period

Logic Definition: Numerator
Stratifier ID: HIV.IND.16.S
Measure Logic
Primary Library HIV.IND.16 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 WC
Resource: WHOCommon
Canonical URL: http://smart.who.int/hiv/Library/WHOCommon
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 HCC
Resource: HIVConceptsCustom
Canonical URL: http://smart.who.int/hiv/Library/HIVConceptsCustom
Dependency Description: Library Elements
Resource: HIVElements
Canonical URL: http://smart.who.int/hiv/Library/HIVElements
Dependency Description: Code system HIVConcepts
Resource: WHO SMART HIV Concepts CodeSystem
Canonical URL: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Dependency Description: Code system AdverseEventSeverity
Resource: AdverseEventSeverity
Canonical URL: http://terminology.hl7.org/CodeSystem/adverse-event-severity
Direct Reference Code Display: VMMC
Code: HIV.PRV.DE7
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Code: severe
System: http://terminology.hl7.org/CodeSystem/adverse-event-severity
Direct Reference Code Code: moderate
System: http://terminology.hl7.org/CodeSystem/adverse-event-severity
Direct Reference Code Display: VMMC procedure performed
Code: HIV.B.DE197
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: Community-level testing
Code: HIV.B.DE16
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Rapid diagnostic test for HIV
Code: HIV.B.DE82
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Facility-level testing
Code: HIV.B.DE17
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Abnormal pain
Code: HIV.B.DE208
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Anaesthesia-related effects
Code: HIV.B.DE209
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Damage to the penis
Code: HIV.B.DE211
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Difficulty urinating
Code: HIV.B.DE212
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Excessive bleeding
Code: HIV.B.DE213
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Excessive skin removal
Code: HIV.B.DE214
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Excessive swelling
Code: HIV.B.DE215
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Haematoma
Code: HIV.B.DE216
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Infection
Code: HIV.B.DE217
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Injury to glans
Code: HIV.B.DE218
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Scar or disfigurement
Code: HIV.B.DE219
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Sharps injury to personnel
Code: HIV.B.DE220
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Wound disruption
Code: HIV.B.DE221
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Other
Code: HIV.B.DE222
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Voluntary medical male circumcision VMMC referral offered
Code: HIV.B.DE153
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Intraoperative
Code: HIV.B.DE205
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
Direct Reference Code Display: Postoperative
Code: HIV.B.DE206
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
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: AdverseEvent
Profile(s): AdverseEvent
Must Support Elements: suspectEntity, date, actuality, severity, event
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: status, code, performed
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: use
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: encounter, status, code, issued
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: location
Measure Logic Definitions
Logic Definition Library Name: HIVIndicatorElements
/* End of VMMC procedure date */

/*
@dataElement: HIV.B.DE201 - Adverse event severity
@activity: HIV.B21 Offer prevention options
@description: Severity of the adverse event associated with voluntary medical male circumcision (VMMC) procedure
*/

define "VMMC_adverse_event":
[AdverseEvent] AE 
  with [Procedure] P
      such that AE.suspectEntity.instance.references(P) and P.status = 'completed' 
      and P.code ~  Concepts."VMMC"
      and P.performed during "Measurement Period"
      and AE.date <= (P.performed + 30 days)
      and AE.date >= (P.performed)
  where AE.actuality = 'actual'
Logic Definition Library Name: HIVIND16Logic
/**
 * Numerator
 * 
 * Definition: Number of people experiencing at least one moderate or severe adverse event during or following circumcision surgery during the reporting period
 * Calculation: COUNT of clients with "VMMC procedure date" in the reporting period AND "Adverse event severity" IN 'Moderate', 'Severe' AND "Timing of adverse event" LESS THAN 30 days from "VMMC procedure date"
 */

define "Numerator":
  exists(HIE."VMMC_adverse_event" VMAC
    where (VMAC.severity = HCC."severe"
    or VMAC.severity = HCC."moderate")
  )
Logic Definition Library Name: HIVElements
/* End of STI services */

/*
@dataElement: HIV.PRV.DE7 - VMMC
@activity: HIV.B6 Capture or update client history
@description: Client accessed voluntary medical male circumcision (VMMC) services
*/
// define "VMMC_done":
// [Procedure] P
//   where P.status = 'completed'
//   and P.code ~ Concepts."Voluntary medical male circumcision VMMC"


define "VMMC":
  [Procedure] P
  where P.status = 'completed'
  and P.code ~ Concepts."VMMC procedure"
Logic Definition Library Name: HIVIndicatorElements
/* End of STI services */

/*
@dataElement: HIV.PRV.DE7 - VMMC
@activity: HIV.B6 Capture or update client history
@description: Client accessed voluntary medical male circumcision (VMMC) services
*/

define "VMMC":
  exists(Elements."VMMC" V where V.performed.toInterval() during "Measurement Period")
Logic Definition Library Name: HIVIND16Logic
/**
 * Denominator
 *
 * Definition: a) 1 | b) Total number of individuals under going VMMC performed according to national standard during the reporting period
 * Calculation: a) 1 | b) COUNT of clients with a "VMMC procedure date" in the reporting period
 */

define "Denominator":
  HIE."VMMC"
Logic Definition Library Name: HIVIND16Logic
/* 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
/*
 * By Age Stratifiers
 * Age (0–4, 5–9, 10–14, 15–19, 20–24, 25–49, 50+ years)
 * 
 */
define "By Age Stratifier 2":
  case 
      when "Age In Years" <= 4 then '0-4'
      when "Age In Years" <= 9 then '5-9'
      when "Age In Years" <= 14 then '10–14'
      when "Age In Years" <= 19 then '15–19'
      when "Age In Years" <= 24 then '20–24'
      when "Age In Years" <= 49 then '25–49'
      when "Age In Years" >= 50 then '50+'
      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: HIVIndicatorElements
/**
 * HIV Elements
 */

/* General Data Elements */

// From Common

define "Community_testing":
  exists([Observation] O
    with [Encounter] E
      such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~  Concepts."Community-level testing") 
  where (O.status in { 'final', 'amended' }
  and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82"
  and O.issued after start of "Measurement Period"
  and O.issued before end of "Measurement Period"))
Logic Definition Library Name: HIVIndicatorElements
/*@triggeredBy Encounter with location = facility level testing*/
define "Facility_testing":
  exists([Observation] O
    with [Encounter] E
      such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~  Concepts."Facility-level testing")
  where (O.status in { 'final', 'amended' }
  and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82"
  and O.issued after start of "Measurement Period"
  and O.issued before end of "Measurement Period")
  )
Logic Definition Library Name: HIVIndicatorElements
define setting:
  case
    when Community_testing then Concepts."Community-level testing"
    when Facility_testing then Concepts."Facility-level testing"
    else null
  end
Logic Definition Library Name: HIVIndicatorElements
define "VMMC_adverse_event_type":
    case 
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Abnormal pain") then  Concepts."Abnormal pain"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Anaesthesia-related effects") then  Concepts."Anaesthesia-related effects"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Damage to the penis") then  Concepts."Damage to the penis"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Difficulty urinating") then  Concepts."Difficulty urinating"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive bleeding") then  Concepts."Excessive bleeding"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive skin removal") then  Concepts."Excessive skin removal"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive swelling") then  Concepts."Excessive swelling"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Haematoma") then  Concepts."Haematoma"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Infection") then  Concepts."Infection"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Injury to glans") then  Concepts."Injury to glans"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Scar or disfigurement") then  Concepts."Scar or disfigurement"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Sharps injury to personnel") then  Concepts."Sharps injury to personnel"
        when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Wound disruption") then  Concepts."Wound disruption"
        else Concepts."Other - HIV.B.DE222"
    end
Logic Definition Library Name: HIVIndicatorElements
define "VMMC_adverse_event_Intraoperative":
[AdverseEvent] AE 
  with [Procedure] P
      such that AE.suspectEntity.instance.references(P) and P.status = 'completed' 
      and P.code ~  Concepts."Voluntary medical male circumcision VMMC referral"
      and P.performed after start of "Measurement Period"
      and P.performed before end of "Measurement Period"
      and AE.date = P.performed
  where AE.actuality = 'actual'
Logic Definition Library Name: HIVIndicatorElements
define "VMMC_adverse_event_Postoperative":
[AdverseEvent] AE 
  with [Procedure] P
      such that AE.suspectEntity.instance.references(P) and P.status = 'completed' 
      and P.code ~  Concepts."Voluntary medical male circumcision VMMC referral"
      and P.performed after start of "Measurement Period"
      and P.performed before end of "Measurement Period"
      and AE.date <= (P.performed + 30 days)
      and AE.date > (P.performed)
  where AE.actuality = 'actual'
Logic Definition Library Name: HIVIndicatorElements
define "VMMC_adverse_event_timing":
  case 
      when exists(VMMC_adverse_event_Intraoperative) then  Concepts."Intraoperative"
      when exists(VMMC_adverse_event_Postoperative) then  Concepts."Postoperative"
      else null
  end
Logic Definition Library Name: HIVIND16Logic
//provider type not provided?
//service site not provided?

define "Stratification":
 HIE."By Administrative Gender Stratifier".code 
  + ':' + HIE."By Age Stratifier 2"
+ ':' + HIE."By Geographic Region Stratifier"
 + ':' + HIE."setting".code
+ ':' + HIE."VMMC_adverse_event_type".code 
+ ':' + HIE."VMMC_adverse_event_timing".code
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 ToString(value ProcedureStatus): value.value
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 AdverseEventActuality): 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 ToString(value ObservationStatus): 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