HIVD12DTLogic
type: Library
node role: treeRoot
id:
  v: HIVD12DTLogic
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.D12.DT Logic Id: HIVD12DTLogic Version: 0.4.4 Url: HIV.D12.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.D12.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 Patient Patient 0 1 Out HIV testing services visit boolean 0 1 Out ART initiation visit boolean 0 1 Out Clinical visit boolean 0 1 Out Age 20 or older boolean 0 1 Out Age under 20 boolean 0 1 Out Age 10 or older boolean 0 1 Out HIV Positive test result boolean 0 1 Out Not on ART boolean 0 1 Out On ART boolean 0 1 Out Client is female boolean 0 1 Out CD4 less than or equal to 100 cells/mm3 boolean 0 1 Out CD4 less than or equal to 200 cells/mm3 boolean 0 1 Out On AZT boolean 0 1 Out On TDF boolean 0 1 Out Suspicion of treatment failure or interruption boolean 0 1 Out Guidance string 0 1 Out Content: text/cql /** Library: HIV.D12.DT Logic @DecisionID: HIV.D12.DT @BusinessRule: Determine recommended screenings and tests @Trigger: HIV.D12.Determine recommended screenings and tests @HitPolicy: Rule Order @Description: Determine recommended screenings and tests Data Concepts: Consolidated guidelines on HIV prevention, testing, treatment, service delivery and monitoring: recommendations for a public health approach (2021). */ library HIVD12DTLogic 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 context Patient /* @input: "Reason for Visit" @pseudocode: "Reason for visit"='HIV testing services visit' */ define "HIV testing services visit": exists( Elements."Reason for visit D.DE1" O where O.value ~ Concepts."HIV testing services visit" ) /* @input: "Reason for Visit" @pseudocode: …
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/HIVD12DTLogic
  l: HIVD12DTLogic
version:
  v: 0.4.4
name:
  v: HIVD12DTLogic
title:
  v: HIV.D12.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.D12.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: Patient
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: Patient
parameter:
  name:
    v: HIV testing services visit
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: ART initiation visit
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Clinical visit
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Age 20 or older
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Age under 20
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Age 10 or older
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: HIV Positive test result
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Not on ART
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: On ART
  use:
    v: out
  min:
    v: 0
  max:
    v: 1

v: boolean

name:
  v: Client is female
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: CD4 less than or equal to 100 cells/mm3
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: CD4 less than or equal to 200 cells/mm3
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: On AZT
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: On TDF
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Suspicion of treatment failure or interruption
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