Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSG-99 Indicators HIV.IND.37-HIV.IND.45 and Refactoring of Indicator Logic #43

Closed
wants to merge 13 commits into from
22 changes: 11 additions & 11 deletions input/cql/HIVB9DTLogic.cql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
@DecisionID: HIV.B9.DT
@DecisionID: HIV.B9.DT Logic
@BusinessRule: HIV restesting recommendations
@Trigger: HIV.B9 Determine recommended services
@HitPolicy: Rule order
Expand All @@ -22,8 +22,8 @@ library HIVB9DTLogic
// Included Libraries
using FHIR version '4.0.1'

include HIVCommon version '0.0.1' called HIC
include HIVConcepts called HCx
include HIVCommon version '0.0.1' called Common
include HIVConcepts called Concepts
include HIVConfig called Config
include HIVEncounterElements called Elements
include FHIRHelpers version '4.0.1'
Expand All @@ -41,45 +41,45 @@ context Patient
@pseudocode: "HIV status" IN 'HIV-negative', 'Unknown'
*/
define "HIV status negative or unknown":
exists(Elements."HIV status Observation" O
where O.value in { HCx."HIV-negative", HCx."Unknown" })
exists(Elements."HIV status" S
where S in { Concepts."HIV-negative", Concepts."Unknown" })

/*
@input: "Partner HIV reported positive"
@pseudocode: "Partner HIV status (reported)"='HIV-positive'
*/
define "Partner HIV positive":
exists(Elements."Partner HIV status reported Observation" O
where O.value ~ HCx."HIV-positive")
where O.value ~ Concepts."HIV-positive")

/*
@input: "Sex partner's HIV treatment status is partner not virally suppressed"
@pseudocode: "Sex partner's HIV treatment status"='Partner is not virally suppressed'
*/
define "Sex partner's HIV treatment status is partner not virally suppressed":
exists(Elements."Sex partners HIV treatment status Observation" O
where O.value ~ HCx."Partner is not virally suppressed")
where O.value ~ Concepts."Partner is not virally suppressed")

/*
@input: "HIV burden of setting is high HIV burden setting"
@pseudocode: "HIV burden of the setting"='High HIV burden setting'
*/
define "HIV burden of setting is high HIV burden setting":
Config."HIV burden of setting" ~ HCx."High HIV burden setting"
Config."HIV burden of setting" ~ Concepts."High HIV burden setting"

/*
@input: "HIV burden of setting is low HIV burden setting"
@pseudocode: "HIV burden of the setting"='Low HIV burden setting'
*/
define "HIV burden of setting is low HIV burden setting":
Config."HIV burden of setting" ~ HCx."Low HIV burden setting"
Config."HIV burden of setting" ~ Concepts."Low HIV burden setting"

/*
@input: "Key population member"
@pseudocode: "Key population member" = TRUE
*/
define "Key population member":
exists(Elements."Key population member* B.DE49 Observation" O
exists(Elements."Key population member B.DE49 Observation" O
where O.value is true)

/*
Expand All @@ -95,7 +95,7 @@ define "Currently pregnant":
*/
define "TB diagnosis result is diagnosed TB":
exists(Elements."TB diagnosis result Observation" O
where O.value ~ HCx."Diagnosed TB" or)
where O.value ~ Concepts."Diagnosed TB")

/*
@input: "Presumptive TB"
Expand Down
Loading
Loading