HIVB7DTLogic
type: Library
node role: treeRoot
id:
  v: HIVB7DTLogic
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.B7.DT Logic Id: HIVB7DTLogic Version: 0.4.4 Url: HIV.B7.DT Logic Status: draft Experimental: true Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2025-12-08 16:41:10+0000 Publisher: WHO Description: Description not yet available for HIV.B7.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 Assay 1 result Observation 0 * Out Assay 2 result Observation 0 * Out Assay 1 boolean 0 1 Out Non-reactive result boolean 0 1 Out Report as HIV-negative boolean 0 1 Out Assay 3 result Observation 0 * Out Assay 2 boolean 0 1 Out Assay 3 boolean 0 1 Out Content: text/cql /** Library: HIV.B7.DT Logic @DecisionID: HIV.B7.DT @BusinessRule: WHO standard testing strategy for HIV-1 diagnosis (among people ≥18 months of age) @Trigger: HIV.B7 Test for HIV using testing algorithm, HIV.C4 Test for HIV using testing algorithm, HIV.D.11 Retest using HIV strategy @Description: WHO standard testing strategy for HIV-1 diagnosis (among people ≥18 months of age) Data Concepts: */ library HIVB7DTLogic 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 /* @output: "Report as HIV-negative" */ define "Report as HIV-negative": case when "Assay 1" and "Non-reactive result" then true else null end /* Supporting Logic */ define "Assay 1": exists("Assay 1 result") and not(exists("Assay 2 result")) define "Assay 2": exists("Assay 2 result") and not(exists("Assay 3 result")) define "Assay 3": exists("Assay 3 result") define "Assay 1 result": Elements."Test result of HIV assay 1 B.DE94" define "Assay 2 result": Elements."Test result of HIV assay 2 B.DE98" define "Assay 3 result": Elements."Test result of HIV assay 3 B.DE102" define "Non…
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/HIVB7DTLogic
  l: HIVB7DTLogic
version:
  v: 0.4.4
name:
  v: HIVB7DTLogic
title:
  v: HIV.B7.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-08T16:41:10+00:00
publisher:
  v: WHO
contact:
  name:
    v: WHO
  telecom:
    system:
      v: url
    value:
      v: http://who.int
description:
  v: Description not yet available for HIV.B7.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: Assay 1 result
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: Observation
parameter:
  name:
    v: Assay 2 result
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: Observation
parameter:
  name:
    v: Assay 1
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Non-reactive result
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Report as HIV-negative
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Assay 3 result
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: Observation
parameter:
  name:
    v: Assay 2
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Assay 3
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
content:
  content type:
    v: text/cql
content:
  content type:
    v: application/elm+xml
content:
  content type:
    v: application/elm+json