HIVD15DTLogic
type: Library
node role: treeRoot
id:
  v: HIVD15DTLogic
meta:
  profile:
    v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary
    l: crmi-shareablelibrary
  profile:
    v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary
    l: crmi-publishablelibrary
  profile:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library
    l: cql-library
  profile:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module
    l: cql-module
text:
  status:
    v: extensions
  div:
    v: Title: HIV.D15.DT Logic Id: HIVD15DTLogic Version: 0.4.4 Url: HIV.D15.DT Logic Status: draft Experimental: true Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2025-12-10 09:22:27+0000 Publisher: WHO Description: HIV.D15.DT Logic Related Artifacts: Dependencies http://smart.who.int/hiv/Library/HIVCommon|0.0.1 HIVConcepts HIVEncounterElements WHOCommon Parameters: Name Type Min Max In/Out Today date 0 1 In Patient Patient 0 1 Out WHO HIV clinical stage condition or symptom Observation 0 * Out Age 15 or older boolean 0 1 Out Age under 15 boolean 0 1 Out Age over 6 weeks boolean 0 1 Out Age over 1 month boolean 0 1 Out WHO HIV clinical stage 1 boolean 0 1 Out WHO HIV clinical stage 2 boolean 0 1 Out WHO HIV clinical stage 3 boolean 0 1 Out WHO HIV clinical stage 4 boolean 0 1 Out Guidance string 0 1 Out Content: text/cql /** Library: HIV.D15.DT Logic @DecisionID: HIV.D15.DT @BusinessRule: Determine WHO clinical staging of HIV disease in adults, adolescents and children @Trigger: HIV.D15 Determine clinical stage of HIV @HitPolicy: Rule Order @Description: Determine WHO clinical staging of HIV disease in adults, adolescents and children Data Concepts: * HIV.D.DE289: WHO HIV clinical stage condition or symptom * HIV.D.DE934: WHO HIV clinical stage condition or symptom * HIV.A.DE17: Age | Calculated age (number of years) of the client based on date of birth Consolidated guidelines on HIV prevention, testing, treatment, service delivery and monitoring: recommendations for a public health approach (2021) Chapter 5: Advanced HIV Disease. Figure 5.1: Algorithm for providing a package of care for people with advanced HIV disease. */ library HIVD15DTLogic using FHIR version '4.0.1' include HIVCommon version '0.0.1' called HIC include HIVConcepts called Concepts include HIVEncounterElements called Elements include FHIRHelpers version '4.0.1' include WHOCommon called WCom parameter Today default Today() context Patient /* @input: "WHO HIV…
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability
    l: cqf-knowledgeCapability
  value: Code
    v: computable
url:
  v: http://smart.who.int/hiv/Library/HIVD15DTLogic
  l: HIVD15DTLogic
version:
  v: 0.4.4
name:
  v: HIVD15DTLogic
title:
  v: HIV.D15.DT Logic
status:
  v: draft
experimental:
  v: true
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
      l: library-type
    code:
      v: logic-library
date:
  v: 2025-12-10T09:22:27+00:00
publisher:
  v: WHO
contact:
  name:
    v: WHO
  telecom:
    system:
      v: url
    value:
      v: http://who.int
description:
  v: HIV.D15.DT Logic
related artifact:
  type:
    v: depends-on
  display:
    v: Library HIC
  resource:
    v: http://smart.who.int/hiv/Library/HIVCommon|0.0.1
    l: http://smart.who.int/hiv/Library/HIVCommon
related artifact:
  type:
    v: depends-on
  display:
    v: Library Concepts
  resource:
    v: http://smart.who.int/hiv/Library/HIVConcepts
    l: HIVConcepts
related artifact:
  type:
    v: depends-on
  display:
    v: Library Elements
  resource:
    v: http://smart.who.int/hiv/Library/HIVEncounterElements
    l: HIVEncounterElements
related artifact:
  type:
    v: depends-on
  display:
    v: Library WCom
  resource:
    v: http://smart.who.int/hiv/Library/WHOCommon
    l: WHOCommon
parameter:
  name:
    v: Today
  use:
    v: in
  min:
    v: 0
  max:
    v: 1
  type:
    v: date
parameter:
  name:
    v: Patient
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: Patient
parameter:
  name:
    v: WHO HIV clinical stage condition or symptom
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: Observation
parameter:
  name:
    v: Age 15 or older
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Age under 15
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Age over 6 weeks
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Age over 1 month
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: WHO HIV clinical stage 1
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: WHO HIV clinical stage 2
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: WHO HIV clinical stage 3
  use:
    v: out
  min:
    v: 0
  max:
    v: 1

v: boolean

name:
  v: WHO HIV clinical stage 4
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Guidance
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

content type:
  v: text/cql

content type:
  v: application/elm+xml

content type:
  v: application/elm+json