Skip to content

Commit

Permalink
Elements and Common Refactoring Fixed (#46)
Browse files Browse the repository at this point in the history
* Squashing to examine changes

* Removed erroring include FHIRCommon

* Synchronized with comitted updates

* Fixing EncounterElements

* Elements fixes

* Indicator fixes

* Fixes

* Validation fixes

* Review fixes
  • Loading branch information
pmanko authored Aug 12, 2024
1 parent bc9e02f commit fefed6a
Show file tree
Hide file tree
Showing 134 changed files with 1,516 additions and 2,214 deletions.
24 changes: 13 additions & 11 deletions input/cql/HIVB9DTLogic.cql
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*
@DecisionID: HIV.B9.DT
Library: HIV.B9.DT Logic
@DecisionID: HIV.B9.DT.HIV Re-testing Recommendations
@BusinessRule: HIV restesting recommendations
@Trigger: HIV.B9 Determine recommended services
@HitPolicy: Rule order
Expand All @@ -22,8 +24,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 +43,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 +97,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

0 comments on commit fefed6a

Please sign in to comment.