WHO SMART Guidelines - HIV
0.3.0 - ci-build

WHO SMART Guidelines - HIV - Local Development build (v0.3.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Library: HIV.B7.DT Logic (Experimental)

Official URL: http://smart.who.int/hiv/Library/HIVB7DTLogic Version: 0.3.0
Draft as of 2025-01-02 Computable Name: HIVB7DTLogic

Description not yet available for HIV.B7.DT Logic.

Title: HIV.B7.DT Logic
Id: HIVB7DTLogic
Version: 0.3.0
Url: HIV.B7.DT Logic
Status: draft
Experimental: true
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Date: 2025-01-02 00:27:00+0000
Publisher: WHO
Description:

Description not yet available for HIV.B7.DT Logic.

Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
PatientPatient01Out
Assay 1 resultObservation0*Out
Assay 2 resultObservation0*Out
Assay 1boolean01Out
Non-reactive resultboolean01Out
Report as HIV-negativeboolean01Out
Assay 3 resultObservation0*Out
Assay 2boolean01Out
Assay 3boolean01Out
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-reactive result":
  false
Content: application/elm+xml
Encoded data (18700 characters)
Content: application/elm+json
Encoded data (30880 characters)