diff --git a/input/cql/HIVB2DTLogic.cql b/input/cql/HIVB2DTLogic.cql index eb6da91e307..49fef168863 100644 --- a/input/cql/HIVB2DTLogic.cql +++ b/input/cql/HIVB2DTLogic.cql @@ -17,7 +17,7 @@ Consolidated guidelines on HIV prevention, testing, treatment, service delivery */ library HIVB2DTLogic - + using FHIR version '4.0.1' include HIVCommon version '0.0.1' called HIC @@ -27,21 +27,23 @@ include FHIRHelpers version '4.0.1' include WHOCommon called WCom +parameter Today default Today() + context Patient /* - @input: "Age 10 or older" + @input: "Age" @pseudocode: 'Age' >= 10 years */ define "Age 10 or older": - AgeInYearsAt(Today()) >= 10 + Elements."Current Patient Age In Years" >= 10 /* - @input: "Age under 10" + @input: "Age" @pseudocode: 'Age' < 10 years */ define "Age under 10": - AgeInYearsAt(Today()) < 10 + Elements."Current Patient Age In Years" < 10 /* @output: "Immediately take action or refer for care if a client is having this issue" @@ -68,17 +70,22 @@ define "Use clinical judgement and consider local epidemiology to determine if s @dynamicValue: Guidance */ define "Guidance": - case - when "Immediately take action or refer for care if a client is having this issue" - then 'Immediately take action or refer for care if a client is having this issue.' - when "Immediately take action or refer for care if client is showing this sign of a serious illness" and "Age 10 or older" - then 'Immediately take action or refer for care if client is showing this sign of a serious illness.' - when "Immediately take action or refer for care if client is showing this sign of a serious illness" and "Age under 10" - then '''This is a sign and/or symptom of a serious health condition. - -Immediately take action or refer for care if client is showing this sign of a serious illness.''' - else null - end + Combine({ + if "Immediately take action or refer for care if a client is having this issue" + then 'Immediately take action or refer for care if a client is having this issue.' + else '', + if "Immediately take action or refer for care if client is showing this sign of a serious illness" and "Age 10 or older" + then 'Immediately take action or refer for care if client is showing this sign of a serious illness.' + else '', + if "Immediately take action or refer for care if client is showing this sign of a serious illness" and "Age under 10" + then 'This is a sign and/or symptom of a serious health condition. + + Immediately take action or refer for care if client is showing this sign of a serious illness.' + else '', + if "Use clinical judgement and consider local epidemiology to determine if symptoms suggest client is seriously ill" + then 'Use clinical judgement and consider local epidemiology to determine if symptoms suggest client is seriously ill. ' + else '' + }) /* Supporting Logic diff --git a/input/cql/HIVB7DTLogic.cql b/input/cql/HIVB7DTLogic.cql index c1932ea531c..97eb6180a6a 100644 --- a/input/cql/HIVB7DTLogic.cql +++ b/input/cql/HIVB7DTLogic.cql @@ -2,161 +2,57 @@ Library: HIV.B7.DT Logic @DecisionID: HIV.B7.DT -@BusinessRule: -@Trigger: -@Description: +@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) -Test Using Algorithm +Data Concepts: -WHO standard testing strategy for HIV-1 diagnosis (among people ≥18 months of age) -HIV.B7 Test for HIV using testing algorithm, HIV.C4 Test for HIV using testing algorithm, HIV.D.11 Retest using HIV strategy */ library HIVB7DTLogic using FHIR version '4.0.1' -//codesystem "Custom_Codes": 'http://fhir.org/guides/who/hiv-dak/CodeSystem/HIV-DAKConcepts' -codesystem "HIV_DAK_Codes": 'http://fhir.org/guides/who/hiv-dak/CodeSystem/HIV-DAKConcepts' -//valueset "TestresultofHIVassay1Codes": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-b-de95' -valueset "Assay 1 reactive": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-b-de95' -valueset "Assay 1": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-b-de90' -valueset "Assay 2": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-b-de91' -valueset "Assay 2 reactive": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-e-de205' -valueset "Assay 2 non-reactive": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-e-de206' -valueset "Assay 3": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-b-de92' -valueset "Assay 1 repeated": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-b-de93' -valueset "HIVtesttypeCodes": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-b-de82' -valueset "Reactive": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-b-de103' -valueset "Non-reactive": 'http://fhir.org/guides/who/hiv-dak/ValueSet/hiv-b-de104' - +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 - -//code "Assay 1 Reactive": 'HIV.B.DE95' from "TestresultofHIVassay1Codes" display 'Assay 1 reactive' -//code "Reactive": 'HIV.B.DE103' from "HIV_DAK_Codes" display 'Reactive' -//code "Non-reactive": 'HIV.B.DE104' from "HIV_DAK_Codes" display 'Non-reactive' -code "Rapid diagnostic test for HIV": 'HIV.B.DE82' from "HIV_DAK_Codes" display 'Rapid diagnostic test for HIV' -code "Enzyme immunoassay for HIV": 'HIV.B.DE83' from "HIV_DAK_Codes" display 'Enzyme immunoassay for HIV' -//code "Assay 1": 'HIV.B.DE90' from "HIV_DAK_Codes" display 'Assay 1' -//code "Assay 2": 'HIV.B.DE91' from "HIV_DAK_Codes" display 'Assay 2' -//code "Assay 3": 'HIV.B.DE92' from "HIV_DAK_Codes" display 'Assay 3' -//code "Assay 1 repeated": 'HIV.B.DE93' from "HIV_DAK_Codes" display 'Assay 1 repeated' -//code "Assay 2 reactive": 'HIV.E.DE205' from "HIV_DAK_Codes" display 'Assay 2 reactive' -//code "Assay 2 non-reactive": 'HIV.E.DE206' from "HIV_DAK_Codes" display 'Assay 2 non-reactive' -//code "Assay 1 reactive": 'HIV.B.DE95' from "HIV_DAK_Codes" display 'Assay 2 non-reactive' - - /*valueset "Assay 2 reactive": 'HIV.E.DE205'*/ +include WHOCommon called WCom context Patient -define "Age_greater_than_18_months": - AgeInMonthsAt(Today()) >= 18 - - +/* + @output: "Report as HIV-negative" + */ define "Report as HIV-negative": - [Observation] O - //@triggeredBy order for Assay 1 - with [ServiceRequest] SR - such that O.basedOn.references(SR) and SR.code in "Assay 1" - where (O.status in { 'final', 'amended' } - and O.code in "HIVtesttypeCodes" - and O.value in "Non-reactive" - and "Age_greater_than_18_months") - -/* Output observation as HIV negative */ -/*@triggeredBy Assay 1 */ - -define "Should Continue with Performing HIV Assay 2": - [Observation] O - //@triggeredBy ~ order for Assay 1 - with [ServiceRequest] SR - such that O.basedOn.references(SR) and SR.code in "Assay 1" - where (O.status in { 'final', 'amended' } - and O.code in "HIVtesttypeCodes" - and O.value in "Reactive" - and "Age_greater_than_18_months") + case + when "Assay 1" and "Non-reactive result" + then true + else null + end -/* Output Service Request for Assay 2 */ - -define "Should Continue with Performing HIV Assay 1 repeated": - [Observation] O - //@triggeredBy ~ "Continue with performing HIV 'Assay 2'" - with [ServiceRequest] SR - such that O.basedOn.references(SR) and SR.reasonCode in "Assay 1 reactive" and SR.code in "Assay 2" - where (O.status in { 'final', 'amended' } - and O.code in "HIVtesttypeCodes" - and O.value in "Non-reactive" - and "Age_greater_than_18_months") - -/* Output Service Request for Continue with performing HIV 'Assay 1 repeated' */ - - define "Should Continue with Performing HIV Assay 3": - [Observation] O - //@triggeredBy ~ "Continue with performing HIV 'Assay 2'" - with [ServiceRequest] SR - such that O.basedOn.references(SR) and SR.reasonCode in "Assay 1 reactive" and SR.code in "Assay 2" - where (O.status in { 'final', 'amended' } - and O.code in "HIVtesttypeCodes" - and O.value in "Reactive" - and "Age_greater_than_18_months") - - /* Output Service Request for Continue with performing Assay 3 */ - -define "Report as HIV-negative after assay 1 repeated": - [Observation] O - //@triggeredBy ~ "Continue with performing HIV 'Assay 1 repeated'" - with [ServiceRequest] SR - such that O.basedOn.references(SR) and SR.reasonCode in "Assay 2 non-reactive" and SR.code in "Assay 1 repeated" - where (O.status in { 'final', 'amended' } - and O.code in "HIVtesttypeCodes" - and O.value in "Non-reactive" - and "Age_greater_than_18_months") - -/* Output observation as HIV negative */ +/* + Supporting Logic + */ +define "Assay 1": + exists("Assay 1 result") and not(exists("Assay 2 result")) -define "Report as HIV-inconclusive after assay 1 repeated": - [Observation] O - //@triggeredBy ~ "Continue with performing HIV 'Assay 1 repeated'" - with [ServiceRequest] SR - such that O.basedOn.references(SR) and SR.reasonCode in "Assay 2 non-reactive" and SR.code in "Assay 1 repeated" - where (O.status in { 'final', 'amended' } - and O.code in "HIVtesttypeCodes" - and O.value in "Reactive" - and "Age_greater_than_18_months") +define "Assay 2": + exists("Assay 2 result") and not(exists("Assay 3 result")) -/* Output observation as 'HIV-inconclusive' */ -/* Output PlanDefinition as Schedule retest date on "Visit date" + 14 days */ +define "Assay 3": + exists("Assay 3 result") -define "Report as HIV-inconclusive after assay 3": - [Observation] O - //@triggeredBy ~ "Continue with performing HIV 'Assay 3'" - with [ServiceRequest] SR - such that O.basedOn.references(SR) and SR.reasonCode in "Assay 2 reactive" and SR.code in "Assay 3" - where (O.status in { 'final', 'amended' } - and O.code in "HIVtesttypeCodes" - and O.value in "Non-reactive" - and "Age_greater_than_18_months") +define "Assay 1 result": + Elements."Test result of HIV assay 1 B.DE94" -/* Output observation as 'HIV-inconclusive' */ -/* Output PlanDefinition as Schedule retest date on "Visit date" + 14 days */ +define "Assay 2 result": + Elements."Test result of HIV assay 2 B.DE98" -define "Report as HIV-positive": - [Observation] O - //@triggeredBy ~ "Continue with performing HIV 'Assay 3'" - with [ServiceRequest] SR - such that O.basedOn.references(SR) and SR.reasonCode in "Assay 2 reactive" and SR.code in "Assay 3" - where (O.status in { 'final', 'amended' } - and O.code in "HIVtesttypeCodes" - and O.value in "Reactive" - and "Age_greater_than_18_months") - +define "Assay 3 result": + Elements."Test result of HIV assay 3 B.DE102" -/* Output observation as 'HIV-positive' */ - -/* -[Observation] needs to have the following codes and elements - where O.status ~ {'final', 'amended'} - and O.value ~ HIC."HIV-positive" - */ \ No newline at end of file +define "Non-reactive result": + false diff --git a/input/cql/HIVB9DTLogic.cql b/input/cql/HIVB9DTLogic.cql index 5c3d7074182..f6232d0a5f2 100644 --- a/input/cql/HIVB9DTLogic.cql +++ b/input/cql/HIVB9DTLogic.cql @@ -35,6 +35,8 @@ include WHOCommon called WCom include WHOConcepts called WCx include WHOEncounterElements called WElm +parameter Today Date default Today() + context Patient /* @@ -42,8 +44,9 @@ context Patient @pseudocode: "HIV status" IN 'HIV-negative', 'Unknown' */ define "HIV status negative or unknown": - exists(Elements."HIV status" S - where S in { Concepts."HIV-negative", Concepts."Unknown" }) + exists(Elements."HIV Status Observation" S + where S.value ~ Concepts."HIV-negative" + or S.value ~ Concepts."Unknown") /* @input: "Partner HIV reported positive" @@ -58,7 +61,7 @@ define "Partner HIV positive": @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 + exists(Elements."Sex partners HIV treatment status" O where O.value ~ Concepts."Partner is not virally suppressed") /* @@ -80,8 +83,7 @@ define "HIV burden of setting is low HIV burden setting": @pseudocode: "Key population member" = TRUE */ define "Key population member": - exists(Elements."Key population member B.DE49 Observation" O - where O.value is true) + Elements."Is Key population member B.DE49" /* @input: "Currently pregnant" @@ -111,7 +113,7 @@ define "Presumptive TB": @pseudocode: "Currently on PrEP"=True */ define "Currently on PrEP": - exists(Elements."Currently on PrEP" O + exists(Elements."Currently on PrEP Observation" O where O.value is true) /* @@ -119,7 +121,7 @@ define "Currently on PrEP": @pseudocode: "At elevated risk for HIV acquisition"=True */ define "At elevated risk for HIV acquisition": - exists(Elements."At elevated risk for HIV acquisition" O + exists(Elements."At elevated risk for HIV acquisition PRV.DE1 Observation" O where O.value is true) /* @@ -133,7 +135,7 @@ define "Schedule an annual follow-up test": then true when "HIV burden of setting is high HIV burden setting" then true - when "Key population memeber" + when "Key population member" then true when "At elevated risk for HIV acquisition" then true @@ -182,9 +184,9 @@ define "Schedule a 'Follow-up test recommended date' during a third trimester vi define "Schedule a 'Follow-up test recommended date' at first ANC contact date": "Pregnant in low HIV burden setting" and case - when "Key population member": + when "Key population member" then true - when "Partner has HIV and is not virally suppressed": + when "Partner has HIV and is not virally suppressed" then true when "At elevated risk for HIV acquisition" then true @@ -195,37 +197,41 @@ define "Schedule a 'Follow-up test recommended date' at first ANC contact date": @dynamicValue: Guidance */ define "Guidance": - case - when "Schedule an annual follow-up test" - then """Schedule an annual follow-up test. - -WHO guidance recommends annual retesting for people who have ongoing HIV-related risks in all settings. These include people with a known HIV-positive partner who is not virally suppressed on ART.""" - when "Follow-up test recommended" - then """Recommend a follow-up test. - -In certain conditions and situations, individuals who have been tested for HIV in the past can be advised to retest. These include: -* Individuals presenting with a diagnosis or receiving treatment for STIs or viral hepatitis, -* Individuals with a confirmed or presumptive TB diagnosis, -* Outpatients presenting with clinical conditions or symptoms indicative of HIV, individuals with recent HIV risk exposure.""" - when "Schedule quarterly retesting for PrEP users" - then """Schedule quarterly retesting for PrEP users.""" - when "Schedule an HIV test, syphilis test, hepatitis B test as early as possible during this pregnancy" - then """Schedule an HIV test, syphilis test, hepatitis B test as early as possible during this pregnancy - -All pregnant women should be tested for HIV as well as syphilis and hepatitis B virus at least once and as early as possible during pregnancy.""" - when "Schedule a 'Follow-up test recommended date' at first ANC contact date": - then """In low HIV burden settings, retesting all pregnant women is not warranted unless focused among women from key populations or at high ongoing risk, such as those from key populations or with partners with HIV who are not virally suppressed. Countries could consider one additional retest in the post-partum period, such as at 14 weeks, six months or nine months for women in high HIV burden or incidence districts or provinces, key populations or women with partners with HIV who are not virally suppressed.""" - else null - end + Combine({ + if "Schedule an annual follow-up test" + then 'Schedule an annual follow-up test. + + WHO guidance recommends annual retesting for people who have ongoing HIV-related risks in all settings. These include people with a known HIV-positive partner who is not virally suppressed on ART.' + else '', + if "Follow-up test recommended" + then 'Recommend a follow-up test. + + In certain conditions and situations, individuals who have been tested for HIV in the past can be advised to retest. These include: + * Individuals presenting with a diagnosis or receiving treatment for STIs or viral hepatitis, + * Individuals with a confirmed or presumptive TB diagnosis, + * Outpatients presenting with clinical conditions or symptoms indicative of HIV, individuals with recent HIV risk exposure.' + else '', + if "Schedule quarterly retesting for PrEP users" + then 'Schedule quarterly retesting for PrEP users.' + else '', + if "Schedule an HIV test, syphilis test, hepatitis B test as early as possible during this pregnancy" + then 'Schedule an HIV test, syphilis test, hepatitis B test as early as possible during this pregnancy + + All pregnant women should be tested for HIV as well as syphilis and hepatitis B virus at least once and as early as possible during pregnancy.' + else '', + if "Schedule a 'Follow-up test recommended date' at first ANC contact date" + then 'In low HIV burden settings, retesting all pregnant women is not warranted unless focused among women from key populations or at high ongoing risk, such as those from key populations or with partners with HIV who are not virally suppressed. Countries could consider one additional retest in the post-partum period, such as at 14 weeks, six months or nine months for women in high HIV burden or incidence districts or provinces, key populations or women with partners with HIV who are not virally suppressed.' + else '' + }) /* @dynamicValue: "Date to schedule" */ -define "Schedule Follow-up Date" +define "Schedule Follow-up Date": case - when "Schedule an annual follow-up test": + when "Schedule an annual follow-up test" then Today + 1 years - when "Schedule quarterly retesting for PrEP users": + when "Schedule quarterly retesting for PrEP users" then Today + 3 months else null end diff --git a/input/cql/HIVC23DTLogic.cql b/input/cql/HIVC23DTLogic.cql new file mode 100644 index 00000000000..546c65ecbef --- /dev/null +++ b/input/cql/HIVC23DTLogic.cql @@ -0,0 +1,185 @@ +/** +Library: HIV.C23.DT Logic + +@DecisionID: HIV.C23.DT +@BusinessRule: Determine PEP or PrEP regimen +@Trigger: HIV.C23 Prescribe or administer PrEP or PEP +@HitPolicy: Rule Order +@Description: Determine PEP or PrEP regimen + +Data Concepts: + + +Consolidated guidelines on HIV prevention, testing, treatment, service delivery and monitoring: recommendations for a public health approach (2021) Chapter 5: Advanced HIV Disease. Figure 5.1: Algorithm for providing a package of care for people with advanced HIV disease. +*/ + +library HIVC23DTLogic + +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 + +parameter Today Date default Today() + +context Patient + + /* + @input: Age + @pseudocode: "Age" >= 10 years + */ +define "Age 10 or older": + Elements."Current Patient Age In Years" >= 10 + + /* + @input: Age + @pseudocode: 2 years < "Age" < 10 years + */ +define "Age between 2 and 10": + 2 < Elements."Current Patient Age In Years" and Elements."Current Patient Age In Years" < 10 + +/* + @input: Date/time of suscepted exposure to HIV + @pseudocode: "Date/time of suspected exposure to HIV" < 72 hours from Current DateTime + */ +define "Suspected exposure to HIV within 72 hours": + exists( + Elements."Date/time of suspected exposure to HIV B.DE14" O + where FHIRHelpers.ToInteger(O.value) < 72 + or O.value < Today + 72 hours + or O.value.end < Today + 72 hours + ) + +/* + @input: Suitable for PrEP + @pseudocode: "Suitable for PrEP"=True + */ +define "Client is suitable for PrEP": + exists( + Elements."Suitable for PrEP" O + where O.value = true + ) + +/* + @output: What to use in HIV post-exposure prophylaxis (PEP) for adults and adolescents + */ +define "What to use in HIV post-exposure prophylaxis (PEP) for adults and adolescents": + "Suspected exposure to HIV within 72 hours" and ("Age between 2 and 10" or "Age 10 or older") + +/* + @output: What to use in HIV pre-exposure prophylaxis (PrEP) for adults and adolescents + */ +define "What to use in HIV pre-exposure prophylaxis (PrEP) for adults and adolescents": + "Client is suitable for PrEP" and "Age 10 or older" + +/* + @dynamicValue: Preferred PEP backbone regimen + */ +define "Preferred PEP backbone regimen": + case + when "Suspected exposure to HIV within 72 hours" and "Age 10 or older" + then { Concepts."TDF + 3TC - HIV.C.DE20", Concepts."TDF + FTC - HIV.C.DE18" } + when "Suspected exposure to HIV within 72 hours" and "Age between 2 and 10" + then { Concepts."AZT + 3TC" } + else null + end + +/* + @dynamicValue: Alternative PEP backbone regimen + */ +define "Alternative PEP backbone regimen": + case + when "Suspected exposure to HIV within 72 hours" and "Age between 2 and 10" + then { Concepts."ABC + 3TC", Concepts."TDF + 3TC - HIV.C.DE20", Concepts."TDF + FTC - HIV.C.DE18" } + else null + end + +/* + @dynamicValue: Preferred third PEP drug + */ +define "Preferred third PEP drug": + case + when "Suspected exposure to HIV within 72 hours" and "Age 10 or older" + then { Concepts."DTG - HIV.C.DE100" } + when "Suspected exposure to HIV within 72 hours" and "Age between 2 and 10" + then { Concepts."DTG - HIV.C.DE100" } + else null + end + +/* + @dynamicValue: Alternative third PEP drug + */ +define "Alternative third PEP drug": + case + when "Suspected exposure to HIV within 72 hours" and ("Age 10 or older" or "Age between 2 and 10") + then { + Concepts."ATV/r - HIV.C.DE102", + Concepts."DRV/r - HIV.C.DE103", + Concepts."LPV/r - HIV.C.DE104", + Concepts."RAL - HIV.C.DE105" + } + else null + end + +/* + @dynamicValue: Recommended PrEP regimen + */ +define "Recommended PrEP regimen": + case + when "Age 10 or older" and "Client is suitable for PrEP" + then { + Concepts."TDF + FTC - HIV.C.DE18", + Concepts."TDF - HIV.C.DE19", + Concepts."TDF + 3TC - HIV.C.DE20", + Concepts."Other TDF-based regimen", + Concepts."Dapivirine vaginal ring DVR - HIV.C.DE22", + Concepts."CAB-LA - HIV.C.DE23" + } + else null + end + +/* + @dynamicValue: Guidance + */ +define "Guidance": + Combine({ + if "Age 10 or older" and "Suspected exposure to HIV within 72 hours" + then 'An HIV post-exposure prophylaxis (PEP) regimen with two ARV drugs is effective, but three drugs are preferred. + + TDF + 3TC (or FTC) is recommended as the preferred backbone regimen for HIV post-exposure prophylaxis for adults and adolescents. + + DTG is recommended as the preferred third drug for HIV PEP. + + When available, ATV/r, DRV/r, LPV/r and RAL may be considered as alternative third drug options for PEP. + + NVP should not be used for PEP for adults, adolescents and older children because of the risk of life-threatening serious adverse events associated with HIV-negative adults using this drug.' + else '', + if "Age between 2 and 10" and "Suspected exposure to HIV within 72 hours" + then 'An HIV PEP regimen with two ARV drugs is effective, but three drugs are preferred. + + AZT + 3TC is recommended as the preferred backbone regimen for HIV PEP for children 10 years and younger. + + ABC + 3TC or TDF + 3TC (or FTC) can be considered as alternative regimens. + + DTG is recommended as the preferred third drug for HIV PEP with approved DTG dosing. + + When available, ATV/r, DRV/r, LPV/r and RAL may be considered as alternative third drug options for PEP. + + The choice of ARV drugs for children will depend on the availability of approved dosing and age-appropriate formulations. + for children. + + DTG was approved in June 2020 for all children older than 4 weeks weighing more than 3kg and available with dispersible tablets that can be easily administered for all children weighting less than 20 kg. For children weighting more than 20 kg, 50 mg adult film-coated tablets can be use.' + else '', + if "Age 10 or older" and "Client is suitable for PrEP" + then 'If PrEP is suitable for client, prescribe one of the PrEP regimens: \'TDF + FTC\', \'TDF\', + \'TDF + 3TC\', \'Other TDF-based regimen\', \'Dapivirine vaginal ring (DVR)\', \'CAB-LA\'. + + The dapivirine vaginal ring may be offered as an additional prevention choice for women* at substantial risk of HIV infection as part of combination prevention approaches. + + *For the recommendation on dapirivirine vaginal ring, the term women applies to cisgender women, meaning women assigned female at birth. There is no research at this time to support the dapivirine vaginal ring for other populations.' + else '' + }) diff --git a/input/cql/HIVC7DTLogic.cql b/input/cql/HIVC7DTLogic.cql new file mode 100644 index 00000000000..b2bae184207 --- /dev/null +++ b/input/cql/HIVC7DTLogic.cql @@ -0,0 +1,502 @@ +/** +Library: HIV.C7.DT Logic + +@DecisionID: HIV.C7.DT +@BusinessRule: Check suitability for PrEP or PEP +@Trigger: HIV.C7 Check suitability for PrEP or PEP +@HitPolicy: Rule Order +@Description: Check suitability for PrEP or PEP + +Data Concepts: + * HIV.B.DE49: Key population member | Client is a member of a key population that has an increased risk of HIV + * HIV.B.DE115: HIV status | HIV status reported after applying the national HIV testing algorithm. No single HIV test can provide an HIV-positive diagnosis. + * HIV.C.DE31: PEP history | The client's history in taking post-exposure prophylaxis (PEP) for HIV prevention + * HIV.C.DE36: Signs of substantial risk of HIV infection | Signs the client is at a substantial risk of HIV infection + * HIV.C.DE55: Sex partners HIV treatment status | Treatment adherence of client's sex partner for partners that are HIV-positive + * HIV.C.DE106: Estimated creatinine clearance | Estimated creatinine clearance of the client returned from lab in mL/min + * HIV.C.DE112: Contraindications to PrEP usage | Listing of contraindications to pre-exposure prophylaxis (PrEP) + * HIV.C.DE117: Probable recent exposure to HIV | When the client is reported to have had probable recent exposure to HIV + * HIV.Config.DE12: HIV burden of the setting | HIV burden of the setting (high or low) based on the national HIV prevalence or where the HIV prevalence and/or incidence in a geographical setting is higher than national prevalence and, therefore, needs priority in the HIV response + * HIV.H.DE34: HIV status of partner or contact | HIV status of the partner or contact given by the index case + +Consolidated guidelines on HIV prevention, testing, treatment, service delivery and monitoring: recommendations for a public health approach (2021) Chapter 5: Advanced HIV Disease. Figure 5.1: Algorithm for providing a package of care for people with advanced HIV disease. +*/ + +library HIVC7DTLogic + +using FHIR version '4.0.1' + +include HIVCommon version '0.0.1' called HIC +include HIVConcepts called Concepts +include HIVConfig called Config +include HIVEncounterElements called Elements +include FHIRHelpers version '4.0.1' + +include WHOCommon called WCom + +/* + @input "HIV Status" + @pseudocode: "HIV status"='HIV-negative' + */ +define "HIV negative": + exists( + Elements."HIV Status Observation" O + where O.value ~ Concepts."HIV-negative" + ) + +/* + @input "HIV Status" + @pseudocode: "HIV status"='HIV-negative' + */ +define "HIV negative or unknown": + exists( + Elements."HIV Status Observation" O + where O.value ~ Concepts."HIV-negative" or + O.value ~ Concepts."Unknown" + ) + + +/* + @input "Estimated creatinine clearance" + @pseudocode: "Estimated creatinine clearance" ≥ 60 mL/min + */ +define "Estimated creatinine clearance ≥ 60 mL/min": + exists( + Elements."Estimated creatinine clearance" O + where FHIRHelpers.ToInteger(O.value) >= 60 + ) + +/* + @input "Estimated creatinine clearance" + @pseudocode: "Estimated creatinine clearance" < 60 mL/min + */ +define "Estimated creatinine clearance < 60 mL/min": + exists( + Elements."Estimated creatinine clearance" O + where FHIRHelpers.ToInteger(O.value) < 60 + ) + +/* + @input "Acute HIV infection symptoms" + @pseudocode: "Acute HIV infection symptoms"=False + */ +define "No symptoms of Acute HIV infection": + not(exists( + Elements."Contraindications to PrEP usage" O + where O.value ~ Concepts."Acute HIV infection symptoms - HIV.C.DE116" + )) + +/* + @input "Acute HIV infection symptoms" + @pseudocode: "Acute HIV infection symptoms"=True + */ +define "Symptoms of Acute HIV infection": + exists( + Elements."Contraindications to PrEP usage" O + where O.value ~ Concepts."Acute HIV infection symptoms - HIV.C.DE116" + ) + +/* + @input: "Probable recent exposure to HIV" + @pseudocode: "Probable recent exposure to HIV"=False + */ +define "No probable recent exposure to HIV": + not(exists( + Elements."Contraindications to PrEP usage" O + where O.value ~ Concepts."Probable recent exposure to HIV" + )) + +/* + @input: "Probable recent exposure to HIV" + @pseudocode: "Probable recent exposure to HIV"=True + */ +define "Probable recent exposure to HIV": + exists( + Elements."Contraindications to PrEP usage" O + where O.value ~ Concepts."Probable recent exposure to HIV" + ) + +/* + @input: "Contraindications to PrEP usage" + @pseudocode: "Contraindications to PrEP usage" is NULL + */ +define "No contraindications to PrEP usage": + not(exists( + Elements."Contraindications to PrEP usage" O + )) + +/* + @input: "Contraindications to PrEP usage" + @pseudocode: "Contraindications to PrEP usage" is NOT NULL + */ +define "Contraindications to PrEP usage": + exists( + Elements."Contraindications to PrEP usage" O + ) + +/* + @input: "Contraindications to PrEP usage" + @pseudocode: "Contraindications to PrEP usage"='Tenofovir disoproxil fumarate (TDF)' + */ +define "TDF allergy or contraindication": + exists( + Elements."Contraindications to PrEP usage" O + where O.value ~ Concepts."Tenofovir disoproxil fumarate TDF allergy or contraindication" + ) + +/* + @input: "HIV status of partner or contact" + @pseudocode: "HIV status of partner or contact"='HIV-positive' + */ +define "HIV status of partner or contact is positive": + exists( + Elements."HIV status of partner or contact" O + where O.value ~ Concepts."HIV-positive" + ) + +/* + @input: "Sex partner's HIV treatment status" + @pseudocode: "Sex partner's HIV treatment status"='Partner is not virally suppressed' + */ +define "Sex partner is on HIV treatment and not virally suppressed": + exists( + Elements."Sex partners HIV treatment status" O + where O.value ~ Concepts."Partner is not virally suppressed" + ) + +/* + @input: "Key population member" + @pseudocode: "Key population member"=True + */ +define "Is Key population member": + Elements."Is Key population member B.DE49" + + /* + @input: "Signs of substantial risk of HIV infection" + @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" ~ Concepts."High HIV burden setting" + +/* + @input: "Signs of substantial risk of HIV infection" + @pseudocode: "Signs of substantial risk of HIV infection"='PrEP requested by client' + */ +define "PrEP requested by client": + exists( + Elements."Signs of substantial risk of HIV infection C.DE36" O + where O.value ~ Concepts."PrEP requested by client - HIV.C.DE40" + ) + +/* + @input: "Signs of substantial risk of HIV infection" + @pseudocode: "Signs of substantial risk of HIV infection"='A sexual partner in the past 6 months had one or more HIV risk factors' + */ +define "A sexual partner in the past 6 months had one or more HIV risk factors": + exists( + Elements."Signs of substantial risk of HIV infection C.DE36" O + where O.value ~ Concepts."A sexual partner in the past 6 months had one or more HIV risk factors - HIV.C.DE39" + ) + +/* + @input: "Signs of substantial risk of HIV infection" + @pseudocode: "Signs of substantial risk of HIV infection"='STI in the past 6 months' + */ +define "STI in the past 6 months": + exists( + Elements."Signs of substantial risk of HIV infection C.DE36" O + where O.value ~ Concepts."STI in the past 6 months - HIV.C.DE38" + ) + +/* + @input: "Signs of substantial risk of HIV infection" + @pseudocode: "Signs of substantial risk of HIV infection"='No condom use during sex with more than one partner in the past 6 months' + */ +define "No condom use during sex with more than one partner in the past 6 months": + exists( + Elements."Signs of substantial risk of HIV infection C.DE36" O + where O.value ~ Concepts."No condom use during sex with more than one partner in the past 6 months - HIV.C.DE37" + ) + +/* + @input: "PEP history" + @pseudocode: "PEP history"='Repeat user' + */ +define "Repeat PEP user": + exists( + Elements."PEP history" O + where O.value ~ Concepts."Repeat user" + ) + +/* + @output "Suitable for PrEP" + */ +define "Suitable for PrEP": + case + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "PrEP requested by client" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV status of partner or contact is positive" and + "Sex partner is on HIV treatment and not virally suppressed" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "PrEP requested by client" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "A sexual partner in the past 6 months had one or more HIV risk factors" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "STI in the past 6 months" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "Repeat PEP user" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "No condom use during sex with more than one partner in the past 6 months" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "PrEP requested by client" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "A sexual partner in the past 6 months had one or more HIV risk factors" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "STI in the past 6 months" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "Repeat PEP user" + then true + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "No condom use during sex with more than one partner in the past 6 months" + then true + when "HIV negative or unknown" and + "Symptoms of Acute HIV infection" + then false + when "HIV negative or unknown" and + "Probable recent exposure to HIV" + then false + when "HIV negative" and + "TDF allergy or contraindication" + then false + when "HIV negative" and + "Contraindications to PrEP usage" + then false + when "HIV negative" and + "Estimated creatinine clearance < 60 mL/min" + then false + else null + end + +define "Not suitable for PrEP": + not(IsNull("Suitable for PrEP")) and not("Suitable for PrEP") + +/* + @dynamicValue: Guidance + */ +define "Guidance": + case + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "PrEP requested by client" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV status of partner or contact is positive" and + "Sex partner is on HIV treatment and not virally suppressed" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP. + +PrEP can protect the HIV-negative partner in a serodiscordant relationship when the HIV-positive partner is either not on antiretroviral therapy (ART) or has not yet achieved viral suppression.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "PrEP requested by client" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "A sexual partner in the past 6 months had one or more HIV risk factors" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP. + +PrEP services provide a unique opportunity to screen for hepatitis B and hepatitis C infection and thus address multiple public health issues. Hepatitis B is endemic in some parts of the world where there is also a high burden of HIV. Testing oral PrEP users for hepatitis B surface antigen (HBsAg) once, at PrEP initiation, is preferred and has several advantages in these settings. Rapid point-of-care tests are available for HBsAg, and WHO has prequalified several rapid diagnostic tests.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "STI in the past 6 months" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP. + +Recently diagnosed STIs are often indicators of risk of sexual acquisition of HIV. The predictive value of STI indicators varies by region, the type of STI and a person\'s demographic characteristics. A new diagnosis of syphilis or genital herpes is a strong predictor of HIV risk among men who have sex with men in most settings and among heterosexual men and women in areas of high HIV prevalence. PrEP services should be prioritized; local epidemiology will be essential to guide decisions about when to offer PrEP and to which populations.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "Repeat PEP user" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP. + +People may be subject to ongoing high risk of exposure to HIV, leading to multiple prescriptions for PEP. In such situations, health-care providers should discuss with their clients the potential benefits of transitioning to HIV PrEP.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "Is Key population member" and + "No condom use during sex with more than one partner in the past 6 months" + then 'Counsel client on PrEP. Based on answers given, PrEP is suitable for client. + +Inconsistent use of condoms (male or female), including an intention to use condoms during sex with some occasional omissions or accidents, increases HIV risk. Social desirability bias in reporting condom use may occur, so PrEP could be considered for people reporting any intercourse without a condom or concerns about their future use of condoms. For example, someone who reports a desire to stop using condoms may be already having sex without condoms.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "PrEP requested by client" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "A sexual partner in the past 6 months had one or more HIV risk factors" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "STI in the past 6 months" + then 'Counsel client on PrEP. Based on answers given, PrEP is suitable for client. + +Recently diagnosed STIs are often indicators of risk of sexual acquisition of HIV. The predictive value of STI indicators varies by region, the type of STI and a person\'s demographic characteristics. A new diagnosis of syphilis or genital herpes is a strong predictor of HIV risk among men who have sex with men in most settings and among heterosexual men and women in areas of high HIV prevalence. PrEP services should be prioritized; local epidemiology will be essential to guide decisions about when to offer PrEP and to which populations.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "Repeat PEP user" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP.' + when "HIV negative" and + "Estimated creatinine clearance ≥ 60 mL/min" and + "No symptoms of Acute HIV infection" and + "No probable recent exposure to HIV" and + "No contraindications to PrEP usage" and + "HIV burden of setting is high HIV burden setting" and + "No condom use during sex with more than one partner in the past 6 months" + then 'Counsel client on PrEP. Based on answers given, client is suitable for PrEP.' + when "HIV negative or unknown" and + "Symptoms of Acute HIV infection" + then 'Client is ineligible for PrEP based on answers given.' + when "HIV negative or unknown" and + "Probable recent exposure to HIV" + then 'Client is ineligible for PrEP based on answers given. Counsel client on risk and prevention. + +If the person has had a recent high-risk HIV exposure (such as within the past 72 hours) they can be offered PEP and transition to PrEP after the completion of PEP and following additional HIV testing. + +The following types of exposure may warrant HIV PEP. +• Body fluids: blood, blood-stained saliva, breast-milk, genital secretions; cerebrospinal, amniotic, peritoneal, synovial, pericardial or pleural fluids. Although these fluids carry a high risk of HIV infection, this list is not exhaustive. All cases should be assessed clinically, and the health care workers should decide whether the actual exposure constitutes a significant risk. +• Types of exposure: (1) mucous membrane from sexual exposure; splashes to the eye, nose, or oral cavity and (2) parenteral exposures. +Exposure that does not require HIV PEP includes: +• when the exposed individual is already HIV positive; +• when the source is established to be HIV negative; and +• exposure to bodily fluids that do not pose a significant risk: tears, non-blood-stained saliva, urine and sweat. + +People may be subject to ongoing high risk of exposure to HIV, leading to multiple prescriptions for PEP. In such situations, health-care providers should discuss with their clients the potential benefits of transitioning to HIV PrEP.' + when "HIV negative" and + "TDF allergy or contraindication" + then 'Client is ineligible for PrEP based on answers given. Counsel client on risk and prevention.' + when "HIV negative" and + "Contraindications to PrEP usage" + then 'Client is ineligible for PrEP based on answers given. Counsel client on risk and prevention.' + when "HIV negative" and + "Estimated creatinine clearance < 60 mL/min" + then 'Client is ineligible for PrEP based on answers given. Counsel client on risk and prevention. + +Measurement of kidney function will depend on age and comorbidities. See Table 2. of source: Suggested procedures for measuring kidney function for TDF-containing oral PrEP + +Measuring kidney function is optional for those aged under 30 years without kidney-related comorbidities. + +Individuals aged 30 years and older without comorbidities may be screened once, at or within one to three months of oral PrEP initiation. Depending on available resources, this can be considered optional for those aged 30–49 years, particularly those aged 30–39, given the low risk of kidney impairment. + +More frequent screening (every 6–12 months) is suggested for individuals with comorbidities, those aged 50 years and older, and those with a previous kidney function test result suggesting at least a mild reduction in function (eGFR <90 mL/min per 1.73 m^2). + +Waiting for kidney function test results should not delay initiation or continuation of oral PrEP.' + else null + end diff --git a/input/cql/HIVConceptsCustom.cql b/input/cql/HIVConceptsCustom.cql index 00291dcbb91..1b0f157b870 100644 --- a/input/cql/HIVConceptsCustom.cql +++ b/input/cql/HIVConceptsCustom.cql @@ -4,7 +4,6 @@ codesystem "HIVConceptsCustom": 'http://smart.who.int/hiv/CodeSystem/HIVConcepts codesystem "ConditionCategoryCodes": 'http://terminology.hl7.org/CodeSystem/condition-category' codesystem "ConditionClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-clinical' codesystem "ObservationCategoryCodes": 'http://terminology.hl7.org/CodeSystem/observation-category' -codesystem "missing concepts": 'missing concepts' codesystem "Devicestatement-status": 'http://hl7.org/fhir/device-statement-status' codesystem "SNOMEDCT:2018-03": 'urn:oid:2.16.840.1.113883.6.96' version 'urn:hl7:version:2018-03' codesystem "SNOMEDCT": 'urn:oid:2.16.840.1.113883.6.96' @@ -64,23 +63,19 @@ code "Two to four times a day (qualifier value)": '396111001' from "SNOMEDCT" di code "HTS Visit": 'HTS Visit' from "HIVConceptsCustom" //not currently provided -code "needle-syringe": 'needle syringe' from "missing concepts" -code "methadone": 'methadone' from "missing concepts" -code "buprenorphine": 'buprenorphine' from "missing concepts" -code "viral load test": 'viral load test' from "missing concepts" -code "delivery": 'delivery' from "missing concepts" -code "tb treatment": 'tb treatment' from "missing concepts" -code "ART medication": 'ART medication' from "missing concepts" -code "DSD ART eligibility assessed" : 'DSD ART eligibility assessed' from "missing concepts" -code "syphilis test" : 'syphilis test' from "missing concepts" -code "HBsAg test" : 'HBsAg test' from "missing concepts" -code "Gonorrhoea test" : 'Gonorrhoea test' from "missing concepts" -code "syphilis treatment" : 'syphilis treatment' from "missing concepts" -code "Gonorrhoea treatment" : 'Gonorrhoea treatment' from "missing concepts" -code "HCV test" : 'HCV test' from "missing concepts" -code "HCV viral load" : 'HCV viral load' from "missing concepts" -code "cervical cancer screening test" : 'cervical cancer screening test' from "missing concepts" -code "cervical precancer lesion treatment" : 'cervical precancer lesion treatment' from "missing concepts" -code "Invasive cervical cancer treatment" : 'Invasive cervical cancer treatment' from "missing concepts" +code "needle-syringe": 'needle syringe' from "HIVConceptsCustom" +code "methadone": 'methadone' from "HIVConceptsCustom" +code "buprenorphine": 'buprenorphine' from "HIVConceptsCustom" +code "viral load test": 'viral load test' from "HIVConceptsCustom" +code "delivery": 'delivery' from "HIVConceptsCustom" +code "tb treatment": 'tb treatment' from "HIVConceptsCustom" +code "ART medication": 'ART medication' from "HIVConceptsCustom" +code "DSD ART eligibility assessed" : 'DSD ART eligibility assessed' from "HIVConceptsCustom" +code "syphilis test" : 'syphilis test' from "HIVConceptsCustom" +code "syphilis treatment" : 'syphilis treatment' from "HIVConceptsCustom" +code "Gonorrhoea test" : 'gonorrhoea test' from "HIVConceptsCustom" +code "Gonorrhoea treatment" : 'gonorrhoea treatment' from "HIVConceptsCustom" +code "HBsAg test" : 'HBsAg test' from "HIVConceptsCustom" +code "HCV viral load" : 'HCV viral load' from "HIVConceptsCustom" -valueset "Antenatal care contact": 'http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-contact' \ No newline at end of file +valueset "Antenatal care contact": 'http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-contact' diff --git a/input/cql/HIVConfig.cql b/input/cql/HIVConfig.cql index 319db5b1a84..d5da1c33227 100644 --- a/input/cql/HIVConfig.cql +++ b/input/cql/HIVConfig.cql @@ -1,21 +1,23 @@ library HIVConfig +include HIVConcepts called Concepts + using FHIR version '4.0.1' /* * HIV burden of setting */ define "HIV burden of setting": - 'High HIV burden setting' + Concepts."High HIV burden setting" define "Testing Interval": - 3 months + 3 months define "Intervention Interval": - 7 days + 7 days define "LTFU Days": - 28 days + 28 days define "DSD Retention Interval": - 12 months \ No newline at end of file + 12 months \ No newline at end of file diff --git a/input/cql/HIVD12DTLogic.cql b/input/cql/HIVD12DTLogic.cql new file mode 100644 index 00000000000..97ca6e5c78d --- /dev/null +++ b/input/cql/HIVD12DTLogic.cql @@ -0,0 +1,410 @@ +/** +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: "Reason for visit"='ART initiation' + */ +define "ART initiation visit": + exists( + Elements."Reason for visit D.DE1" O + where O.value ~ Concepts."ART initiation" + ) + +/* + @input: "Reason for Visit" + @pseudocode: "Reason for visit"='Clinical visit + */ +define "Clinical visit": + exists( + Elements."Reason for visit D.DE1" O + where O.value ~ Concepts."Clinical visit - HIV.D.DE3" + ) + +/* + @input: "Age" + @pseudocode: "Age" ≥ 20 years + */ +define "Age 20 or older": + Elements."Current Patient Age In Years" >= 20 + +/* + @input: "Age" + @pseudocode: ""Age"<20 years + */ +define "Age under 20": + Elements."Current Patient Age In Years" < 20 + + /* + @input: "Age" + @pseudocode: 'Age' ≥ 10 years + */ +define "Age 10 or older": + Elements."Current Patient Age In Years" >= 10 + +/* + @input: "HIV test result" + @pseudocode: "HIV test result"='HIV-positive' + */ +define "HIV Positive test result": + exists( + Elements."HIV test result" O + where O.value ~ Concepts."HIV-positive" + ) + +/* + @input: "On ART" + @pseudocode: "On ART"=False + */ +define "Not on ART": + not(exists( + Elements."On ART D.DE38" + )) + +/* + @input: "On ART" + @pseudocode: "On ART"=True + */ +define "On ART": + exists( + Elements."On ART D.DE38" + ) + +/* + @input: "Gender" + @pseudocode: "Gender"='Female' + */ +define "Client is female": + Elements."Female" + +/* + @input: "CD4 count" + @pseudocode: "CD4 count" ≤ 100 cells/mm3 + */ +define "CD4 less than or equal to 100 cells/mm3": + exists( + Elements."CD4 count D.DE364" O + where O.value <= 100 + ) + +/* + @input: "CD4 count" + @pseudocode: "CD4 count" ≤ 200 cells/mm3 + */ +define "CD4 less than or equal to 200 cells/mm3": + exists( + Elements."CD4 count D.DE364" O + where O.value <= 200 + ) + +/* + @input: "Current medications" + @pseudocode: "Current medications"='AZT' + */ +define "On AZT": + exists( + Elements."On ART D.DE38" MS + where MS.medication ~ Concepts."AZT" + ) + +/* + @input: "Current medications" + @pseudocode: "Current medications"='TDF' + */ +define "On TDF": + exists( + Elements."On ART D.DE38" MS + where MS.medication ~ Concepts."TDF - HIV.D.DE135" + ) + +/* + @input: "Suspicion of treatment failure or interruption" + @pseudocode: "Suspicion of treatment failure or interruption"=True + */ +define "Suspicion of treatment failure or interruption": + exists( + Elements."Suspicion of treatment failure or interruption Observation" O + where O.value = true + ) + + +/* + @dynamicValue: Guidance + */ +define "Guidance": + Combine({ + if "HIV testing services visit" and "Age 20 or older" and "HIV Positive test result" and "Not on ART" + then 'Recommended actions: +CD4 cell count +TB symptom screening + +Desirable actions: +HBV (HBsAg) serology +HCV serology +Screen for sexually transmitted infections +Assess for major noncommunicable chronic diseases and comorbidities + +General care activities recommended: +Determine WHO clinical stage based on past and current HIV-related conditions +Prepare for ART +Prepare, assess and support adherence +Provide family planning and contraception +Support disclosure and partner notification +Counsel on risk reduction and combination HIV prevention approaches +Assess, prevent and manage noncommunicable diseases +Screen for and manage mental health problems +Screen for and manage and substance use issues +Provide psychosocial counselling and support +Manage pain and symptoms +Conduct a nutritional assessment and counsel on nutrition + +Preventing and treating coinfections: +Provide co-trimoxazole preventive therapy +Conduct intensified TB case-finding +Provide isoniazid preventive therapy +Screen for cryptococcal infection and fungal prophylaxis +Prevent malaria (insecticide- treated bed-nets and prophylaxis) +Screen for sexually transmitted infections +Assess for vaccine-preventable diseases' + else '', + if "HIV testing services visit" and "Age under 20" and "HIV Positive test result" and "Not on ART" + then 'Recommended: +CD4 cell count +TB symptom screening + +Desirable: +HBV (HBsAg) serology +HCV serology +Screen for sexually transmitted infections +Assess for major noncommunicable chronic diseases and comorbidities + +General care activities recommended: + Determine WHO clinical stage based on past and current HIV-related conditions +Prepare for ART +Prepare, assess and support adherence +Provide family planning and contraception +Support disclosure and partner notification +Counsel on risk reduction and combination HIV prevention approaches +Assess, prevent and manage noncommunicable diseases +Screen for and manage mental health problems +Screen for and manage and substance use issues +Provide psychosocial counselling and support +Manage pain and symptoms +Conduct a nutritional, growth and development assessment + +Preventing and treating coinfections: +Provide co-trimoxazole preventive therapy +Conduct intensified TB case-finding +Provide isoniazid preventive therapy +Screen for cryptococcal infection and fungal prophylaxis +Prevent malaria (insecticide- treated bed-nets and prophylaxis) +Screen for sexually transmitted infections +Assess for vaccine-preventable diseases' + else '', + if "HIV testing services visit" and "HIV Positive test result" and "Not on ART" and "CD4 less than or equal to 100 cells/mm3" + then 'Desirable actions: +Cryptococcus antigen test' + else '', + if "HIV testing services visit" and "HIV Positive test result" and "Not on ART" and "Client is female" + then 'Desirable actions: +Pregnancy test' + else '', + if "ART initiation visit" and "Not on ART" + then 'Recommended: +Baseline CD4 cell count for identifying advanced HIV disease +Age-appropriate TB symptom screening + +Desirable: +Blood pressure measurement + +General care activities recommended: +Preparing people for ART +WHO clinical staging, past and current HIV- related conditions +Preparing, assessing and supporting adherence +Pregnancy status, family planning and contraception +Support for disclosure and partner notification +Risk-reduction counselling and combination and HIV prevention approaches +Screening for, preventing and managing noncommunicable diseases +Screening for and managing mental health problems and substance use +Psychosocial counselling and support +Managing pain and symptoms +Nutritional assessment and counselling +Infant and child feeding +Nutritional, growth and development assessment for children and adolescents + +Preventing and treating coinfections: +Co-trimoxazole preventive therapy +Intensified TB case- finding +Isoniazid preventive therapy +Screening for cryptococcal infection and fungal prophylaxis when appropriate +Screening for hepatitis B and C +Malaria prevention (insecticide-treated bed nets and prophylaxis) +Screening for sexually transmitted infections +Preventing and screening for cervical cancer +Assessing for vaccine- preventable diseases other than HBV and HCV infection' + else '', + if "ART initiation visit" and "Age 10 or older" and "Not on ART" and "CD4 less than or equal to 200 cells/mm3" + then 'Perform a cryptococcal antigen for adults and adolescents' + else '', + if "ART initiation visit" and "Not on ART" and "On AZT" + then 'Desirable actions: +Haemoglobin test' + else '', + if "ART initiation visit" and "Not on ART" and "On TDF" + then 'Desirable actions: +Serum creatinine test +Estimated glomerular filtration rate (eGFR)' + else '', + if "ART initiation visit" and "Not on ART" and "Client is female" + then 'Desirable actions: +Pregnancy test' + else '', + if "Clinical visit" and "Age 20 or older" and "On ART" + then 'Recommended actions: +Schedule the following viral load tests: +HIV viral load test ≤ (ART start date + 6 months) +HIV viral load test ≤ (ART start date + 12 months) +HIV viral load test every 12 months thereafter +Perform a CD4 cell count every 6 months until ""Established on ART"" = TRUE + +Desirable actions: +Serum creatinine and estimated glomerular filtration rate for TDF + +Recommended general care activities: +Adherence support interventions should be provided to people on ART (p xxxix of source). +Manage current medications. +Provide family planning and contraception. +Support disclosure and partner notification. +Counsel on risk reduction and combination HIV prevention approaches. +Assess, prevent and manage noncommunicable diseases. +Screen for and manage mental health problems. +Screen for and manage and substance use issues. +Provide psychosocial counselling and support. +Manage pain and symptoms. +Conduct a nutritional assessment and counsel on nutrition. + +Preventing and treating coinfections: +Provide co-trimoxazole preventive therapy +Prevent malaria (insecticide- treated bed-nets and prophylaxis) +Screen for sexually transmitted infections +Assess for vaccine-preventable diseases' + else '', + if "Clinical visit" and "Age under 20" and "On ART" + then 'Recommended actions: +Schedule viral load tests on the following dates: +HIV viral load test ≤ (ART start date + 6 months) +HIV viral load test ≤ (ART start date + 12 months) +HIV viral load test every 12 months thereafter +CD4 cell count every 6 months until ""Established on ART"" = TRUE + +Recommended general care activities: +Prepare, assess and support adherence. +Manage current medications. +Provide family planning and contraception. +Support disclosure and partner notification. +Counsel on risk reduction and combination HIV prevention approaches. +Assess, prevent and manage noncommunicable diseases. +Screen for and manage mental health problems. +Screen for and manage and substance use issues. +Provide psychosocial counselling and support. +Manage pain and symptoms. +Conduct a nutritional, growth and development assessment. + +Preventing and treating coinfections: +Provide co-trimoxazole preventive therapy +Prevent malaria (insecticide- treated bed-nets and prophylaxis) +Screen for sexually transmitted infections +Assess for vaccine-preventable diseases' + else '', + if "Clinical visit" and "Age under 20" and "Client is female" + then 'Pregnancy test' + else '', + if "Clinical visit" and "On ART" and "On TDF" + then 'Desirable actions: +Serum creatinine +Estimated glomerular filtration rate for TDF' + else '', + if "Clinical visit" and "Age 20 or older" and "Suspicion of treatment failure or interruption" + then 'Desirable actions: +HBV (HBsAg) serology (before switching ART regimen if this testing was not done or if the result was negative at baseline and the patient was not vaccinated thereafter) + +Recommended general care activities: +Prepare, assess and support adherence. +Manage current medications. +Provide family planning and contraception. +Support disclosure and partner notification. +Counsel on risk reduction and combination HIV prevention approaches. +Assess, prevent and manage noncommunicable diseases. +Screen for and manage mental health problems. +Screen for and manage and substance use issues. +Provide psychosocial counselling and support. +Manage pain and symptoms. +Conduct a nutritional assessment and counsel on nutrition. + +Preventing and treating coinfections: +Provide co-trimoxazole preventive therapy +Conduct intensified TB case-finding +Prevent malaria (insecticide- treated bed-nets and prophylaxis) +Screen for sexually transmitted infections +Assess for vaccine-preventable diseases' + else '', + if "Clinical visit" and "Age 20 or older" and "Suspicion of treatment failure or interruption" + then 'Desirable actions: +HBV (HBsAg) serology (before switching ART regimen if this testing was not done or if the result was negative at baseline and the patient was not vaccinated thereafter) + +Recommended general care activities: +Prepare, assess and support adherence. +Manage current medications. +Provide family planning and contraception. +Support disclosure and partner notification. +Counsel on risk reduction and combination HIV prevention approaches. +Assess, prevent and manage noncommunicable diseases. +Screen for and manage mental health problems. +Screen for and manage and substance use issues. +Provide psychosocial counselling and support. +Manage pain and symptoms. +Conduct a nutritional, growth and development assessment. + +Preventing and treating coinfections: +Provide co-trimoxazole preventive therapy +Conduct intensified TB case-finding +Prevent malaria (insecticide- treated bed-nets and prophylaxis) +Screen for sexually transmitted infections +Assess for vaccine-preventable diseases' + else '' + }) \ No newline at end of file diff --git a/input/cql/HIVD4DTLogic.cql b/input/cql/HIVD4DTLogic.cql new file mode 100644 index 00000000000..339e0e8edfa --- /dev/null +++ b/input/cql/HIVD4DTLogic.cql @@ -0,0 +1,179 @@ +/** +Library: HIV.D4.DT Logic + +@DecisionID: HIV.D4.DT +@BusinessRule: +@Trigger: +@HitPolicy: Rule Order +@Description: + +Data Concepts: + + +Consolidated guidelines on HIV prevention, testing, treatment, service delivery and monitoring: recommendations for a public health approach (2021) Chapter 5: Advanced HIV Disease. Figure 5.1: Algorithm for providing a package of care for people with advanced HIV disease. +*/ +library HIVD4DTLogic + +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: TB screening algorithm + @pseudocode: "TB screening algorithm"='W4SS single screening algorithm' + */ +define "W4SS single screening algorithm": + exists( + Elements."TB screening algorithm Observation" O + where O.value ~ Concepts."W4SS single screening algorithm" + ) + + /* + @input: TB screening algorithm + @pseudocode: "TB screening algorithm"='Sequential positive screening algorithm with W4SS and CRP' + */ +define "Sequential positive screening algorithm with W4SS and CRP": + exists( + Elements."TB screening algorithm Observation" O + where O.value ~ Concepts."Sequential positive screening algorithm with W4SS and CRP" + ) + + /* + @input: TB screening algorithm + @pseudocode: "TB screening algorithm"='Screening with any TB symptom' + */ +define "Screening with any TB symptom": + exists( + Elements."TB screening algorithm Observation" O + where O.value ~ Concepts."Screening with any TB symptom" + ) + +/* + @input: Estimated age + @pseudocode: "Estimated age" >= 10 years + */ +define "Age 10 or older": + Elements."Current Patient Age In Years" >= 10 + +/* + @input: Estimated age + @pseudocode: "Estimated age" < 15 years + */ +define "Age under 15": + Elements."Current Patient Age In Years" < 15 + +/* + @input: Symptoms of TB + @pseudocode: "Symptoms of TB" IN 'Current cough', 'Fever of 39 °C or greater', 'Weight loss (reported)', 'Night sweats' + */ +define "Has symptoms of TB": + exists( + Elements."Symptoms of TB Observation" O + where O.value ~ Concepts."Current cough" + or O.value ~ Concepts."Fever of 39 °C or greater" + or O.value ~ Concepts."Weight loss reported" + or O.value ~ Concepts."Night sweats" + ) + +/* + @input: Symptoms of TB + @pseudocode: "Symptoms of TB" = 'None' + */ +define "Does not have symptoms of TB": + exists( + Elements."Symptoms of TB Observation" O + where O.value ~ Concepts."None" + ) or not("Has symptoms of TB") + +/* + @input: C-reactive protein test result + @pseudocode: + */ +define "No C-reactive protein test done": + not(exists( + Elements."C reactive protein test result" + )) + +/* + @input: C-reactive protein test result + @pseudocode: "C reactive protein test result" ≤ 5 mg/L + */ +define "C-reactive protein at or under 5mg/L": + exists( + Elements."C reactive protein test result" O + where O.value < 5 + ) + +/* + @input: C-reactive protein test result + @pseudocode: "C reactive protein test result" > 5 mg/L + */ +define "C-reactive protein over 5mg/L": + exists( + Elements."C reactive protein test result" O + where O.value > 5 + ) + +/* + @input: History of contact with a person with TB + @pseudocode: "History of contact with a person with TB"=True + */ +define "History of contact with a person with TB": + exists( + Elements."History of contact with a person with TB Observation" O + where O.value = true + ) + +/* + @dynamicValue: Guidance + */ +define "Guidance": + Combine({ + if "W4SS single screening algorithm" and "Age 10 or older" and "Has symptoms of TB" + then 'Screen positive for TB. Refer for diagnostic evaluation including mWRD & clinical evaluation as indicated. + +In PLHIV, diagnostic testing for TB with LF-LAM and other methods is usually considered early on. See WHO consolidated guidelines on tuberculosis, Module 3: Diagnosis - Rapid diagnostics for tuberculosis detection. + +LF-LAM can assist TB diagnosis among people with advanced HIV disease (AHD) with symptoms and signs of TB. For inpatients with CD4 count ≤200 cells/mm3, outpatients with CD4 count ≤100 cells/mm3, or individuals with any CD4 count with symptoms of AHD or if seriously ill (See WHO Consolidated guidelines on HIV prevention, testing, treatment, service delivery and monitoring: recommendations for a public health approach (2021))' + else '', + if "W4SS single screening algorithm" and "Age 10 or older" and "Does not have symptoms of TB" + then 'Screen negative for TB, assess for TPT.' + else '', + if "Sequential positive screening algorithm with W4SS and CRP" and "Age 10 or older" and "Does not have symptoms of TB" + then 'Screen negative for TB. Assess for TPT.' + else '', + if "Sequential positive screening algorithm with W4SS and CRP" and "Age 10 or older" and "Has symptoms of TB" and "No C-reactive protein test done" + then 'Perform C reative protein test.' + else '', + if "Sequential positive screening algorithm with W4SS and CRP" and "Age 10 or older" and "Has symptoms of TB" and "C-reactive protein at or under 5mg/L" + then 'Screen positive for TB. Refer for diagnostic evaluation including mWRD & clinical evaluation as indicated. + +In PLHIV, diagnostic testing for TB with LF-LAM and other methods is usually considered early on. + +Currently, the c-reative protein cut-off value of > 5 mg/L is recommended, as it is the lowest threshold indicating abnormality in many clinical settings and because it is the most sensitive. At this cut-off, CRP has a similar sensitivity and higher or similar specificity to symptom screening in all subpopulations of adults and adolescents living with HIV tested (Section 5.2.2, 2021 WHO operation handbook on tuberculosis, Module 2: screening). + +LF-LAM can assist TB diagnosis among people with advanced HIV disease (AHD) with symptoms and signs of TB. For inpatients with CD4 count ≤200 cells/mm3, outpatients with CD4 count ≤100 cells/mm3, or individuals with any CD4 count with symptoms of AHD or if seriously ill.' + else '', + if "Sequential positive screening algorithm with W4SS and CRP" and "Age 10 or older" and "Has symptoms of TB" and "C-reactive protein over 5mg/L" + then 'In PLHIV, diagnostic testing for TB with LF-LAM and other methods is usually considered early on. + +Currently, the c-reative protein cut-off value of > 5 mg/L is recommended, as it is the lowest threshold indicating abnormality in many clinical settings and because it is the most sensitive. At this cut-off, CRP has a similar sensitivity and higher or similar specificity to symptom screening in all subpopulations of adults and adolescents living with HIV tested (Section 5.2.2, 2021 WHO operation handbook on tuberculosis, Module 2: screening). + +LF-LAM can assist TB diagnosis among people with advanced HIV disease (AHD) with symptoms and signs of TB. For inpatients with CD4 count ≤200 cells/mm3, outpatients with CD4 count ≤100 cells/mm3, or individuals with any CD4 count with symptoms of AHD or if seriously ill.' + else '', + if "Screening with any TB symptom" and "Age under 15" and "Has symptoms of TB" and "History of contact with a person with TB" + then 'Screen positive for TB. Refer for diagnostic evaluation including mWRD & clinical evaluation as indicated. + +Any child < 15 years who has had close contact with someone with TB disease should be screened for TB with a symptom screen and/or CXR as part of active contact-tracing (see Algorithm A.5.1 in Annex 5). Symptoms that should be used to screen for TB are cough, fever and poor weight gain (or weight loss). In young children, reduced playfulness or lethargy should also be included in symptom screening; cough may be absent.' + else '', + if "Screening with any TB symptom" and "Age under 15" and "Does not have symptoms of TB" and "History of contact with a person with TB" + then 'Screen negative for TB. Refer for TPT.' + else '' + }) diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index 0b8be825dc9..a660b05d895 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -488,13 +488,9 @@ define "Social contact B.DE12 Observation": @activity: HIV.B1 Determine reason for visit @description: Date and time when the client had suspected exposure to HIV */ -// TODO: Replace placeholder with relevant CQL logic define "Date/time of suspected exposure to HIV B.DE14": [Observation: Concepts."Date/time of suspected exposure to HIV - HIV.B.DE14"] O where O.status in { 'final', 'amended', 'corrected' } -define "Date/time of suspected exposure to HIV B.DE14 Value": - "Date/time of suspected exposure to HIV B.DE14" O - return O.value /* End of Date/time of suspected exposure to HIV B.DE14 */ /* @@ -953,12 +949,6 @@ define "Assay 0 B.DE89 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: The first test in the HIV testing strategy */ -// TODO: Replace placeholder with relevant CQL logic -define "Assay 1 B.DE90": - exists "Assay 1 B.DE90 Condition" - or exists "Assay 1 B.DE90 Observation" -define "Assay 1 B.DE90 Condition": - [Condition: Concepts."Assay 1 - HIV.B.DE90"] define "Assay 1 B.DE90 Observation": "Assay number in testing strategy B.DE88 Observation" O where O.status in { 'final', 'amended', 'corrected' } @@ -970,12 +960,6 @@ define "Assay 1 B.DE90 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: The second test in the HIV testing strategy */ -// TODO: Replace placeholder with relevant CQL logic -define "Assay 2 B.DE91": - exists "Assay 2 B.DE91 Condition" - or exists "Assay 2 B.DE91 Observation" -define "Assay 2 B.DE91 Condition": - [Condition: Concepts."Assay 2 - HIV.B.DE91"] define "Assay 2 B.DE91 Observation": "Assay number in testing strategy B.DE88 Observation" O where O.status in { 'final', 'amended', 'corrected' } @@ -987,12 +971,6 @@ define "Assay 2 B.DE91 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: The third test in the HIV testing strategy */ -// TODO: Replace placeholder with relevant CQL logic -define "Assay 3 B.DE92": - exists "Assay 3 B.DE92 Condition" - or exists "Assay 3 B.DE92 Observation" -define "Assay 3 B.DE92 Condition": - [Condition: Concepts."Assay 3 - HIV.B.DE92"] define "Assay 3 B.DE92 Observation": "Assay number in testing strategy B.DE88 Observation" O where O.status in { 'final', 'amended', 'corrected' } @@ -3430,46 +3408,10 @@ define "Restarting following a period of not taking PrEP Observation": */ // TODO: Replace placeholder with relevant CQL logic define "PEP history": - exists "PEP history Observation" -define "PEP history Observation": [Observation: Concepts."PEP history"] O where O.status in { 'final', 'amended', 'corrected' } /* End of PEP history */ -/* -@dataElement: HIV.C.DE32 - First-time user -@activity: HIV.C3 Capture or update client history -@description: The client has never used post-exposure prophylaxis (PEP) before -*/ -// TODO: Replace placeholder with relevant CQL logic -define "First-time user C.DE32": - exists "First-time user C.DE32 Condition" - or exists "First-time user C.DE32 Observation" -define "First-time user C.DE32 Condition": - [Condition: Concepts."First-time user - HIV.C.DE32"] -define "First-time user C.DE32 Observation": - "PEP history Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."First-time user - HIV.C.DE32" -/* End of First-time user C.DE32 */ - -/* -@dataElement: HIV.C.DE33 - Repeat user -@activity: HIV.C3 Capture or update client history -@description: The client has used post-exposure prophylaxis (PEP) before -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Repeat user": - exists "Repeat user Condition" - or exists "Repeat user Observation" -define "Repeat user Condition": - [Condition: Concepts."Repeat user"] -define "Repeat user Observation": - "PEP history Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Repeat user" -/* End of Repeat user */ - /* @dataElement: HIV.C.DE35 - Date client completes PEP course @activity: HIV.C3 Capture or update client history @@ -3489,82 +3431,11 @@ define "Date client completes PEP course Value": @activity: HIV.C3 Capture or update client history @description: Signs the client is at a substantial risk of HIV infection */ -// TODO: Replace placeholder with relevant CQL logic define "Signs of substantial risk of HIV infection C.DE36": - exists "Signs of substantial risk of HIV infection C.DE36 Observation" -define "Signs of substantial risk of HIV infection C.DE36 Observation": [Observation: Concepts."Signs of substantial risk of HIV infection - HIV.C.DE36"] O where O.status in { 'final', 'amended', 'corrected' } /* End of Signs of substantial risk of HIV infection C.DE36 */ -/* -@dataElement: HIV.C.DE37 - No condom use during sex with more than one partner in the past 6 months -@activity: HIV.C3 Capture or update client history -@description: Recent vaginal or anal sexual intercourse without a condom with more than one partner -*/ -// TODO: Replace placeholder with relevant CQL logic -define "No condom use during sex with more than one partner in the past 6 months C.DE37": - exists "No condom use during sex with more than one partner in the past 6 months C.DE37 Condition" - or exists "No condom use during sex with more than one partner in the past 6 months C.DE37 Observation" -define "No condom use during sex with more than one partner in the past 6 months C.DE37 Condition": - [Condition: Concepts."No condom use during sex with more than one partner in the past 6 months - HIV.C.DE37"] -define "No condom use during sex with more than one partner in the past 6 months C.DE37 Observation": - "Signs of substantial risk of HIV infection C.DE36 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."No condom use during sex with more than one partner in the past 6 months - HIV.C.DE37" -/* End of No condom use during sex with more than one partner in the past 6 months C.DE37 */ - -/* -@dataElement: HIV.C.DE38 - STI in the past 6 months -@activity: HIV.C3 Capture or update client history -@description: A recent history (in the last 6 months) of a sexually transmitted infection (STI ) by laboratory testing, self-report or syndromic STI treatment -*/ -// TODO: Replace placeholder with relevant CQL logic -define "STI in the past 6 months C.DE38": - exists "STI in the past 6 months C.DE38 Condition" - or exists "STI in the past 6 months C.DE38 Observation" -define "STI in the past 6 months C.DE38 Condition": - [Condition: Concepts."STI in the past 6 months - HIV.C.DE38"] -define "STI in the past 6 months C.DE38 Observation": - "Signs of substantial risk of HIV infection C.DE36 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."STI in the past 6 months - HIV.C.DE38" -/* End of STI in the past 6 months C.DE38 */ - -/* -@dataElement: HIV.C.DE39 - A sexual partner in the past 6 months had one or more HIV risk factors -@activity: HIV.C3 Capture or update client history -@description: A recent sex partner of the client had HIV risk factors -*/ -// TODO: Replace placeholder with relevant CQL logic -define "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39": - exists "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Condition" - or exists "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Observation" -define "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Condition": - [Condition: Concepts."A sexual partner in the past 6 months had one or more HIV risk factors - HIV.C.DE39"] -define "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Observation": - "Signs of substantial risk of HIV infection C.DE36 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."A sexual partner in the past 6 months had one or more HIV risk factors - HIV.C.DE39" -/* End of A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 */ - -/* -@dataElement: HIV.C.DE40 - PrEP requested by client -@activity: HIV.C3 Capture or update client history -@description: Client is requesting PrEP, reflecting a decision-making process has already taken place and suggesting of substantial risk of HIV -*/ -// TODO: Replace placeholder with relevant CQL logic -define "PrEP requested by client C.DE40": - exists "PrEP requested by client C.DE40 Condition" - or exists "PrEP requested by client C.DE40 Observation" -define "PrEP requested by client C.DE40 Condition": - [Condition: Concepts."PrEP requested by client - HIV.C.DE40"] -define "PrEP requested by client C.DE40 Observation": - "Signs of substantial risk of HIV infection C.DE36 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."PrEP requested by client - HIV.C.DE40" -/* End of PrEP requested by client C.DE40 */ - /* @dataElement: HIV.C.DE46 - Acute HIV infection symptoms @activity: HIV.C3 Capture or update client history @@ -3721,97 +3592,10 @@ define "Rash Observation": */ // TODO: Replace placeholder with relevant CQL logic define "Sex partners HIV treatment status": - exists "Sex partners HIV treatment status Observation" -define "Sex partners HIV treatment status Observation": [Observation: Concepts."Sex partners HIV treatment status"] O where O.status in { 'final', 'amended', 'corrected' } /* End of Sex partners HIV treatment status */ -/* -@dataElement: HIV.C.DE56 - Not on ART -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and not on ART -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Not on ART": - exists "Not on ART Condition" - or exists "Not on ART Observation" -define "Not on ART Condition": - [Condition: Concepts."Not on ART"] -define "Not on ART Observation": - "Sex partners HIV treatment status Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Not on ART" -/* End of Not on ART */ - -/* -@dataElement: HIV.C.DE57 - On ART less than 6 months -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and is on ART less than 6 months. ART may take up to 6 months to suppress viral load. In studies of serodiscordant couples, pre-exposure prophylaxis (PrEP) has provided a useful bridge to full viral suppression by the partner during that time. -*/ -// TODO: Replace placeholder with relevant CQL logic -define "On ART less than 6 months": - exists "On ART less than 6 months Condition" - or exists "On ART less than 6 months Observation" -define "On ART less than 6 months Condition": - [Condition: Concepts."On ART less than 6 months"] -define "On ART less than 6 months Observation": - "Sex partners HIV treatment status Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."On ART less than 6 months" -/* End of On ART less than 6 months */ - -/* -@dataElement: HIV.C.DE58 - Partner has suspected low adherence to ART -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and is suspected to have low adherence to ART. There have been gaps in the partner's treatment adherence or the couple is not communicating openly about treatment adherence and viral load test results. -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Partner has suspected low adherence to ART": - exists "Partner has suspected low adherence to ART Condition" - or exists "Partner has suspected low adherence to ART Observation" -define "Partner has suspected low adherence to ART Condition": - [Condition: Concepts."Partner has suspected low adherence to ART"] -define "Partner has suspected low adherence to ART Observation": - "Sex partners HIV treatment status Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Partner has suspected low adherence to ART" -/* End of Partner has suspected low adherence to ART */ - -/* -@dataElement: HIV.C.DE59 - Partner is not virally suppressed -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and not virally suppressed -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Partner is not virally suppressed": - exists "Partner is not virally suppressed Condition" - or exists "Partner is not virally suppressed Observation" -define "Partner is not virally suppressed Condition": - [Condition: Concepts."Partner is not virally suppressed"] -define "Partner is not virally suppressed Observation": - "Sex partners HIV treatment status Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Partner is not virally suppressed" -/* End of Partner is not virally suppressed */ - -/* -@dataElement: HIV.C.DE60 - Partner is virally suppressed and has been on ART for 6 months or more -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and virally suppressed with 6 months or more on ART -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Partner is virally suppressed and has been on ART for 6 months or more": - exists "Partner is virally suppressed and has been on ART for 6 months or more Condition" - or exists "Partner is virally suppressed and has been on ART for 6 months or more Observation" -define "Partner is virally suppressed and has been on ART for 6 months or more Condition": - [Condition: Concepts."Partner is virally suppressed and has been on ART for 6 months or more"] -define "Partner is virally suppressed and has been on ART for 6 months or more Observation": - "Sex partners HIV treatment status Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Partner is virally suppressed and has been on ART for 6 months or more" -/* End of Partner is virally suppressed and has been on ART for 6 months or more */ - /* @dataElement: HIV.C.DE61 - Suitable for PrEP @activity: HIV.C8 Suitable for PrEP or PEP? @@ -4309,11 +4093,6 @@ define "Low estimated creatinine clearance Observation": */ // TODO: Replace placeholder with relevant CQL logic define "Acute HIV infection symptoms C.DE116": - exists "Acute HIV infection symptoms C.DE116 Condition" - or exists "Acute HIV infection symptoms C.DE116 Observation" -define "Acute HIV infection symptoms C.DE116 Condition": - [Condition: Concepts."Acute HIV infection symptoms - HIV.C.DE116"] -define "Acute HIV infection symptoms C.DE116 Observation": "Contraindications to PrEP usage Observation" O where O.status in { 'final', 'amended', 'corrected' } and O.value ~ Concepts."Acute HIV infection symptoms - HIV.C.DE116" @@ -4326,11 +4105,6 @@ define "Acute HIV infection symptoms C.DE116 Observation": */ // TODO: Replace placeholder with relevant CQL logic define "Probable recent exposure to HIV": - exists "Probable recent exposure to HIV Condition" - or exists "Probable recent exposure to HIV Observation" -define "Probable recent exposure to HIV Condition": - [Condition: Concepts."Probable recent exposure to HIV"] -define "Probable recent exposure to HIV Observation": "Contraindications to PrEP usage Observation" O where O.status in { 'final', 'amended', 'corrected' } and O.value ~ Concepts."Probable recent exposure to HIV" @@ -5049,116 +4823,11 @@ define "Services for responding to violence against women C.DE169 Observation": @activity: HIV.D1 Determine reason for visit @description: Whether visit was scheduled or unscheduled, clinical only, or for ARV drug pick-up */ -// TODO: Replace placeholder with relevant CQL logic define "Reason for visit D.DE1": - exists "Reason for visit D.DE1 Observation" -define "Reason for visit D.DE1 Observation": [Observation: Concepts."Reason for visit - HIV.D.DE1"] O where O.status in { 'final', 'amended', 'corrected' } /* End of Reason for visit D.DE1 */ -/* -@dataElement: HIV.D.DE2 - First clinical visit -@activity: HIV.D1 Determine reason for visit -@description: The client's first appointment for clinical care by a provider at the facility -*/ -// TODO: Replace placeholder with relevant CQL logic -define "First clinical visit": - exists "First clinical visit Condition" - or exists "First clinical visit Observation" -define "First clinical visit Condition": - [Condition: Concepts."First clinical visit"] -define "First clinical visit Observation": - "Reason for visit D.DE1 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."First clinical visit" -/* End of First clinical visit */ - -/* -@dataElement: HIV.D.DE3 - Clinical visit -@activity: HIV.D1 Determine reason for visit -@description: Appointment for clinical care by a provider -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Clinical visit D.DE3": - exists "Clinical visit D.DE3 Condition" - or exists "Clinical visit D.DE3 Observation" -define "Clinical visit D.DE3 Condition": - [Condition: Concepts."Clinical visit - HIV.D.DE3"] -define "Clinical visit D.DE3 Observation": - "Reason for visit D.DE1 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Clinical visit - HIV.D.DE3" -/* End of Clinical visit D.DE3 */ - -/* -@dataElement: HIV.D.DE4 - ART initiation -@activity: HIV.D1 Determine reason for visit -@description: Appointment for initiation of ART -*/ -// TODO: Replace placeholder with relevant CQL logic -define "ART initiation": - exists "ART initiation Condition" - or exists "ART initiation Observation" -define "ART initiation Condition": - [Condition: Concepts."ART initiation"] -define "ART initiation Observation": - "Reason for visit D.DE1 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."ART initiation" -/* End of ART initiation */ - -/* -@dataElement: HIV.D.DE5 - ART drug pick up -@activity: HIV.D1 Determine reason for visit -@description: Appointment for an antiretroviral drug pick up -*/ -// TODO: Replace placeholder with relevant CQL logic -define "ART drug pick up": - exists "ART drug pick up Condition" - or exists "ART drug pick up Observation" -define "ART drug pick up Condition": - [Condition: Concepts."ART drug pick up"] -define "ART drug pick up Observation": - "Reason for visit D.DE1 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."ART drug pick up" -/* End of ART drug pick up */ - -/* -@dataElement: HIV.D.DE6 - Issues and concerns -@activity: HIV.D1 Determine reason for visit -@description: Visit to address issues and concerns -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Issues and concerns": - exists "Issues and concerns Condition" - or exists "Issues and concerns Observation" -define "Issues and concerns Condition": - [Condition: Concepts."Issues and concerns"] -define "Issues and concerns Observation": - "Reason for visit D.DE1 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Issues and concerns" -/* End of Issues and concerns */ - -/* -@dataElement: HIV.D.DE7 - Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer -@activity: HIV.D1 Determine reason for visit -@description: Appointment for a post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7": - exists "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Condition" - or exists "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Observation" -define "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Condition": - [Condition: Concepts."Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer - HIV.D.DE7"] -define "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Observation": - "Reason for visit D.DE1 Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer - HIV.D.DE7" -/* End of Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 */ - /* @dataElement: HIV.D.DE9 - Body temperature @activity: HIV.D2 Take vital signs @@ -13873,10 +13542,7 @@ define "Inconclusive G.DE73 Observation": @activity: HIV.B6 Capture or update client history @description: HIV status of the partner or contact given by the index case */ -// TODO: Replace placeholder with relevant CQL logic define "HIV status of partner or contact": - exists "HIV status of partner or contact Observation" -define "HIV status of partner or contact Observation": [Observation: Concepts."HIV status of partner or contact"] O where O.status in { 'final', 'amended', 'corrected' } /* End of HIV status of partner or contact */ @@ -14490,10 +14156,7 @@ define "HIV test date SRV.DE1 Value": @activity: HIV.B7 Test for HIV using testing algorithm @description: The result from HIV testing after applying the testing algorithm */ -// TODO: Replace placeholder with relevant CQL logic define "HIV test result SRV.DE2": - exists "HIV test result SRV.DE2 Observation" -define "HIV test result SRV.DE2 Observation": [Observation: Concepts."HIV test result - HIV.SRV.DE2"] O where O.status in { 'final', 'amended', 'corrected' } /* End of HIV test result SRV.DE2 */ diff --git a/input/cql/HIVEncounterElements.cql b/input/cql/HIVEncounterElements.cql index 39a64d75a86..310c799031f 100644 --- a/input/cql/HIVEncounterElements.cql +++ b/input/cql/HIVEncounterElements.cql @@ -25,34 +25,6 @@ context Patient // Entries based on DAK Data Dictionary for Data Elements marked as used // in at least one Decision Support Table or Aggregate Indicator -/* -@dataElement: HIV.A.DE3 - Visit date -@activity: HIV.A2 Gather client details -@description: The date and time of the client's visit -*/ -define "Visit date A.DE3": - Elements."Visit date A.DE3" E - where E.period.toInterval() starts on or before Today -define "Visit date A.DE3 Value": - "Visit date A.DE3" E - return E.period.start -/* End of Visit date A.DE3 */ - -/* -@dataElement: HIV.A.DE16 - Estimated age -@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: If DOB is unknown, enter the client's estimated age. Display client's age in number of years. -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Estimated age": - Elements."Estimated age" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "Estimated age Value": - "Estimated age" O - return O.value -/* End of Estimated age */ - /* @dataElement: HIV.A.DE17 - Age @activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record @@ -63,18 +35,6 @@ define "Estimated age Value": */ define "Current Patient Age In Years": AgeInYearsAt(Today()) - -/** - * @dataElement Patient age in weeks - */ -define "Current Patient Age In Weeks": - AgeInWeeksAt(Today()) - -/** - * @dataElement Patient age in months - */ -define "Current Patient Age In Months": - AgeInMonthsAt(Today()) /* End of Age */ /* @@ -84,11 +44,7 @@ define "Current Patient Age In Months": */ // TODO: Replace placeholder with relevant CQL logic define "Gender": - exists "Gender Observation" -define "Gender Observation": - Elements."Gender Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + Patient.gender /* End of Gender */ /* @@ -96,17 +52,8 @@ define "Gender Observation": @activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record @description: Client identifies as female */ -// TODO: Replace placeholder with relevant CQL logic define "Female": - exists "Female Condition" - or exists "Female Observation" -define "Female Condition": - Elements."Female Condition" C - where C.prevalenceInterval() starts on or before Today -define "Female Observation": - Elements."Female Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + "Gender" ~ 'female' /* End of Female */ /* @@ -114,138 +61,18 @@ define "Female Observation": @activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record @description: Client identifies as male */ -// TODO: Replace placeholder with relevant CQL logic define "Male": - exists "Male Condition" - or exists "Male Observation" -define "Male Condition": - Elements."Male Condition" C - where C.prevalenceInterval() starts on or before Today -define "Male Observation": - Elements."Male Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + "Gender" ~ 'male' /* End of Male */ -/* -@dataElement: HIV.A.DE21 - Transgender male -@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: Client identifies as transgender male -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Transgender male": - exists "Transgender male Condition" - or exists "Transgender male Observation" -define "Transgender male Condition": - Elements."Transgender male Condition" C - where C.prevalenceInterval() starts on or before Today -define "Transgender male Observation": - Elements."Transgender male Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Transgender male */ - -/* -@dataElement: HIV.A.DE22 - Transgender female -@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: Client identifies as transgender female -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Transgender female": - exists "Transgender female Condition" - or exists "Transgender female Observation" -define "Transgender female Condition": - Elements."Transgender female Condition" C - where C.prevalenceInterval() starts on or before Today -define "Transgender female Observation": - Elements."Transgender female Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Transgender female */ - -/* -@dataElement: HIV.A.DE23 - Other -@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: Additional category -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Other A.DE23": - exists "Other A.DE23 Condition" - or exists "Other A.DE23 Observation" -define "Other A.DE23 Condition": - Elements."Other A.DE23 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Other A.DE23 Observation": - Elements."Other A.DE23 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Other A.DE23 */ - -/* -@dataElement: HIV.B.DE1 - Reason for visit -@activity: HIV.B1 Determine reason for visit -@description: Reason for HIV testing services visit -*/ -define "Reason for visit B.DE1": - Elements."HTS Visit" E - where E.partOf.references(EncounterId) - or E.period.start = Today - return E.reasonCode -/* End of Reason for visit B.DE1 */ - -/* -@dataElement: HIV.B.DE2 - First-time HIV test -@activity: HIV.B1 Determine reason for visit -@description: First encounter for screening for human immunodeficiency virus -*/ -define "Is First-time HIV test Encounter": - exists "First-time HIV test Encounter" -define "First-time HIV test Encounter": - Elements."First-time HIV test Encounter" E - where E.partOf.references(EncounterId) - or E.period.start = Today -/* End of First-time HIV test */ - -/* -@dataElement: HIV.B.DE3 - Retesting for HIV -@activity: HIV.B1 Determine reason for visit -@description: Retesting for human immunodeficiency virus -*/ -define "Is Retesting for HIV B.DE3 Encounter": - exists "Retesting for HIV B.DE3 Encounter" -define "Retesting for HIV B.DE3 Encounter": - Elements."Retesting for HIV B.DE3 Encounter" E - where E.partOf.references(EncounterId) - or E.period.start = Today -/* End of Retesting for HIV B.DE3 */ - -/* -@dataElement: HIV.B.DE4 - HIV testing services visit -@activity: HIV.B1 Determine reason for visit -@description: Client attending facility for HIV testing services visit -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Is HIV testing services visit": - exists "HIV testing services visit Encounter" -define "HIV testing services visit Encounter": - Elements."HIV testing services visit Encounter" E - where E.partOf.references(EncounterId) - or E.period.start = Today -/* End of HIV testing services visit */ - /* @dataElement: HIV.B.DE14 - Date/time of suspected exposure to HIV @activity: HIV.B1 Determine reason for visit @description: Date and time when the client had suspected exposure to HIV */ -// TODO: Replace placeholder with relevant CQL logic define "Date/time of suspected exposure to HIV B.DE14": Elements."Date/time of suspected exposure to HIV B.DE14" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "Date/time of suspected exposure to HIV B.DE14 Value": - "Date/time of suspected exposure to HIV B.DE14" O - return O.value /* End of Date/time of suspected exposure to HIV B.DE14 */ /* @@ -255,8 +82,7 @@ define "Date/time of suspected exposure to HIV B.DE14 Value": */ define "Currently pregnant B.DE29": exists Elements."Currently pregnant B.DE29" C - where C.prevalenceInterval() starts on or before Today - or C.encounter.references(EncounterId) + where C.encounter.references(EncounterId) /* End of Currently pregnant B.DE29 */ /* @@ -264,13 +90,9 @@ define "Currently pregnant B.DE29": @activity: HIV.B6 Capture or update client history @description: The HIV status of the client's partner. */ -// TODO: Replace placeholder with relevant CQL logic -define "Partner HIV status reported": - exists "Partner HIV status reported Observation" define "Partner HIV status reported Observation": Elements."Partner HIV status reported Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Partner HIV status reported */ /* @@ -333,7 +155,10 @@ define "Unknown B.DE36 Observation": @description: Client is a member of a key population that has an increased risk of HIV */ define "Is Key population member B.DE49": - exists("Key population member type Observation") + exists( + "Key population member type Observation" O + where O.encounter.references(EncounterId) + ) /* End of Key population member B.DE49 */ /* @@ -414,7 +239,6 @@ define "HIV test conducted Observation": define "HIV test type B.DE81": Elements."HIV test type B.DE81" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today define "HIV test type B.DE81 Value": "HIV test type B.DE81" O return O.value @@ -428,7 +252,6 @@ define "HIV test type B.DE81 Value": define "Rapid diagnostic test for HIV B.DE82": Elements."Rapid diagnostic test for HIV B.DE82" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Rapid diagnostic test for HIV B.DE82 */ /* @@ -439,7 +262,6 @@ define "Rapid diagnostic test for HIV B.DE82": define "Enzyme immunoassay for HIV B.DE83": Elements."Enzyme immunoassay for HIV B.DE83" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Enzyme immunoassay for HIV B.DE83 */ /* @@ -451,7 +273,6 @@ define "Enzyme immunoassay for HIV B.DE83": define "Nucleic acid test for HIV B.DE84": Elements."Nucleic acid test for HIV B.DE84" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Nucleic acid test for HIV B.DE84 */ /* @@ -462,7 +283,6 @@ define "Nucleic acid test for HIV B.DE84": define "Dual HIV/syphilis rapid diagnostic test B.DE85": Elements."Dual HIV/syphilis rapid diagnostic test B.DE85" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Dual HIV/syphilis rapid diagnostic test B.DE85 */ /* @@ -474,7 +294,6 @@ define "Dual HIV/syphilis rapid diagnostic test B.DE85": define "HIV self-test": Elements."HIV self-test" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of HIV self-test */ /* @@ -482,13 +301,9 @@ define "HIV self-test": @activity: HIV.B7 Test for HIV using testing algorithm @description: The number of the assay (test kit) in the HIV testing strategy */ -// TODO: Replace placeholder with relevant CQL logic define "Assay number in testing strategy B.DE88": - exists "Assay number in testing strategy B.DE88 Observation" -define "Assay number in testing strategy B.DE88 Observation": Elements."Assay number in testing strategy B.DE88 Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Assay number in testing strategy B.DE88 */ /* @@ -515,12 +330,6 @@ define "Assay 0 B.DE89 Observation": @description: The first test in the HIV testing strategy */ // TODO: Replace placeholder with relevant CQL logic -define "Assay 1 B.DE90": - exists "Assay 1 B.DE90 Condition" - or exists "Assay 1 B.DE90 Observation" -define "Assay 1 B.DE90 Condition": - Elements."Assay 1 B.DE90 Condition" C - where C.prevalenceInterval() starts on or before Today define "Assay 1 B.DE90 Observation": Elements."Assay 1 B.DE90 Observation" O where O.encounter.references(EncounterId) @@ -533,12 +342,6 @@ define "Assay 1 B.DE90 Observation": @description: The second test in the HIV testing strategy */ // TODO: Replace placeholder with relevant CQL logic -define "Assay 2 B.DE91": - exists "Assay 2 B.DE91 Condition" - or exists "Assay 2 B.DE91 Observation" -define "Assay 2 B.DE91 Condition": - Elements."Assay 2 B.DE91 Condition" C - where C.prevalenceInterval() starts on or before Today define "Assay 2 B.DE91 Observation": Elements."Assay 2 B.DE91 Observation" O where O.encounter.references(EncounterId) @@ -551,12 +354,6 @@ define "Assay 2 B.DE91 Observation": @description: The third test in the HIV testing strategy */ // TODO: Replace placeholder with relevant CQL logic -define "Assay 3 B.DE92": - exists "Assay 3 B.DE92 Condition" - or exists "Assay 3 B.DE92 Observation" -define "Assay 3 B.DE92 Condition": - Elements."Assay 3 B.DE92 Condition" C - where C.prevalenceInterval() starts on or before Today define "Assay 3 B.DE92 Observation": Elements."Assay 3 B.DE92 Observation" O where O.encounter.references(EncounterId) @@ -586,149 +383,29 @@ define "Assay 1 repeated B.DE93 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: The result of the first HIV assay in the testing strategy */ -// TODO: Replace placeholder with relevant CQL logic define "Test result of HIV assay 1 B.DE94": - exists "Test result of HIV assay 1 B.DE94 Observation" -define "Test result of HIV assay 1 B.DE94 Observation": Elements."Test result of HIV assay 1 B.DE94 Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Test result of HIV assay 1 B.DE94 */ -/* -@dataElement: HIV.B.DE95 - Reactive -@activity: HIV.B7 Test for HIV using testing algorithm -@description: The result of the HIV assay in the testing strategy was reactive -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Reactive B.DE95": - exists "Reactive B.DE95 Condition" - or exists "Reactive B.DE95 Observation" -define "Reactive B.DE95 Condition": - Elements."Reactive B.DE95 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Reactive B.DE95 Observation": - Elements."Reactive B.DE95 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Reactive B.DE95 */ - -/* -@dataElement: HIV.B.DE96 - Non-reactive -@activity: HIV.B7 Test for HIV using testing algorithm -@description: The result of the HIV assay in the testing strategy was non-reactive -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Non-reactive B.DE96": - exists "Non-reactive B.DE96 Condition" - or exists "Non-reactive B.DE96 Observation" -define "Non-reactive B.DE96 Condition": - Elements."Non-reactive B.DE96 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Non-reactive B.DE96 Observation": - Elements."Non-reactive B.DE96 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Non-reactive B.DE96 */ - -/* -@dataElement: HIV.B.DE97 - Invalid -@activity: HIV.B7 Test for HIV using testing algorithm -@description: The result of the HIV assay in the testing strategy was invalid -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Invalid B.DE97": - exists "Invalid B.DE97 Condition" - or exists "Invalid B.DE97 Observation" -define "Invalid B.DE97 Condition": - Elements."Invalid B.DE97 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Invalid B.DE97 Observation": - Elements."Invalid B.DE97 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Invalid B.DE97 */ - /* @dataElement: HIV.B.DE98 - Test result of HIV assay 2 @activity: HIV.B7 Test for HIV using testing algorithm @description: The result of the second HIV assay in the testing strategy */ -// TODO: Replace placeholder with relevant CQL logic define "Test result of HIV assay 2 B.DE98": - exists "Test result of HIV assay 2 B.DE98 Observation" -define "Test result of HIV assay 2 B.DE98 Observation": Elements."Test result of HIV assay 2 B.DE98 Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Test result of HIV assay 2 B.DE98 */ -/* -@dataElement: HIV.B.DE99 - Reactive -@activity: HIV.B7 Test for HIV using testing algorithm -@description: The result of the HIV assay in the testing strategy was reactive -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Reactive B.DE99": - exists "Reactive B.DE99 Condition" - or exists "Reactive B.DE99 Observation" -define "Reactive B.DE99 Condition": - Elements."Reactive B.DE99 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Reactive B.DE99 Observation": - Elements."Reactive B.DE99 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Reactive B.DE99 */ - -/* -@dataElement: HIV.B.DE100 - Non-reactive -@activity: HIV.B7 Test for HIV using testing algorithm -@description: The result of the HIV assay in the testing strategy was non-reactive -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Non-reactive B.DE100": - exists "Non-reactive B.DE100 Condition" - or exists "Non-reactive B.DE100 Observation" -define "Non-reactive B.DE100 Condition": - Elements."Non-reactive B.DE100 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Non-reactive B.DE100 Observation": - Elements."Non-reactive B.DE100 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Non-reactive B.DE100 */ - -/* -@dataElement: HIV.B.DE101 - Invalid -@activity: HIV.B7 Test for HIV using testing algorithm -@description: The result of the HIV assay in the testing strategy was invalid -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Invalid B.DE101": - exists "Invalid B.DE101 Condition" - or exists "Invalid B.DE101 Observation" -define "Invalid B.DE101 Condition": - Elements."Invalid B.DE101 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Invalid B.DE101 Observation": - Elements."Invalid B.DE101 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Invalid B.DE101 */ - /* @dataElement: HIV.B.DE102 - Test result of HIV assay 3 @activity: HIV.B7 Test for HIV using testing algorithm @description: The result of the third HIV assay in the testing strategy */ -// TODO: Replace placeholder with relevant CQL logic define "Test result of HIV assay 3 B.DE102": - exists "Test result of HIV assay 3 B.DE102 Observation" -define "Test result of HIV assay 3 B.DE102 Observation": Elements."Test result of HIV assay 3 B.DE102 Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Test result of HIV assay 3 B.DE102 */ /* @@ -858,50 +535,11 @@ define "Invalid B.DE109 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: The result from HIV testing after applying the testing algorithm */ -define "HIV test result Observation": - Elements."HIV test result Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "HIV test result Value": +define "HIV test result": Elements."HIV test result Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today - return O.value /* End of HIV test result B.DE111 */ -/* -@dataElement: HIV.B.DE112 - HIV-positive -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Test result is HIV-positive -*/ -define "HIV-positive test result": - Elements."HIV-positive test result" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of HIV-positive B.DE112 */ - -/* -@dataElement: HIV.B.DE113 - HIV-negative -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Test result is HIV-negative -*/ -define "HIV-negative test result": - Elements."HIV-negative test result" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of HIV-negative B.DE113 */ - -/* -@dataElement: HIV.B.DE114 - HIV-inconclusive -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Test result is HIV-inconclusive -*/ -define "HIV-inconclusive test result": - Elements."HIV-inconclusive test result" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of HIV-inconclusive */ - /* @dataElement: HIV.B.DE115 - HIV status @activity: HIV.B7 Test for HIV using testing algorithm @@ -910,29 +548,8 @@ define "HIV-inconclusive test result": define "HIV Status Observation": Elements."HIV Status Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today - - // case - // when exists("HIV-positive Condition") or exists("HIV-positive Condition") then Concepts."HIV-positive - HIV.B.DE116" - // when not exists("HIV-positive Condition") and exists(Common."HIV Negative Observation") then Concepts."HIV-negative - HIV.B.DE117" - // else Concepts."Unknown - HIV.B.DE118" - // end /* End of HIV status */ -/* -@dataElement: HIV.B.DE116 - HIV-positive -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Client is HIV-positive -*/ -define "HIV Status Postitive Observation": - Elements."HIV Status Positive Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "HIV Status Positive Condition": - Elements."HIV Status Positive Condition" C - where C.prevalenceInterval() starts on or before Today -/* End of HIV-positive B.DE116 */ - /* @dataElement: HIV.B.DE141 - Partner virally suppressed on ART @activity: HIV.B6 Capture or update client history @@ -1863,137 +1480,21 @@ define "CAB-LA C.DE23 Observation": @activity: HIV.C3 Capture or update client history @description: The client's history in taking post-exposure prophylaxis (PEP) for HIV prevention */ -// TODO: Replace placeholder with relevant CQL logic define "PEP history": - exists "PEP history Observation" -define "PEP history Observation": - Elements."PEP history Observation" O + Elements."PEP history" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of PEP history */ -/* -@dataElement: HIV.C.DE32 - First-time user -@activity: HIV.C3 Capture or update client history -@description: The client has never used post-exposure prophylaxis (PEP) before -*/ -// TODO: Replace placeholder with relevant CQL logic -define "First-time user C.DE32": - exists "First-time user C.DE32 Condition" - or exists "First-time user C.DE32 Observation" -define "First-time user C.DE32 Condition": - Elements."First-time user C.DE32 Condition" C - where C.prevalenceInterval() starts on or before Today -define "First-time user C.DE32 Observation": - Elements."First-time user C.DE32 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of First-time user C.DE32 */ - -/* -@dataElement: HIV.C.DE33 - Repeat user -@activity: HIV.C3 Capture or update client history -@description: The client has used post-exposure prophylaxis (PEP) before -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Repeat user": - exists "Repeat user Condition" - or exists "Repeat user Observation" -define "Repeat user Condition": - Elements."Repeat user Condition" C - where C.prevalenceInterval() starts on or before Today -define "Repeat user Observation": - Elements."Repeat user Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Repeat user */ - /* @dataElement: HIV.C.DE36 - Signs of substantial risk of HIV infection @activity: HIV.C3 Capture or update client history @description: Signs the client is at a substantial risk of HIV infection */ -// TODO: Replace placeholder with relevant CQL logic define "Signs of substantial risk of HIV infection C.DE36": - exists "Signs of substantial risk of HIV infection C.DE36 Observation" -define "Signs of substantial risk of HIV infection C.DE36 Observation": - Elements."Signs of substantial risk of HIV infection C.DE36 Observation" O + Elements."Signs of substantial risk of HIV infection C.DE36" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Signs of substantial risk of HIV infection C.DE36 */ -/* -@dataElement: HIV.C.DE37 - No condom use during sex with more than one partner in the past 6 months -@activity: HIV.C3 Capture or update client history -@description: Recent vaginal or anal sexual intercourse without a condom with more than one partner -*/ -// TODO: Replace placeholder with relevant CQL logic -define "No condom use during sex with more than one partner in the past 6 months C.DE37": - exists "No condom use during sex with more than one partner in the past 6 months C.DE37 Condition" - or exists "No condom use during sex with more than one partner in the past 6 months C.DE37 Observation" -define "No condom use during sex with more than one partner in the past 6 months C.DE37 Condition": - Elements."No condom use during sex with more than one partner in the past 6 months C.DE37 Condition" C - where C.prevalenceInterval() starts on or before Today -define "No condom use during sex with more than one partner in the past 6 months C.DE37 Observation": - Elements."No condom use during sex with more than one partner in the past 6 months C.DE37 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of No condom use during sex with more than one partner in the past 6 months C.DE37 */ - -/* -@dataElement: HIV.C.DE38 - STI in the past 6 months -@activity: HIV.C3 Capture or update client history -@description: A recent history (in the last 6 months) of a sexually transmitted infection (STI ) by laboratory testing, self-report or syndromic STI treatment -*/ -// TODO: Replace placeholder with relevant CQL logic -define "STI in the past 6 months C.DE38": - exists "STI in the past 6 months C.DE38 Condition" - or exists "STI in the past 6 months C.DE38 Observation" -define "STI in the past 6 months C.DE38 Condition": - Elements."STI in the past 6 months C.DE38 Condition" C - where C.prevalenceInterval() starts on or before Today -define "STI in the past 6 months C.DE38 Observation": - Elements."STI in the past 6 months C.DE38 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of STI in the past 6 months C.DE38 */ - -/* -@dataElement: HIV.C.DE39 - A sexual partner in the past 6 months had one or more HIV risk factors -@activity: HIV.C3 Capture or update client history -@description: A recent sex partner of the client had HIV risk factors -*/ -// TODO: Replace placeholder with relevant CQL logic -define "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39": - exists "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Condition" - or exists "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Observation" -define "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Condition": - Elements."A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Condition" C - where C.prevalenceInterval() starts on or before Today -define "A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Observation": - Elements."A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of A sexual partner in the past 6 months had one or more HIV risk factors C.DE39 */ - -/* -@dataElement: HIV.C.DE40 - PrEP requested by client -@activity: HIV.C3 Capture or update client history -@description: Client is requesting PrEP, reflecting a decision-making process has already taken place and suggesting of substantial risk of HIV -*/ -// TODO: Replace placeholder with relevant CQL logic -define "PrEP requested by client C.DE40": - exists "PrEP requested by client C.DE40 Condition" - or exists "PrEP requested by client C.DE40 Observation" -define "PrEP requested by client C.DE40 Condition": - Elements."PrEP requested by client C.DE40 Condition" C - where C.prevalenceInterval() starts on or before Today -define "PrEP requested by client C.DE40 Observation": - Elements."PrEP requested by client C.DE40 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of PrEP requested by client C.DE40 */ - /* @dataElement: HIV.C.DE46 - Acute HIV infection symptoms @activity: HIV.C3 Capture or update client history @@ -2157,386 +1658,29 @@ define "Rash Observation": @activity: HIV.C3 Capture or update client history @description: Treatment adherence of client's sex partner for partners that are HIV-positive */ -// TODO: Replace placeholder with relevant CQL logic define "Sex partners HIV treatment status": - exists "Sex partners HIV treatment status Observation" -define "Sex partners HIV treatment status Observation": - Elements."Sex partners HIV treatment status Observation" O + Elements."Sex partners HIV treatment status" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Sex partners HIV treatment status */ /* -@dataElement: HIV.C.DE56 - Not on ART -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and not on ART +@dataElement: HIV.C.DE61 - Suitable for PrEP +@activity: HIV.C8 Suitable for PrEP or PEP? +@description: The client is suitable for PrEP */ -// TODO: Replace placeholder with relevant CQL logic -define "Not on ART": - exists "Not on ART Condition" - or exists "Not on ART Observation" -define "Not on ART Condition": - Elements."Not on ART Condition" C - where C.prevalenceInterval() starts on or before Today -define "Not on ART Observation": - Elements."Not on ART Observation" O +define "Suitable for PrEP": + Elements."Suitable for PrEP Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Not on ART */ +/* End of Suitable for PrEP */ /* -@dataElement: HIV.C.DE57 - On ART less than 6 months -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and is on ART less than 6 months. ART may take up to 6 months to suppress viral load. In studies of serodiscordant couples, pre-exposure prophylaxis (PrEP) has provided a useful bridge to full viral suppression by the partner during that time. +@dataElement: HIV.C.DE106 - Estimated creatinine clearance +@activity: HIV.C23 Prescribe or administer PrEP or PEP +@description: Estimated creatinine clearance of the client returned from lab in mL/min */ -// TODO: Replace placeholder with relevant CQL logic -define "On ART less than 6 months": - exists "On ART less than 6 months Condition" - or exists "On ART less than 6 months Observation" -define "On ART less than 6 months Condition": - Elements."On ART less than 6 months Condition" C - where C.prevalenceInterval() starts on or before Today -define "On ART less than 6 months Observation": - Elements."On ART less than 6 months Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of On ART less than 6 months */ - -/* -@dataElement: HIV.C.DE58 - Partner has suspected low adherence to ART -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and is suspected to have low adherence to ART. There have been gaps in the partner's treatment adherence or the couple is not communicating openly about treatment adherence and viral load test results. -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Partner has suspected low adherence to ART": - exists "Partner has suspected low adherence to ART Condition" - or exists "Partner has suspected low adherence to ART Observation" -define "Partner has suspected low adherence to ART Condition": - Elements."Partner has suspected low adherence to ART Condition" C - where C.prevalenceInterval() starts on or before Today -define "Partner has suspected low adherence to ART Observation": - Elements."Partner has suspected low adherence to ART Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Partner has suspected low adherence to ART */ - -/* -@dataElement: HIV.C.DE59 - Partner is not virally suppressed -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and not virally suppressed -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Partner is not virally suppressed": - exists "Partner is not virally suppressed Condition" - or exists "Partner is not virally suppressed Observation" -define "Partner is not virally suppressed Condition": - Elements."Partner is not virally suppressed Condition" C - where C.prevalenceInterval() starts on or before Today -define "Partner is not virally suppressed Observation": - Elements."Partner is not virally suppressed Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Partner is not virally suppressed */ - -/* -@dataElement: HIV.C.DE60 - Partner is virally suppressed and has been on ART for 6 months or more -@activity: HIV.C3 Capture or update client history -@description: Sex partner is HIV-positive and virally suppressed with 6 months or more on ART -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Partner is virally suppressed and has been on ART for 6 months or more": - exists "Partner is virally suppressed and has been on ART for 6 months or more Condition" - or exists "Partner is virally suppressed and has been on ART for 6 months or more Observation" -define "Partner is virally suppressed and has been on ART for 6 months or more Condition": - Elements."Partner is virally suppressed and has been on ART for 6 months or more Condition" C - where C.prevalenceInterval() starts on or before Today -define "Partner is virally suppressed and has been on ART for 6 months or more Observation": - Elements."Partner is virally suppressed and has been on ART for 6 months or more Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Partner is virally suppressed and has been on ART for 6 months or more */ - -/* -@dataElement: HIV.C.DE61 - Suitable for PrEP -@activity: HIV.C8 Suitable for PrEP or PEP? -@description: The client is suitable for PrEP -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Suitable for PrEP": - exists "Suitable for PrEP Observation" -define "Suitable for PrEP Observation": - Elements."Suitable for PrEP Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Suitable for PrEP */ - -/* -@dataElement: HIV.C.DE91 - Preferred PEP backbone regimen -@activity: HIV.C23 Prescribe or administer PrEP or PEP -@description: Preferred backbone regimen for PEP -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Preferred PEP backbone regimen": - exists "Preferred PEP backbone regimen Observation" -define "Preferred PEP backbone regimen Observation": - Elements."Preferred PEP backbone regimen Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Preferred PEP backbone regimen */ - -/* -@dataElement: HIV.C.DE92 - TDF + 3TC -@activity: HIV.C23 Prescribe or administer PrEP or PEP -@description: Preferred backbone containing tenofovir disoproxil fumarate and lamivudine -*/ -// TODO: Replace placeholder with relevant CQL logic -define "TDF + 3TC C.DE92": - exists "TDF + 3TC C.DE92 Condition" - or exists "TDF + 3TC C.DE92 Observation" -define "TDF + 3TC C.DE92 Condition": - Elements."TDF + 3TC C.DE92 Condition" C - where C.prevalenceInterval() starts on or before Today -define "TDF + 3TC C.DE92 Observation": - Elements."TDF + 3TC C.DE92 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of TDF + 3TC C.DE92 */ - -/* -@dataElement: HIV.C.DE93 - TDF + FTC -@activity: HIV.C23 Prescribe or administer PrEP or PEP -@description: Preferred backbone containing tenofovir disoproxil fumarate and emtricitabine -*/ -// TODO: Replace placeholder with relevant CQL logic -define "TDF + FTC C.DE93": - exists "TDF + FTC C.DE93 Condition" - or exists "TDF + FTC C.DE93 Observation" -define "TDF + FTC C.DE93 Condition": - Elements."TDF + FTC C.DE93 Condition" C - where C.prevalenceInterval() starts on or before Today -define "TDF + FTC C.DE93 Observation": - Elements."TDF + FTC C.DE93 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of TDF + FTC C.DE93 */ - -/* -@dataElement: HIV.C.DE94 - AZT + 3TC -@activity: HIV.C23 Prescribe or administer PrEP or PEP -@description: Preferred backbone containing zidovudine and lamivudine -*/ -// TODO: Replace placeholder with relevant CQL logic -define "AZT + 3TC": - exists "AZT + 3TC Condition" - or exists "AZT + 3TC Observation" -define "AZT + 3TC Condition": - Elements."AZT + 3TC Condition" C - where C.prevalenceInterval() starts on or before Today -define "AZT + 3TC Observation": - Elements."AZT + 3TC Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of AZT + 3TC */ - -/* -@dataElement: HIV.C.DE95 - Alternative PEP backbone regimen -@activity: HIV.C3 Capture or update client history -@description: Alternative backbone regimen for PEP -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Alternative PEP backbone regimen": - exists "Alternative PEP backbone regimen Observation" -define "Alternative PEP backbone regimen Observation": - Elements."Alternative PEP backbone regimen Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Alternative PEP backbone regimen */ - -/* -@dataElement: HIV.C.DE96 - ABC + 3TC -@activity: HIV.C3 Capture or update client history -@description: Alternative backbone containing abacavir and lamivudine -*/ -// TODO: Replace placeholder with relevant CQL logic -define "ABC + 3TC": - exists "ABC + 3TC Condition" - or exists "ABC + 3TC Observation" -define "ABC + 3TC Condition": - Elements."ABC + 3TC Condition" C - where C.prevalenceInterval() starts on or before Today -define "ABC + 3TC Observation": - Elements."ABC + 3TC Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of ABC + 3TC */ - -/* -@dataElement: HIV.C.DE97 - TDF + 3TC -@activity: HIV.C3 Capture or update client history -@description: Alternative backbone containing tenofovir disoproxil fumarate and lamivudine -*/ -// TODO: Replace placeholder with relevant CQL logic -define "TDF + 3TC C.DE97": - exists "TDF + 3TC C.DE97 Condition" - or exists "TDF + 3TC C.DE97 Observation" -define "TDF + 3TC C.DE97 Condition": - Elements."TDF + 3TC C.DE97 Condition" C - where C.prevalenceInterval() starts on or before Today -define "TDF + 3TC C.DE97 Observation": - Elements."TDF + 3TC C.DE97 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of TDF + 3TC C.DE97 */ - -/* -@dataElement: HIV.C.DE98 - TDF + FTC -@activity: HIV.C3 Capture or update client history -@description: Alternative backbone containing tenofovir disoproxil fumarate and emtricitabine -*/ -// TODO: Replace placeholder with relevant CQL logic -define "TDF + FTC C.DE98": - exists "TDF + FTC C.DE98 Condition" - or exists "TDF + FTC C.DE98 Observation" -define "TDF + FTC C.DE98 Condition": - Elements."TDF + FTC C.DE98 Condition" C - where C.prevalenceInterval() starts on or before Today -define "TDF + FTC C.DE98 Observation": - Elements."TDF + FTC C.DE98 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of TDF + FTC C.DE98 */ - -/* -@dataElement: HIV.C.DE99 - Preferred third PEP drug -@activity: HIV.C23 Prescribe or administer PrEP or PEP -@description: Preferred third drug for PEP -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Preferred third PEP drug": - exists "Preferred third PEP drug Observation" -define "Preferred third PEP drug Observation": - Elements."Preferred third PEP drug Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Preferred third PEP drug */ - -/* -@dataElement: HIV.C.DE100 - DTG -@activity: HIV.C23 Prescribe or administer PrEP or PEP -@description: Preferred third drug of dolutegravir -*/ -// TODO: Replace placeholder with relevant CQL logic -define "DTG C.DE100": - exists "DTG C.DE100 Condition" - or exists "DTG C.DE100 Observation" -define "DTG C.DE100 Condition": - Elements."DTG C.DE100 Condition" C - where C.prevalenceInterval() starts on or before Today -define "DTG C.DE100 Observation": - Elements."DTG C.DE100 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of DTG C.DE100 */ - -/* -@dataElement: HIV.C.DE101 - Alternative third PEP drug -@activity: HIV.C3 Capture or update client history -@description: Alternative third drug for PEP -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Alternative third PEP drug": - exists "Alternative third PEP drug Observation" -define "Alternative third PEP drug Observation": - Elements."Alternative third PEP drug Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Alternative third PEP drug */ - -/* -@dataElement: HIV.C.DE102 - ATV/r -@activity: HIV.C3 Capture or update client history -@description: Alternative third drug of atazanavir/ritonavir (ATV/r) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "ATV/r C.DE102": - exists "ATV/r C.DE102 Condition" - or exists "ATV/r C.DE102 Observation" -define "ATV/r C.DE102 Condition": - Elements."ATV/r C.DE102 Condition" C - where C.prevalenceInterval() starts on or before Today -define "ATV/r C.DE102 Observation": - Elements."ATV/r C.DE102 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of ATV/r C.DE102 */ - -/* -@dataElement: HIV.C.DE103 - DRV/r -@activity: HIV.C3 Capture or update client history -@description: Alternative third drug of darunavir/ritonavir (DRV/r) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "DRV/r C.DE103": - exists "DRV/r C.DE103 Condition" - or exists "DRV/r C.DE103 Observation" -define "DRV/r C.DE103 Condition": - Elements."DRV/r C.DE103 Condition" C - where C.prevalenceInterval() starts on or before Today -define "DRV/r C.DE103 Observation": - Elements."DRV/r C.DE103 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of DRV/r C.DE103 */ - -/* -@dataElement: HIV.C.DE104 - LPV/r -@activity: HIV.C3 Capture or update client history -@description: Alternative third drug of lopinavir/ritonavir (LPV/r) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "LPV/r C.DE104": - exists "LPV/r C.DE104 Condition" - or exists "LPV/r C.DE104 Observation" -define "LPV/r C.DE104 Condition": - Elements."LPV/r C.DE104 Condition" C - where C.prevalenceInterval() starts on or before Today -define "LPV/r C.DE104 Observation": - Elements."LPV/r C.DE104 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of LPV/r C.DE104 */ - -/* -@dataElement: HIV.C.DE105 - RAL -@activity: HIV.C3 Capture or update client history -@description: Alternative third drug of raltegravir (RAL) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "RAL C.DE105": - exists "RAL C.DE105 Condition" - or exists "RAL C.DE105 Observation" -define "RAL C.DE105 Condition": - Elements."RAL C.DE105 Condition" C - where C.prevalenceInterval() starts on or before Today -define "RAL C.DE105 Observation": - Elements."RAL C.DE105 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of RAL C.DE105 */ - -/* -@dataElement: HIV.C.DE106 - Estimated creatinine clearance -@activity: HIV.C23 Prescribe or administer PrEP or PEP -@description: Estimated creatinine clearance of the client returned from lab in mL/min -*/ -// TODO: Replace placeholder with relevant CQL logic define "Estimated creatinine clearance": Elements."Estimated creatinine clearance" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "Estimated creatinine clearance Value": - "Estimated creatinine clearance" O - return O.value /* End of Estimated creatinine clearance */ /* @@ -2544,13 +1688,9 @@ define "Estimated creatinine clearance Value": @activity: HIV.C23 Prescribe or administer PrEP or PEP @description: Listing of contraindications to pre-exposure prophylaxis (PrEP) */ -// TODO: Replace placeholder with relevant CQL logic define "Contraindications to PrEP usage": - exists "Contraindications to PrEP usage Observation" -define "Contraindications to PrEP usage Observation": Elements."Contraindications to PrEP usage Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Contraindications to PrEP usage */ /* @@ -2607,24 +1747,6 @@ define "Low estimated creatinine clearance Observation": or O.effective.toInterval() starts on or before Today /* End of Low estimated creatinine clearance */ -/* -@dataElement: HIV.C.DE116 - Acute HIV infection symptoms -@activity: HIV.C23 Prescribe or administer PrEP or PEP -@description: Symptoms that could suggest an acute HIV infection -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Acute HIV infection symptoms C.DE116": - exists "Acute HIV infection symptoms C.DE116 Condition" - or exists "Acute HIV infection symptoms C.DE116 Observation" -define "Acute HIV infection symptoms C.DE116 Condition": - Elements."Acute HIV infection symptoms C.DE116 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Acute HIV infection symptoms C.DE116 Observation": - Elements."Acute HIV infection symptoms C.DE116 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Acute HIV infection symptoms C.DE116 */ - /* @dataElement: HIV.C.DE117 - Probable recent exposure to HIV @activity: HIV.C23 Prescribe or administer PrEP or PEP @@ -2632,15 +1754,8 @@ define "Acute HIV infection symptoms C.DE116 Observation": */ // TODO: Replace placeholder with relevant CQL logic define "Probable recent exposure to HIV": - exists "Probable recent exposure to HIV Condition" - or exists "Probable recent exposure to HIV Observation" -define "Probable recent exposure to HIV Condition": - Elements."Probable recent exposure to HIV Condition" C - where C.prevalenceInterval() starts on or before Today -define "Probable recent exposure to HIV Observation": - Elements."Probable recent exposure to HIV Observation" O + Elements."Probable recent exposure to HIV" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Probable recent exposure to HIV */ /* @@ -3215,123 +2330,11 @@ define "Services for responding to violence against women C.DE169 Observation": @activity: HIV.D1 Determine reason for visit @description: Whether visit was scheduled or unscheduled, clinical only, or for ARV drug pick-up */ -// TODO: Replace placeholder with relevant CQL logic define "Reason for visit D.DE1": - exists "Reason for visit D.DE1 Observation" -define "Reason for visit D.DE1 Observation": - Elements."Reason for visit D.DE1 Observation" O + Elements."Reason for visit D.DE1" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Reason for visit D.DE1 */ -/* -@dataElement: HIV.D.DE2 - First clinical visit -@activity: HIV.D1 Determine reason for visit -@description: The client's first appointment for clinical care by a provider at the facility -*/ -// TODO: Replace placeholder with relevant CQL logic -define "First clinical visit": - exists "First clinical visit Condition" - or exists "First clinical visit Observation" -define "First clinical visit Condition": - Elements."First clinical visit Condition" C - where C.prevalenceInterval() starts on or before Today -define "First clinical visit Observation": - Elements."First clinical visit Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of First clinical visit */ - -/* -@dataElement: HIV.D.DE3 - Clinical visit -@activity: HIV.D1 Determine reason for visit -@description: Appointment for clinical care by a provider -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Clinical visit D.DE3": - exists "Clinical visit D.DE3 Condition" - or exists "Clinical visit D.DE3 Observation" -define "Clinical visit D.DE3 Condition": - Elements."Clinical visit D.DE3 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Clinical visit D.DE3 Observation": - Elements."Clinical visit D.DE3 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Clinical visit D.DE3 */ - -/* -@dataElement: HIV.D.DE4 - ART initiation -@activity: HIV.D1 Determine reason for visit -@description: Appointment for initiation of ART -*/ -// TODO: Replace placeholder with relevant CQL logic -define "ART initiation": - exists "ART initiation Condition" - or exists "ART initiation Observation" -define "ART initiation Condition": - Elements."ART initiation Condition" C - where C.prevalenceInterval() starts on or before Today -define "ART initiation Observation": - Elements."ART initiation Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of ART initiation */ - -/* -@dataElement: HIV.D.DE5 - ART drug pick up -@activity: HIV.D1 Determine reason for visit -@description: Appointment for an antiretroviral drug pick up -*/ -// TODO: Replace placeholder with relevant CQL logic -define "ART drug pick up": - exists "ART drug pick up Condition" - or exists "ART drug pick up Observation" -define "ART drug pick up Condition": - Elements."ART drug pick up Condition" C - where C.prevalenceInterval() starts on or before Today -define "ART drug pick up Observation": - Elements."ART drug pick up Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of ART drug pick up */ - -/* -@dataElement: HIV.D.DE6 - Issues and concerns -@activity: HIV.D1 Determine reason for visit -@description: Visit to address issues and concerns -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Issues and concerns": - exists "Issues and concerns Condition" - or exists "Issues and concerns Observation" -define "Issues and concerns Condition": - Elements."Issues and concerns Condition" C - where C.prevalenceInterval() starts on or before Today -define "Issues and concerns Observation": - Elements."Issues and concerns Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Issues and concerns */ - -/* -@dataElement: HIV.D.DE7 - Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer -@activity: HIV.D1 Determine reason for visit -@description: Appointment for a post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7": - exists "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Condition" - or exists "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Observation" -define "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Condition": - Elements."Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Observation": - Elements."Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Post-treatment follow-up visit for cervical precancer lesions or invasive cervical cancer D.DE7 */ - /* @dataElement: HIV.D.DE9 - Body temperature @activity: HIV.D2 Take vital signs @@ -3624,10 +2627,9 @@ define "Serodiscordant partner D.DE37 Observation": @activity: HIV.D8 Capture or update client history @description: Client is currently taking ART */ -// TODO: Replace placeholder with relevant CQL logic define "On ART D.DE38": Elements."On ART D.DE38" MS - where MS.effective.toInterval() starts on or before Today + where MS.context.references(EncounterId) /* End of On ART D.DE38 */ /* @@ -4369,1570 +3371,337 @@ define "Prevention of mother-to-child transmission Observation": @description: Offer STI testing and treatment services */ // TODO: Replace placeholder with relevant CQL logic -define "STI testing and treatment D.DE160": - exists "STI testing and treatment D.DE160 Condition" - or exists "STI testing and treatment D.DE160 Observation" -define "STI testing and treatment D.DE160 Condition": - Elements."STI testing and treatment D.DE160 Condition" C - where C.prevalenceInterval() starts on or before Today -define "STI testing and treatment D.DE160 Observation": - Elements."STI testing and treatment D.DE160 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of STI testing and treatment D.DE160 */ - -/* -@dataElement: HIV.D.DE162 - HBsAg test result -@activity: HIV.D12 Determine recommended screenings and tests -@description: Hepatitis B virus test result (HBsAg) -*/ -define "HBsAg test result D.DE162": - Elements."HBsAg test result D.DE162" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of HBsAg test result D.DE162 */ - -/* -@dataElement: HIV.D.DE163 - Positive -@activity: HIV.D12 Determine recommended screenings and tests -@description: HBsAg test result was positive -*/ -define "Positive D.DE163": - Elements."Positive D.DE163" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Positive D.DE163 */ - -/* -@dataElement: HIV.D.DE164 - Negative -@activity: HIV.D12 Determine recommended screenings and tests -@description: HBsAg test result was negative -*/ -define "Negative D.DE164": - Elements."Negative D.DE164" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Negative D.DE164 */ - -/* -@dataElement: HIV.D.DE165 - Indeterminate -@activity: HIV.D12 Determine recommended screenings and tests -@description: HBsAg test result was indeterminate -*/ -define "Indeterminate D.DE165": - Elements."Indeterminate D.DE165" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Indeterminate D.DE165 */ - -/* -@dataElement: HIV.D.DE170 - HCV test result -@activity: HIV.D12 Determine recommended screenings and tests -@description: Hepatitis C virus test result (HCV antibody, HCV RNA or HCV core antigen) -*/ -define "HCV test result D.DE170": - Elements."HCV test result D.DE170" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of HCV test result D.DE170 */ - -/* -@dataElement: HIV.D.DE171 - Positive -@activity: HIV.D12 Determine recommended screenings and tests -@description: HCV test result was positive -*/ -define "Positive D.DE171 Observation": - Elements."Positive D.DE171" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Positive D.DE171 */ - -/* -@dataElement: HIV.D.DE172 - Negative -@activity: HIV.D12 Determine recommended screenings and tests -@description: HCV test result was negative -*/ -define "Negative D.DE172": - Elements."Negative D.DE172" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Negative D.DE172 */ - -/* -@dataElement: HIV.D.DE173 - Indeterminate -@activity: HIV.D12 Determine recommended screenings and tests -@description: HCV test result was indeterminate -*/ -define "Indeterminate D.DE173": - Elements."Indeterminate D.DE173" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Indeterminate D.DE173 */ - -/* -@dataElement: HIV.D.DE186 - HIV clinical stage -@activity: HIV.D8 Capture or update client history -@description: WHO clinical stage of client based on signs and symptoms. WHO clinical staging is a way to categorize HIV disease severity based on new or recurrent clinical events. There are 4 WHO clinical stages that range from mild symptoms (WHO clinical stage 1) to severe symptoms (WHO clinical stage 4). -*/ -// TODO: Replace placeholder with relevant CQL logic -define "HIV clinical stage D.DE186": - exists "HIV clinical stage D.DE186 Observation" -define "HIV clinical stage D.DE186 Observation": - Elements."HIV clinical stage D.DE186 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of HIV clinical stage D.DE186 */ - -/* -@dataElement: HIV.D.DE187 - WHO HIV clinical stage 1 -@activity: HIV.D8 Capture or update client history -@description: Client is currently assessed to be at a clinical stage 1, based on clinical assessment and diagnostics -*/ -// TODO: Replace placeholder with relevant CQL logic -define "WHO HIV clinical stage 1": - exists "WHO HIV clinical stage 1 Condition" - or exists "WHO HIV clinical stage 1 Observation" -define "WHO HIV clinical stage 1 Condition": - Elements."WHO HIV clinical stage 1 Condition" C - where C.prevalenceInterval() starts on or before Today -define "WHO HIV clinical stage 1 Observation": - Elements."WHO HIV clinical stage 1 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of WHO HIV clinical stage 1 */ - -/* -@dataElement: HIV.D.DE188 - WHO HIV clinical stage 2 -@activity: HIV.D8 Capture or update client history -@description: Client is currently assessed to be at a clinical stage 2, based on clinical assessment and diagnostics -*/ -// TODO: Replace placeholder with relevant CQL logic -define "WHO HIV clinical stage 2": - exists "WHO HIV clinical stage 2 Condition" - or exists "WHO HIV clinical stage 2 Observation" -define "WHO HIV clinical stage 2 Condition": - Elements."WHO HIV clinical stage 2 Condition" C - where C.prevalenceInterval() starts on or before Today -define "WHO HIV clinical stage 2 Observation": - Elements."WHO HIV clinical stage 2 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of WHO HIV clinical stage 2 */ - -/* -@dataElement: HIV.D.DE189 - WHO HIV clinical stage 3 -@activity: HIV.D8 Capture or update client history -@description: Client is currently assessed to be at a clinical stage 3, based on clinical assessment and diagnostics -*/ -// TODO: Replace placeholder with relevant CQL logic -define "WHO HIV clinical stage 3": - exists "WHO HIV clinical stage 3 Condition" - or exists "WHO HIV clinical stage 3 Observation" -define "WHO HIV clinical stage 3 Condition": - Elements."WHO HIV clinical stage 3 Condition" C - where C.prevalenceInterval() starts on or before Today -define "WHO HIV clinical stage 3 Observation": - Elements."WHO HIV clinical stage 3 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of WHO HIV clinical stage 3 */ - -/* -@dataElement: HIV.D.DE190 - WHO HIV clinical stage 4 -@activity: HIV.D8 Capture or update client history -@description: Client is currently assessed to be at a clinical stage 4, based on clinical assessment and diagnostics -*/ -// TODO: Replace placeholder with relevant CQL logic -define "WHO HIV clinical stage 4": - exists "WHO HIV clinical stage 4 Condition" - or exists "WHO HIV clinical stage 4 Observation" -define "WHO HIV clinical stage 4 Condition": - Elements."WHO HIV clinical stage 4 Condition" C - where C.prevalenceInterval() starts on or before Today -define "WHO HIV clinical stage 4 Observation": - Elements."WHO HIV clinical stage 4 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of WHO HIV clinical stage 4 */ - -/* -@dataElement: HIV.D.DE194 - Date of viral load sample collection -@activity: HIV.D10 Counsel returning client -@description: Date and time when the sample was collected to test the client's HIV viral load -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Date of viral load sample collection D.DE194": - Elements."Date of viral load sample collection D.DE194" P - where P.encounter.references(EncounterId) - or P.performed.toInterval() starts on or before Today -/* End of Date of viral load sample collection D.DE194 */ - -/* -@dataElement: HIV.D.DE195 - Date of scheduled review of viral load test results -@activity: HIV.D10 Counsel returning client -@description: Expected date when client's viral load test results will be returned and reviewed -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Date of scheduled review of viral load test results": - Elements."Date of scheduled review of viral load test results" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "Date of scheduled review of viral load test results Value": - "Date of scheduled review of viral load test results" O - return O.value -/* End of Date of scheduled review of viral load test results */ - -/* -@dataElement: HIV.D.DE225 - Treatment failure -@activity: HIV.D17 Check for signs of treatment failure -@description: ART treatment failure -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Treatment failure": - exists "Treatment failure Observation" -define "Treatment failure Observation": - Elements."Treatment failure Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Treatment failure */ - -/* -@dataElement: HIV.D.DE226 - Clinical failure -@activity: HIV.D17 Check for signs of treatment failure -@description: New or recurrent clinical event indicating severe immunodeficiency in adults or advanced or severe immunodeficiency in children -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Clinical failure": - exists "Clinical failure Condition" - or exists "Clinical failure Observation" -define "Clinical failure Condition": - Elements."Clinical failure Condition" C - where C.prevalenceInterval() starts on or before Today -define "Clinical failure Observation": - Elements."Clinical failure Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Clinical failure */ - -/* -@dataElement: HIV.D.DE227 - Immunological failure -@activity: HIV.D17 Check for signs of treatment failure -@description: CD4 count at or below 250 cells/mm3 following clinical failure -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Immunological failure": - exists "Immunological failure Condition" - or exists "Immunological failure Observation" -define "Immunological failure Condition": - Elements."Immunological failure Condition" C - where C.prevalenceInterval() starts on or before Today -define "Immunological failure Observation": - Elements."Immunological failure Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Immunological failure */ - -/* -@dataElement: HIV.D.DE228 - Virological failure -@activity: HIV.D17 Check for signs of treatment failure -@description: The inability to achieve or maintain viral suppression below a certain threshold indicated by viral load above 1000 copies/mL based on two consecutive viral load measurements in 3 months, with adherence support following the first viral load test -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Virological failure": - exists "Virological failure Condition" - or exists "Virological failure Observation" -define "Virological failure Condition": - Elements."Virological failure Condition" C - where C.prevalenceInterval() starts on or before Today -define "Virological failure Observation": - Elements."Virological failure Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Virological failure */ - -/* -@dataElement: HIV.D.DE259 - Risk factors, comorbidities and coinfections signs and symptoms -@activity: HIV.D14 Prevent, screen, and manage comorbidities and coinfections -@description: Signs and symptoms of opportunistic infections or other comorbidities experienced by client -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Risk factors, comorbidities and coinfections signs and symptoms": - exists "Risk factors, comorbidities and coinfections signs and symptoms Observation" -define "Risk factors, comorbidities and coinfections signs and symptoms Observation": - Elements."Risk factors, comorbidities and coinfections signs and symptoms Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Risk factors, comorbidities and coinfections signs and symptoms */ - -/* -@dataElement: HIV.D.DE282 - Presumptive TB -@activity: HIV.D14 Prevent, screen, and manage comorbidities and coinfections -@description: Client's comorbidities or coinfections or symptoms of these include presumptive TB -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Presumptive TB D.DE282": - exists "Presumptive TB D.DE282 Condition" - or exists "Presumptive TB D.DE282 Observation" -define "Presumptive TB D.DE282 Condition": - Elements."Presumptive TB D.DE282 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Presumptive TB D.DE282 Observation": - Elements."Presumptive TB D.DE282 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Presumptive TB D.DE282 */ - -/* -@dataElement: HIV.D.DE289 - WHO HIV clinical stage condition or symptom -@activity: HIV.D15 Determine clinical stage of HIV -@description: New or recurrent clinical events used to categorize HIV disease severity based at baseline and follow up -*/ -// TODO: Replace placeholder with relevant CQL logic -define "WHO HIV clinical stage condition or symptom D.DE289": - exists "WHO HIV clinical stage condition or symptom D.DE289 Observation" -define "WHO HIV clinical stage condition or symptom D.DE289 Observation": - Elements."WHO HIV clinical stage condition or symptom D.DE289 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of WHO HIV clinical stage condition or symptom D.DE289 */ - -/* -@dataElement: HIV.D.DE290 - Asymptomatic -@activity: HIV.D15 Determine clinical stage of HIV -@description: No HIV-related symptoms reported and no clinical signs on examination -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Asymptomatic": - exists "Asymptomatic Condition" - or exists "Asymptomatic Observation" -define "Asymptomatic Condition": - Elements."Asymptomatic Condition" C - where C.prevalenceInterval() starts on or before Today -define "Asymptomatic Observation": - Elements."Asymptomatic Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Asymptomatic */ - -/* -@dataElement: HIV.D.DE291 - Persistent generalized lymphadenopathy -@activity: HIV.D15 Determine clinical stage of HIV -@description: Persistent enlarged lymph nodes >1 cm at two or more non-contiguous sites (excluding inguinal) without known cause -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Persistent generalized lymphadenopathy": - exists "Persistent generalized lymphadenopathy Condition" - or exists "Persistent generalized lymphadenopathy Observation" -define "Persistent generalized lymphadenopathy Condition": - Elements."Persistent generalized lymphadenopathy Condition" C - where C.prevalenceInterval() starts on or before Today -define "Persistent generalized lymphadenopathy Observation": - Elements."Persistent generalized lymphadenopathy Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Persistent generalized lymphadenopathy */ - -/* -@dataElement: HIV.D.DE292 - Moderate unexplained weight loss -@activity: HIV.D15 Determine clinical stage of HIV -@description: Moderate unexplained weight loss (<10% of presumed or measured body weight) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Moderate unexplained weight loss": - exists "Moderate unexplained weight loss Condition" - or exists "Moderate unexplained weight loss Observation" -define "Moderate unexplained weight loss Condition": - Elements."Moderate unexplained weight loss Condition" C - where C.prevalenceInterval() starts on or before Today -define "Moderate unexplained weight loss Observation": - Elements."Moderate unexplained weight loss Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Moderate unexplained weight loss */ - -/* -@dataElement: HIV.D.DE293 - Recurrent respiratory tract infections -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include recurrent respiratory tract infections including sinusitis, tonsillitis, otitis media or pharyngitis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Recurrent respiratory tract infections": - exists "Recurrent respiratory tract infections Condition" - or exists "Recurrent respiratory tract infections Observation" -define "Recurrent respiratory tract infections Condition": - Elements."Recurrent respiratory tract infections Condition" C - where C.prevalenceInterval() starts on or before Today -define "Recurrent respiratory tract infections Observation": - Elements."Recurrent respiratory tract infections Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Recurrent respiratory tract infections */ - -/* -@dataElement: HIV.D.DE294 - Unexplained persistent hepatosplenomegaly -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include unexplained persistent hepatosplenomegaly -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained persistent hepatosplenomegaly": - exists "Unexplained persistent hepatosplenomegaly Condition" - or exists "Unexplained persistent hepatosplenomegaly Observation" -define "Unexplained persistent hepatosplenomegaly Condition": - Elements."Unexplained persistent hepatosplenomegaly Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained persistent hepatosplenomegaly Observation": - Elements."Unexplained persistent hepatosplenomegaly Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained persistent hepatosplenomegaly */ - -/* -@dataElement: HIV.D.DE295 - Herpes zoster -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include herpes zoster -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Herpes zoster": - exists "Herpes zoster Condition" - or exists "Herpes zoster Observation" -define "Herpes zoster Condition": - Elements."Herpes zoster Condition" C - where C.prevalenceInterval() starts on or before Today -define "Herpes zoster Observation": - Elements."Herpes zoster Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Herpes zoster */ - -/* -@dataElement: HIV.D.DE296 - Angular cheilitis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include angular cheilitis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Angular cheilitis": - exists "Angular cheilitis Condition" - or exists "Angular cheilitis Observation" -define "Angular cheilitis Condition": - Elements."Angular cheilitis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Angular cheilitis Observation": - Elements."Angular cheilitis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Angular cheilitis */ - -/* -@dataElement: HIV.D.DE297 - Linear gingival erythema -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include linear gingival erythema -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Linear gingival erythema": - exists "Linear gingival erythema Condition" - or exists "Linear gingival erythema Observation" -define "Linear gingival erythema Condition": - Elements."Linear gingival erythema Condition" C - where C.prevalenceInterval() starts on or before Today -define "Linear gingival erythema Observation": - Elements."Linear gingival erythema Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Linear gingival erythema */ - -/* -@dataElement: HIV.D.DE298 - Recurrent oral ulceration -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include recurrent oral ulceration -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Recurrent oral ulceration": - exists "Recurrent oral ulceration Condition" - or exists "Recurrent oral ulceration Observation" -define "Recurrent oral ulceration Condition": - Elements."Recurrent oral ulceration Condition" C - where C.prevalenceInterval() starts on or before Today -define "Recurrent oral ulceration Observation": - Elements."Recurrent oral ulceration Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Recurrent oral ulceration */ - -/* -@dataElement: HIV.D.DE299 - Papular pruritic eruption -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include papular pruritic eruption -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Papular pruritic eruption": - exists "Papular pruritic eruption Condition" - or exists "Papular pruritic eruption Observation" -define "Papular pruritic eruption Condition": - Elements."Papular pruritic eruption Condition" C - where C.prevalenceInterval() starts on or before Today -define "Papular pruritic eruption Observation": - Elements."Papular pruritic eruption Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Papular pruritic eruption */ - -/* -@dataElement: HIV.D.DE300 - Fungal nail infections -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include fungal nail infections -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Fungal nail infections": - exists "Fungal nail infections Condition" - or exists "Fungal nail infections Observation" -define "Fungal nail infections Condition": - Elements."Fungal nail infections Condition" C - where C.prevalenceInterval() starts on or before Today -define "Fungal nail infections Observation": - Elements."Fungal nail infections Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Fungal nail infections */ - -/* -@dataElement: HIV.D.DE301 - Seborrhoeic dermatitis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include seborrhoeic dermatitis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Seborrhoeic dermatitis": - exists "Seborrhoeic dermatitis Condition" - or exists "Seborrhoeic dermatitis Observation" -define "Seborrhoeic dermatitis Condition": - Elements."Seborrhoeic dermatitis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Seborrhoeic dermatitis Observation": - Elements."Seborrhoeic dermatitis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Seborrhoeic dermatitis */ - -/* -@dataElement: HIV.D.DE302 - Extensive wart virus infection -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include extensive wart virus infection -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Extensive wart virus infection": - exists "Extensive wart virus infection Condition" - or exists "Extensive wart virus infection Observation" -define "Extensive wart virus infection Condition": - Elements."Extensive wart virus infection Condition" C - where C.prevalenceInterval() starts on or before Today -define "Extensive wart virus infection Observation": - Elements."Extensive wart virus infection Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Extensive wart virus infection */ - -/* -@dataElement: HIV.D.DE303 - Extensive molluscum contagiosum -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include extensive molluscum contagiosum -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Extensive molluscum contagiosum": - exists "Extensive molluscum contagiosum Condition" - or exists "Extensive molluscum contagiosum Observation" -define "Extensive molluscum contagiosum Condition": - Elements."Extensive molluscum contagiosum Condition" C - where C.prevalenceInterval() starts on or before Today -define "Extensive molluscum contagiosum Observation": - Elements."Extensive molluscum contagiosum Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Extensive molluscum contagiosum */ - -/* -@dataElement: HIV.D.DE304 - Unexplained persistent parotid enlargement -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include unexplained persistent parotid enlargement -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained persistent parotid enlargement": - exists "Unexplained persistent parotid enlargement Condition" - or exists "Unexplained persistent parotid enlargement Observation" -define "Unexplained persistent parotid enlargement Condition": - Elements."Unexplained persistent parotid enlargement Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained persistent parotid enlargement Observation": - Elements."Unexplained persistent parotid enlargement Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained persistent parotid enlargement */ - -/* -@dataElement: HIV.D.DE305 - Unexplained severe weight loss in adults -@activity: HIV.D15 Determine clinical stage of HIV -@description: Unexplained severe weight loss (>10% of presumed or measured body weight) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained severe weight loss in adults": - exists "Unexplained severe weight loss in adults Condition" - or exists "Unexplained severe weight loss in adults Observation" -define "Unexplained severe weight loss in adults Condition": - Elements."Unexplained severe weight loss in adults Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained severe weight loss in adults Observation": - Elements."Unexplained severe weight loss in adults Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained severe weight loss in adults */ - -/* -@dataElement: HIV.D.DE306 - Unexplained moderate malnutrition not adequately responding to standard therapy -@activity: HIV.D15 Determine clinical stage of HIV -@description: Defined as weight-for-height < - 2 z-score or mid-upper arm circumference 115 mm to <125 mm. For children younger than five years of age: stunting is defined as severe acute malnutrition - either weight for height < -3 z-score or mid-upper arm circumference <115 mm or the presence of oedema. -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained moderate malnutrition not adequately responding to standard therapy": - exists "Unexplained moderate malnutrition not adequately responding to standard therapy Condition" - or exists "Unexplained moderate malnutrition not adequately responding to standard therapy Observation" -define "Unexplained moderate malnutrition not adequately responding to standard therapy Condition": - Elements."Unexplained moderate malnutrition not adequately responding to standard therapy Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained moderate malnutrition not adequately responding to standard therapy Observation": - Elements."Unexplained moderate malnutrition not adequately responding to standard therapy Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained moderate malnutrition not adequately responding to standard therapy */ - -/* -@dataElement: HIV.D.DE307 - Unexplained chronic diarrhoea for longer than 1 month -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include unexplained chronic diarrhoea for longer than 1 month -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained chronic diarrhoea for longer than 1 month": - exists "Unexplained chronic diarrhoea for longer than 1 month Condition" - or exists "Unexplained chronic diarrhoea for longer than 1 month Observation" -define "Unexplained chronic diarrhoea for longer than 1 month Condition": - Elements."Unexplained chronic diarrhoea for longer than 1 month Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained chronic diarrhoea for longer than 1 month Observation": - Elements."Unexplained chronic diarrhoea for longer than 1 month Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained chronic diarrhoea for longer than 1 month */ - -/* -@dataElement: HIV.D.DE308 - Unexplained persistent diarrhoea 14 days or more -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include unexplained persistent diarrhoea (14 days or more) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained persistent diarrhoea 14 days or more": - exists "Unexplained persistent diarrhoea 14 days or more Condition" - or exists "Unexplained persistent diarrhoea 14 days or more Observation" -define "Unexplained persistent diarrhoea 14 days or more Condition": - Elements."Unexplained persistent diarrhoea 14 days or more Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained persistent diarrhoea 14 days or more Observation": - Elements."Unexplained persistent diarrhoea 14 days or more Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained persistent diarrhoea 14 days or more */ - -/* -@dataElement: HIV.D.DE309 - Unexplained persistent fever above 37.5 C, intermittent or constant, for longer than one 1 month -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include unexplained persistent fever (above 37.5 C, intermittent or constant, for longer than one 1 month) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained persistent fever above 37.5 C, intermittent or constant, for longer than one 1 month": - exists "Unexplained persistent fever above 37.5 C, intermittent or constant, for longer than one 1 month Condition" - or exists "Unexplained persistent fever above 37.5 C, intermittent or constant, for longer than one 1 month Observation" -define "Unexplained persistent fever above 37.5 C, intermittent or constant, for longer than one 1 month Condition": - Elements."Unexplained persistent fever above 37.5 C, intermittent or constant, for longer than one 1 month Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained persistent fever above 37.5 C, intermittent or constant, for longer than one 1 month Observation": - Elements."Unexplained persistent fever above 37.5 C, intermittent or constant, for longer than one 1 month Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained persistent fever above 37.5 C, intermittent or constant, for longer than one 1 month */ - -/* -@dataElement: HIV.D.DE310 - Persistent oral candidiasis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include persistent oral candidiasis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Persistent oral candidiasis": - exists "Persistent oral candidiasis Condition" - or exists "Persistent oral candidiasis Observation" -define "Persistent oral candidiasis Condition": - Elements."Persistent oral candidiasis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Persistent oral candidiasis Observation": - Elements."Persistent oral candidiasis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Persistent oral candidiasis */ - -/* -@dataElement: HIV.D.DE311 - Oral hairy leukoplakia -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client has fine white small linear or corrugated lesions on lateral borders of the tongue that do not scrape off -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Oral hairy leukoplakia": - exists "Oral hairy leukoplakia Condition" - or exists "Oral hairy leukoplakia Observation" -define "Oral hairy leukoplakia Condition": - Elements."Oral hairy leukoplakia Condition" C - where C.prevalenceInterval() starts on or before Today -define "Oral hairy leukoplakia Observation": - Elements."Oral hairy leukoplakia Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Oral hairy leukoplakia */ - -/* -@dataElement: HIV.D.DE312 - Pulmonary TB -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include pulmonary TB -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Pulmonary TB D.DE312": - exists "Pulmonary TB D.DE312 Condition" - or exists "Pulmonary TB D.DE312 Observation" -define "Pulmonary TB D.DE312 Condition": - Elements."Pulmonary TB D.DE312 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Pulmonary TB D.DE312 Observation": - Elements."Pulmonary TB D.DE312 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Pulmonary TB D.DE312 */ - -/* -@dataElement: HIV.D.DE313 - Lymph node TB -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include lymph node TB -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Lymph node TB D.DE313": - exists "Lymph node TB D.DE313 Condition" - or exists "Lymph node TB D.DE313 Observation" -define "Lymph node TB D.DE313 Condition": - Elements."Lymph node TB D.DE313 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Lymph node TB D.DE313 Observation": - Elements."Lymph node TB D.DE313 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Lymph node TB D.DE313 */ - -/* -@dataElement: HIV.D.DE314 - Severe bacterial infections such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include severe bacterial infections (such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Severe bacterial infections such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia": - exists "Severe bacterial infections such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia Condition" - or exists "Severe bacterial infections such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia Observation" -define "Severe bacterial infections such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia Condition": - Elements."Severe bacterial infections such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia Condition" C - where C.prevalenceInterval() starts on or before Today -define "Severe bacterial infections such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia Observation": - Elements."Severe bacterial infections such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Severe bacterial infections such as pneumonia, empyema, pyomyositis, bone or joint infection, meningitis, bacteraemia */ - -/* -@dataElement: HIV.D.DE315 - Severe recurrent bacterial pneumonia -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include severe recurrent bacterial pneumonia -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Severe recurrent bacterial pneumonia": - exists "Severe recurrent bacterial pneumonia Condition" - or exists "Severe recurrent bacterial pneumonia Observation" -define "Severe recurrent bacterial pneumonia Condition": - Elements."Severe recurrent bacterial pneumonia Condition" C - where C.prevalenceInterval() starts on or before Today -define "Severe recurrent bacterial pneumonia Observation": - Elements."Severe recurrent bacterial pneumonia Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Severe recurrent bacterial pneumonia */ - -/* -@dataElement: HIV.D.DE316 - Acute necrotizing ulcerative stomatitis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include acute necrotizing ulcerative stomatitis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Acute necrotizing ulcerative stomatitis": - exists "Acute necrotizing ulcerative stomatitis Condition" - or exists "Acute necrotizing ulcerative stomatitis Observation" -define "Acute necrotizing ulcerative stomatitis Condition": - Elements."Acute necrotizing ulcerative stomatitis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Acute necrotizing ulcerative stomatitis Observation": - Elements."Acute necrotizing ulcerative stomatitis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Acute necrotizing ulcerative stomatitis */ - -/* -@dataElement: HIV.D.DE317 - Acute necrotizing ulcerative gingivitis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include acute necrotizing ulcerative gingivitis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Acute necrotizing ulcerative gingivitis": - exists "Acute necrotizing ulcerative gingivitis Condition" - or exists "Acute necrotizing ulcerative gingivitis Observation" -define "Acute necrotizing ulcerative gingivitis Condition": - Elements."Acute necrotizing ulcerative gingivitis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Acute necrotizing ulcerative gingivitis Observation": - Elements."Acute necrotizing ulcerative gingivitis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Acute necrotizing ulcerative gingivitis */ - -/* -@dataElement: HIV.D.DE318 - Acute necrotizing ulcerative periodontitis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include acute necrotizing ulcerative periodontitis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Acute necrotizing ulcerative periodontitis": - exists "Acute necrotizing ulcerative periodontitis Condition" - or exists "Acute necrotizing ulcerative periodontitis Observation" -define "Acute necrotizing ulcerative periodontitis Condition": - Elements."Acute necrotizing ulcerative periodontitis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Acute necrotizing ulcerative periodontitis Observation": - Elements."Acute necrotizing ulcerative periodontitis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Acute necrotizing ulcerative periodontitis */ - -/* -@dataElement: HIV.D.DE319 - Unexplained anaemia <8 g/dL -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include unexplained anaemia (<8 g/dL) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained anaemia <8 g/dL": - exists "Unexplained anaemia <8 g/dL Condition" - or exists "Unexplained anaemia <8 g/dL Observation" -define "Unexplained anaemia <8 g/dL Condition": - Elements."Unexplained anaemia <8 g/dL Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained anaemia <8 g/dL Observation": - Elements."Unexplained anaemia <8 g/dL Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained anaemia <8 g/dL */ - -/* -@dataElement: HIV.D.DE320 - Neutropaenia <0.5 x 10^9/L -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include neutropaenia (<0.5 x 10^9/L) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Neutropaenia <0.5 x 10^9/L": - exists "Neutropaenia <0.5 x 10^9/L Condition" - or exists "Neutropaenia <0.5 x 10^9/L Observation" -define "Neutropaenia <0.5 x 10^9/L Condition": - Elements."Neutropaenia <0.5 x 10^9/L Condition" C - where C.prevalenceInterval() starts on or before Today -define "Neutropaenia <0.5 x 10^9/L Observation": - Elements."Neutropaenia <0.5 x 10^9/L Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Neutropaenia <0.5 x 10^9/L */ - -/* -@dataElement: HIV.D.DE321 - Chronic thrombocytopaenia <50 x 10^9/L -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include chronic thrombocytopaenia (<50 x 10^9/L) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Chronic thrombocytopaenia <50 x 10^9/L": - exists "Chronic thrombocytopaenia <50 x 10^9/L Condition" - or exists "Chronic thrombocytopaenia <50 x 10^9/L Observation" -define "Chronic thrombocytopaenia <50 x 10^9/L Condition": - Elements."Chronic thrombocytopaenia <50 x 10^9/L Condition" C - where C.prevalenceInterval() starts on or before Today -define "Chronic thrombocytopaenia <50 x 10^9/L Observation": - Elements."Chronic thrombocytopaenia <50 x 10^9/L Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Chronic thrombocytopaenia <50 x 10^9/L */ - -/* -@dataElement: HIV.D.DE322 - Symptomatic lymphoid interstitial pneumonitis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include symptomatic lymphoid interstitial pneumonitis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Symptomatic lymphoid interstitial pneumonitis": - exists "Symptomatic lymphoid interstitial pneumonitis Condition" - or exists "Symptomatic lymphoid interstitial pneumonitis Observation" -define "Symptomatic lymphoid interstitial pneumonitis Condition": - Elements."Symptomatic lymphoid interstitial pneumonitis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Symptomatic lymphoid interstitial pneumonitis Observation": - Elements."Symptomatic lymphoid interstitial pneumonitis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Symptomatic lymphoid interstitial pneumonitis */ - -/* -@dataElement: HIV.D.DE323 - Chronic HIV-associated lung disease, including bronchiectasis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include chronic HIV-associated lung disease, including bronchiectasis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Chronic HIV-associated lung disease, including bronchiectasis": - exists "Chronic HIV-associated lung disease, including bronchiectasis Condition" - or exists "Chronic HIV-associated lung disease, including bronchiectasis Observation" -define "Chronic HIV-associated lung disease, including bronchiectasis Condition": - Elements."Chronic HIV-associated lung disease, including bronchiectasis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Chronic HIV-associated lung disease, including bronchiectasis Observation": - Elements."Chronic HIV-associated lung disease, including bronchiectasis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Chronic HIV-associated lung disease, including bronchiectasis */ - -/* -@dataElement: HIV.D.DE324 - HIV wasting syndrome -@activity: HIV.D15 Determine clinical stage of HIV -@description: Unexplained involuntary weight loss (>10% baseline body weight), with obvious wasting or body mass index <18.5; PLUS EITHER unexplained chronic reported for longer than one month; OR reports of fever or night sweats for more than one month without other cause and lack of response to antibiotics or antimalarial agents; malaria must be excluded in malarious areas. -*/ -// TODO: Replace placeholder with relevant CQL logic -define "HIV wasting syndrome": - exists "HIV wasting syndrome Condition" - or exists "HIV wasting syndrome Observation" -define "HIV wasting syndrome Condition": - Elements."HIV wasting syndrome Condition" C - where C.prevalenceInterval() starts on or before Today -define "HIV wasting syndrome Observation": - Elements."HIV wasting syndrome Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of HIV wasting syndrome */ - -/* -@dataElement: HIV.D.DE325 - Unexplained severe wasting not responding to standard therapy -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client has unexplained severe wasting not responding to standard therapy . For under 5 years old, defined as weight-for-height < -3 z-score -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained severe wasting not responding to standard therapy": - exists "Unexplained severe wasting not responding to standard therapy Condition" - or exists "Unexplained severe wasting not responding to standard therapy Observation" -define "Unexplained severe wasting not responding to standard therapy Condition": - Elements."Unexplained severe wasting not responding to standard therapy Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained severe wasting not responding to standard therapy Observation": - Elements."Unexplained severe wasting not responding to standard therapy Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained severe wasting not responding to standard therapy */ - -/* -@dataElement: HIV.D.DE326 - Unexplained stunting not responding to standard therapy -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client has unexplained stunting not responding to standard therapy . For under 5 years old, defined as length-for- age/height-for-age < -2 z-score -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained stunting not responding to standard therapy": - exists "Unexplained stunting not responding to standard therapy Condition" - or exists "Unexplained stunting not responding to standard therapy Observation" -define "Unexplained stunting not responding to standard therapy Condition": - Elements."Unexplained stunting not responding to standard therapy Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained stunting not responding to standard therapy Observation": - Elements."Unexplained stunting not responding to standard therapy Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained stunting not responding to standard therapy */ - -/* -@dataElement: HIV.D.DE327 - Unexplained severe malnutrition not responding to standard therapy -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client has unexplained severe malnutrition not responding to standard therapy . For under 5 years old, weight for height < -3 z-score or mid-upper arm circumference <115 mm or the presence of oedema -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unexplained severe malnutrition not responding to standard therapy": - exists "Unexplained severe malnutrition not responding to standard therapy Condition" - or exists "Unexplained severe malnutrition not responding to standard therapy Observation" -define "Unexplained severe malnutrition not responding to standard therapy Condition": - Elements."Unexplained severe malnutrition not responding to standard therapy Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unexplained severe malnutrition not responding to standard therapy Observation": - Elements."Unexplained severe malnutrition not responding to standard therapy Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unexplained severe malnutrition not responding to standard therapy */ - -/* -@dataElement: HIV.D.DE328 - Pneumocystis jirovecii pneumonia -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include pneumocystis (jirovecii) pneumonia -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Pneumocystis jirovecii pneumonia": - exists "Pneumocystis jirovecii pneumonia Condition" - or exists "Pneumocystis jirovecii pneumonia Observation" -define "Pneumocystis jirovecii pneumonia Condition": - Elements."Pneumocystis jirovecii pneumonia Condition" C - where C.prevalenceInterval() starts on or before Today -define "Pneumocystis jirovecii pneumonia Observation": - Elements."Pneumocystis jirovecii pneumonia Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Pneumocystis jirovecii pneumonia */ - -/* -@dataElement: HIV.D.DE329 - Recurrent severe bacterial pneumonia -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include recurrent severe bacterial pneumonia -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Recurrent severe bacterial pneumonia": - exists "Recurrent severe bacterial pneumonia Condition" - or exists "Recurrent severe bacterial pneumonia Observation" -define "Recurrent severe bacterial pneumonia Condition": - Elements."Recurrent severe bacterial pneumonia Condition" C - where C.prevalenceInterval() starts on or before Today -define "Recurrent severe bacterial pneumonia Observation": - Elements."Recurrent severe bacterial pneumonia Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Recurrent severe bacterial pneumonia */ - -/* -@dataElement: HIV.D.DE330 - Recurrent severe bacterial infections such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include recurrent severe bacterial infections (such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Recurrent severe bacterial infections such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia": - exists "Recurrent severe bacterial infections such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia Condition" - or exists "Recurrent severe bacterial infections such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia Observation" -define "Recurrent severe bacterial infections such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia Condition": - Elements."Recurrent severe bacterial infections such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia Condition" C - where C.prevalenceInterval() starts on or before Today -define "Recurrent severe bacterial infections such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia Observation": - Elements."Recurrent severe bacterial infections such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Recurrent severe bacterial infections such as empyema, pyomyositis, bone or joint infection, meningitis, but excluding pneumonia */ - -/* -@dataElement: HIV.D.DE331 - Empyema -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include recurrent empyema -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Empyema": - exists "Empyema Condition" - or exists "Empyema Observation" -define "Empyema Condition": - Elements."Empyema Condition" C - where C.prevalenceInterval() starts on or before Today -define "Empyema Observation": - Elements."Empyema Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Empyema */ - -/* -@dataElement: HIV.D.DE332 - Pyomyositis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include recurrent pyomyositis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Pyomyositis": - exists "Pyomyositis Condition" - or exists "Pyomyositis Observation" -define "Pyomyositis Condition": - Elements."Pyomyositis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Pyomyositis Observation": - Elements."Pyomyositis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Pyomyositis */ - -/* -@dataElement: HIV.D.DE333 - Bone or joint infection -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include recurrent bone or joint infections -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Bone or joint infection": - exists "Bone or joint infection Condition" - or exists "Bone or joint infection Observation" -define "Bone or joint infection Condition": - Elements."Bone or joint infection Condition" C - where C.prevalenceInterval() starts on or before Today -define "Bone or joint infection Observation": - Elements."Bone or joint infection Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Bone or joint infection */ - -/* -@dataElement: HIV.D.DE334 - Meningitis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include recurrent meningitis -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Meningitis": - exists "Meningitis Condition" - or exists "Meningitis Observation" -define "Meningitis Condition": - Elements."Meningitis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Meningitis Observation": - Elements."Meningitis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Meningitis */ - -/* -@dataElement: HIV.D.DE335 - Chronic herpes simplex infection orolabial or cutaneous of more than 1 month duration or visceral at any site -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include chronic herpes simplex infection (orolabial or cutaneous of more than 1 month duration or visceral at any site) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Chronic herpes simplex infection orolabial or cutaneous of more than 1 month duration or visceral at any site": - exists "Chronic herpes simplex infection orolabial or cutaneous of more than 1 month duration or visceral at any site Condition" - or exists "Chronic herpes simplex infection orolabial or cutaneous of more than 1 month duration or visceral at any site Observation" -define "Chronic herpes simplex infection orolabial or cutaneous of more than 1 month duration or visceral at any site Condition": - Elements."Chronic herpes simplex infection orolabial or cutaneous of more than 1 month duration or visceral at any site Condition" C +define "STI testing and treatment D.DE160": + exists "STI testing and treatment D.DE160 Condition" + or exists "STI testing and treatment D.DE160 Observation" +define "STI testing and treatment D.DE160 Condition": + Elements."STI testing and treatment D.DE160 Condition" C where C.prevalenceInterval() starts on or before Today -define "Chronic herpes simplex infection orolabial or cutaneous of more than 1 month duration or visceral at any site Observation": - Elements."Chronic herpes simplex infection orolabial or cutaneous of more than 1 month duration or visceral at any site Observation" O +define "STI testing and treatment D.DE160 Observation": + Elements."STI testing and treatment D.DE160 Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Chronic herpes simplex infection orolabial or cutaneous of more than 1 month duration or visceral at any site */ +/* End of STI testing and treatment D.DE160 */ /* -@dataElement: HIV.D.DE336 - Chronic herpes simplex infection orolabial, genital or anorectal of more than 1 month in duration or visceral at any site -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include chronic herpes simplex infection (orolabial, genital or anorectal of more than one month in duration or visceral at any site) +@dataElement: HIV.D.DE162 - HBsAg test result +@activity: HIV.D12 Determine recommended screenings and tests +@description: Hepatitis B virus test result (HBsAg) */ -// TODO: Replace placeholder with relevant CQL logic -define "Chronic herpes simplex infection orolabial, genital or anorectal of more than 1 month in duration or visceral at any site": - exists "Chronic herpes simplex infection orolabial, genital or anorectal of more than 1 month in duration or visceral at any site Condition" - or exists "Chronic herpes simplex infection orolabial, genital or anorectal of more than 1 month in duration or visceral at any site Observation" -define "Chronic herpes simplex infection orolabial, genital or anorectal of more than 1 month in duration or visceral at any site Condition": - Elements."Chronic herpes simplex infection orolabial, genital or anorectal of more than 1 month in duration or visceral at any site Condition" C - where C.prevalenceInterval() starts on or before Today -define "Chronic herpes simplex infection orolabial, genital or anorectal of more than 1 month in duration or visceral at any site Observation": - Elements."Chronic herpes simplex infection orolabial, genital or anorectal of more than 1 month in duration or visceral at any site Observation" O +define "HBsAg test result D.DE162": + Elements."HBsAg test result D.DE162" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Chronic herpes simplex infection orolabial, genital or anorectal of more than 1 month in duration or visceral at any site */ +/* End of HBsAg test result D.DE162 */ /* -@dataElement: HIV.D.DE337 - Oesophageal candidiasis or candidiasis of trachea, bronchi or lungs -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include oesophageal candidiasis (or candidiasis of trachea, bronchi or lungs) +@dataElement: HIV.D.DE163 - Positive +@activity: HIV.D12 Determine recommended screenings and tests +@description: HBsAg test result was positive */ -// TODO: Replace placeholder with relevant CQL logic -define "Oesophageal candidiasis or candidiasis of trachea, bronchi or lungs": - exists "Oesophageal candidiasis or candidiasis of trachea, bronchi or lungs Condition" - or exists "Oesophageal candidiasis or candidiasis of trachea, bronchi or lungs Observation" -define "Oesophageal candidiasis or candidiasis of trachea, bronchi or lungs Condition": - Elements."Oesophageal candidiasis or candidiasis of trachea, bronchi or lungs Condition" C - where C.prevalenceInterval() starts on or before Today -define "Oesophageal candidiasis or candidiasis of trachea, bronchi or lungs Observation": - Elements."Oesophageal candidiasis or candidiasis of trachea, bronchi or lungs Observation" O +define "Positive D.DE163": + Elements."Positive D.DE163" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Oesophageal candidiasis or candidiasis of trachea, bronchi or lungs */ +/* End of Positive D.DE163 */ /* -@dataElement: HIV.D.DE338 - Extrapulmonary TB -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include extrapulmonary tuberculosis +@dataElement: HIV.D.DE164 - Negative +@activity: HIV.D12 Determine recommended screenings and tests +@description: HBsAg test result was negative */ -// TODO: Replace placeholder with relevant CQL logic -define "Extrapulmonary TB D.DE338": - exists "Extrapulmonary TB D.DE338 Condition" - or exists "Extrapulmonary TB D.DE338 Observation" -define "Extrapulmonary TB D.DE338 Condition": - Elements."Extrapulmonary TB D.DE338 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Extrapulmonary TB D.DE338 Observation": - Elements."Extrapulmonary TB D.DE338 Observation" O +define "Negative D.DE164": + Elements."Negative D.DE164" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Extrapulmonary TB D.DE338 */ +/* End of Negative D.DE164 */ /* -@dataElement: HIV.D.DE339 - Kaposi sarcoma -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include Kaposi sarcoma +@dataElement: HIV.D.DE165 - Indeterminate +@activity: HIV.D12 Determine recommended screenings and tests +@description: HBsAg test result was indeterminate */ -// TODO: Replace placeholder with relevant CQL logic -define "Kaposi sarcoma": - exists "Kaposi sarcoma Condition" - or exists "Kaposi sarcoma Observation" -define "Kaposi sarcoma Condition": - Elements."Kaposi sarcoma Condition" C - where C.prevalenceInterval() starts on or before Today -define "Kaposi sarcoma Observation": - Elements."Kaposi sarcoma Observation" O +define "Indeterminate D.DE165": + Elements."Indeterminate D.DE165" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Kaposi sarcoma */ +/* End of Indeterminate D.DE165 */ /* -@dataElement: HIV.D.DE340 - Cytomegalovirus infection retinitis or infection of other organs -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include cytomegalovirus infection (retinitis or infection of other organs) +@dataElement: HIV.D.DE170 - HCV test result +@activity: HIV.D12 Determine recommended screenings and tests +@description: Hepatitis C virus test result (HCV antibody, HCV RNA or HCV core antigen) */ -// TODO: Replace placeholder with relevant CQL logic -define "Cytomegalovirus infection retinitis or infection of other organs": - exists "Cytomegalovirus infection retinitis or infection of other organs Condition" - or exists "Cytomegalovirus infection retinitis or infection of other organs Observation" -define "Cytomegalovirus infection retinitis or infection of other organs Condition": - Elements."Cytomegalovirus infection retinitis or infection of other organs Condition" C - where C.prevalenceInterval() starts on or before Today -define "Cytomegalovirus infection retinitis or infection of other organs Observation": - Elements."Cytomegalovirus infection retinitis or infection of other organs Observation" O +define "HCV test result D.DE170": + Elements."HCV test result D.DE170" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Cytomegalovirus infection retinitis or infection of other organs */ +/* End of HCV test result D.DE170 */ /* -@dataElement: HIV.D.DE341 - Central nervous system toxoplasmosis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include central nervous system toxoplasmosis +@dataElement: HIV.D.DE171 - Positive +@activity: HIV.D12 Determine recommended screenings and tests +@description: HCV test result was positive */ -// TODO: Replace placeholder with relevant CQL logic -define "Central nervous system toxoplasmosis": - exists "Central nervous system toxoplasmosis Condition" - or exists "Central nervous system toxoplasmosis Observation" -define "Central nervous system toxoplasmosis Condition": - Elements."Central nervous system toxoplasmosis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Central nervous system toxoplasmosis Observation": - Elements."Central nervous system toxoplasmosis Observation" O +define "Positive D.DE171 Observation": + Elements."Positive D.DE171" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Central nervous system toxoplasmosis */ +/* End of Positive D.DE171 */ /* -@dataElement: HIV.D.DE342 - HIV encephalopathy -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include HIV encephalopathy +@dataElement: HIV.D.DE172 - Negative +@activity: HIV.D12 Determine recommended screenings and tests +@description: HCV test result was negative */ -// TODO: Replace placeholder with relevant CQL logic -define "HIV encephalopathy": - exists "HIV encephalopathy Condition" - or exists "HIV encephalopathy Observation" -define "HIV encephalopathy Condition": - Elements."HIV encephalopathy Condition" C - where C.prevalenceInterval() starts on or before Today -define "HIV encephalopathy Observation": - Elements."HIV encephalopathy Observation" O +define "Negative D.DE172": + Elements."Negative D.DE172" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of HIV encephalopathy */ +/* End of Negative D.DE172 */ /* -@dataElement: HIV.D.DE343 - Extrapulmonary cryptococcosis, including meningitis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include extrapulmonary cryptococcosis, including meningitis +@dataElement: HIV.D.DE173 - Indeterminate +@activity: HIV.D12 Determine recommended screenings and tests +@description: HCV test result was indeterminate */ -// TODO: Replace placeholder with relevant CQL logic -define "Extrapulmonary cryptococcosis, including meningitis": - exists "Extrapulmonary cryptococcosis, including meningitis Condition" - or exists "Extrapulmonary cryptococcosis, including meningitis Observation" -define "Extrapulmonary cryptococcosis, including meningitis Condition": - Elements."Extrapulmonary cryptococcosis, including meningitis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Extrapulmonary cryptococcosis, including meningitis Observation": - Elements."Extrapulmonary cryptococcosis, including meningitis Observation" O +define "Indeterminate D.DE173": + Elements."Indeterminate D.DE173" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Extrapulmonary cryptococcosis, including meningitis */ +/* End of Indeterminate D.DE173 */ /* -@dataElement: HIV.D.DE344 - Disseminated nontuberculous mycobacterial infection -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include disseminated nontuberculous mycobacterial infection +@dataElement: HIV.D.DE186 - HIV clinical stage +@activity: HIV.D8 Capture or update client history +@description: WHO clinical stage of client based on signs and symptoms. WHO clinical staging is a way to categorize HIV disease severity based on new or recurrent clinical events. There are 4 WHO clinical stages that range from mild symptoms (WHO clinical stage 1) to severe symptoms (WHO clinical stage 4). */ // TODO: Replace placeholder with relevant CQL logic -define "Disseminated nontuberculous mycobacterial infection": - exists "Disseminated nontuberculous mycobacterial infection Condition" - or exists "Disseminated nontuberculous mycobacterial infection Observation" -define "Disseminated nontuberculous mycobacterial infection Condition": - Elements."Disseminated nontuberculous mycobacterial infection Condition" C - where C.prevalenceInterval() starts on or before Today -define "Disseminated nontuberculous mycobacterial infection Observation": - Elements."Disseminated nontuberculous mycobacterial infection Observation" O +define "HIV clinical stage D.DE186": + exists "HIV clinical stage D.DE186 Observation" +define "HIV clinical stage D.DE186 Observation": + Elements."HIV clinical stage D.DE186 Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Disseminated nontuberculous mycobacterial infection */ +/* End of HIV clinical stage D.DE186 */ /* -@dataElement: HIV.D.DE345 - Progressive multifocal leukoencephalopathy -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include progressive multifocal leukoencephalopathy +@dataElement: HIV.D.DE187 - WHO HIV clinical stage 1 +@activity: HIV.D8 Capture or update client history +@description: Client is currently assessed to be at a clinical stage 1, based on clinical assessment and diagnostics */ // TODO: Replace placeholder with relevant CQL logic -define "Progressive multifocal leukoencephalopathy": - exists "Progressive multifocal leukoencephalopathy Condition" - or exists "Progressive multifocal leukoencephalopathy Observation" -define "Progressive multifocal leukoencephalopathy Condition": - Elements."Progressive multifocal leukoencephalopathy Condition" C +define "WHO HIV clinical stage 1": + exists "WHO HIV clinical stage 1 Condition" + or exists "WHO HIV clinical stage 1 Observation" +define "WHO HIV clinical stage 1 Condition": + Elements."WHO HIV clinical stage 1 Condition" C where C.prevalenceInterval() starts on or before Today -define "Progressive multifocal leukoencephalopathy Observation": - Elements."Progressive multifocal leukoencephalopathy Observation" O +define "WHO HIV clinical stage 1 Observation": + Elements."WHO HIV clinical stage 1 Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Progressive multifocal leukoencephalopathy */ +/* End of WHO HIV clinical stage 1 */ /* -@dataElement: HIV.D.DE346 - Chronic cryptosporidiosis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include chronic cryptosporidiosis +@dataElement: HIV.D.DE188 - WHO HIV clinical stage 2 +@activity: HIV.D8 Capture or update client history +@description: Client is currently assessed to be at a clinical stage 2, based on clinical assessment and diagnostics */ // TODO: Replace placeholder with relevant CQL logic -define "Chronic cryptosporidiosis": - exists "Chronic cryptosporidiosis Condition" - or exists "Chronic cryptosporidiosis Observation" -define "Chronic cryptosporidiosis Condition": - Elements."Chronic cryptosporidiosis Condition" C +define "WHO HIV clinical stage 2": + exists "WHO HIV clinical stage 2 Condition" + or exists "WHO HIV clinical stage 2 Observation" +define "WHO HIV clinical stage 2 Condition": + Elements."WHO HIV clinical stage 2 Condition" C where C.prevalenceInterval() starts on or before Today -define "Chronic cryptosporidiosis Observation": - Elements."Chronic cryptosporidiosis Observation" O +define "WHO HIV clinical stage 2 Observation": + Elements."WHO HIV clinical stage 2 Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Chronic cryptosporidiosis */ +/* End of WHO HIV clinical stage 2 */ /* -@dataElement: HIV.D.DE347 - Chronic cryptosporidiosis with diarrhoea -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include chronic cryptosporidiosis (with diarrhoea) +@dataElement: HIV.D.DE189 - WHO HIV clinical stage 3 +@activity: HIV.D8 Capture or update client history +@description: Client is currently assessed to be at a clinical stage 3, based on clinical assessment and diagnostics */ // TODO: Replace placeholder with relevant CQL logic -define "Chronic cryptosporidiosis with diarrhoea": - exists "Chronic cryptosporidiosis with diarrhoea Condition" - or exists "Chronic cryptosporidiosis with diarrhoea Observation" -define "Chronic cryptosporidiosis with diarrhoea Condition": - Elements."Chronic cryptosporidiosis with diarrhoea Condition" C +define "WHO HIV clinical stage 3": + exists "WHO HIV clinical stage 3 Condition" + or exists "WHO HIV clinical stage 3 Observation" +define "WHO HIV clinical stage 3 Condition": + Elements."WHO HIV clinical stage 3 Condition" C where C.prevalenceInterval() starts on or before Today -define "Chronic cryptosporidiosis with diarrhoea Observation": - Elements."Chronic cryptosporidiosis with diarrhoea Observation" O +define "WHO HIV clinical stage 3 Observation": + Elements."WHO HIV clinical stage 3 Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Chronic cryptosporidiosis with diarrhoea */ +/* End of WHO HIV clinical stage 3 */ /* -@dataElement: HIV.D.DE348 - Chronic isosporiasis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include chronic isosporiasis +@dataElement: HIV.D.DE190 - WHO HIV clinical stage 4 +@activity: HIV.D8 Capture or update client history +@description: Client is currently assessed to be at a clinical stage 4, based on clinical assessment and diagnostics */ // TODO: Replace placeholder with relevant CQL logic -define "Chronic isosporiasis": - exists "Chronic isosporiasis Condition" - or exists "Chronic isosporiasis Observation" -define "Chronic isosporiasis Condition": - Elements."Chronic isosporiasis Condition" C +define "WHO HIV clinical stage 4": + exists "WHO HIV clinical stage 4 Condition" + or exists "WHO HIV clinical stage 4 Observation" +define "WHO HIV clinical stage 4 Condition": + Elements."WHO HIV clinical stage 4 Condition" C where C.prevalenceInterval() starts on or before Today -define "Chronic isosporiasis Observation": - Elements."Chronic isosporiasis Observation" O +define "WHO HIV clinical stage 4 Observation": + Elements."WHO HIV clinical stage 4 Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Chronic isosporiasis */ +/* End of WHO HIV clinical stage 4 */ /* -@dataElement: HIV.D.DE349 - Disseminated mycosis extrapulmonary histoplasmosis, coccidioidomycosis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include disseminated mycosis (extrapulmonary histoplasmosis, coccidioidomycosis) +@dataElement: HIV.D.DE194 - Date of viral load sample collection +@activity: HIV.D10 Counsel returning client +@description: Date and time when the sample was collected to test the client's HIV viral load */ // TODO: Replace placeholder with relevant CQL logic -define "Disseminated mycosis extrapulmonary histoplasmosis, coccidioidomycosis": - exists "Disseminated mycosis extrapulmonary histoplasmosis, coccidioidomycosis Condition" - or exists "Disseminated mycosis extrapulmonary histoplasmosis, coccidioidomycosis Observation" -define "Disseminated mycosis extrapulmonary histoplasmosis, coccidioidomycosis Condition": - Elements."Disseminated mycosis extrapulmonary histoplasmosis, coccidioidomycosis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Disseminated mycosis extrapulmonary histoplasmosis, coccidioidomycosis Observation": - Elements."Disseminated mycosis extrapulmonary histoplasmosis, coccidioidomycosis Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Disseminated mycosis extrapulmonary histoplasmosis, coccidioidomycosis */ +define "Date of viral load sample collection D.DE194": + Elements."Date of viral load sample collection D.DE194" P + where P.encounter.references(EncounterId) + or P.performed.toInterval() starts on or before Today +/* End of Date of viral load sample collection D.DE194 */ /* -@dataElement: HIV.D.DE350 - Disseminated endemic mycosis extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include disseminated endemic mycosis (extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis) +@dataElement: HIV.D.DE195 - Date of scheduled review of viral load test results +@activity: HIV.D10 Counsel returning client +@description: Expected date when client's viral load test results will be returned and reviewed */ // TODO: Replace placeholder with relevant CQL logic -define "Disseminated endemic mycosis extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis": - exists "Disseminated endemic mycosis extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis Condition" - or exists "Disseminated endemic mycosis extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis Observation" -define "Disseminated endemic mycosis extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis Condition": - Elements."Disseminated endemic mycosis extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis Condition" C - where C.prevalenceInterval() starts on or before Today -define "Disseminated endemic mycosis extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis Observation": - Elements."Disseminated endemic mycosis extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis Observation" O +define "Date of scheduled review of viral load test results": + Elements."Date of scheduled review of viral load test results" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Disseminated endemic mycosis extrapulmonary histoplasmosis, coccidioidomycosis, penicilliosis */ +define "Date of scheduled review of viral load test results Value": + "Date of scheduled review of viral load test results" O + return O.value +/* End of Date of scheduled review of viral load test results */ /* -@dataElement: HIV.D.DE351 - Cerebral lymphoma -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include cerebral lymphoma +@dataElement: HIV.D.DE225 - Treatment failure +@activity: HIV.D17 Check for signs of treatment failure +@description: ART treatment failure */ // TODO: Replace placeholder with relevant CQL logic -define "Cerebral lymphoma": - exists "Cerebral lymphoma Condition" - or exists "Cerebral lymphoma Observation" -define "Cerebral lymphoma Condition": - Elements."Cerebral lymphoma Condition" C - where C.prevalenceInterval() starts on or before Today -define "Cerebral lymphoma Observation": - Elements."Cerebral lymphoma Observation" O +define "Treatment failure": + exists "Treatment failure Observation" +define "Treatment failure Observation": + Elements."Treatment failure Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Cerebral lymphoma */ +/* End of Treatment failure */ /* -@dataElement: HIV.D.DE352 - B-cell non-Hodgkin lymphoma -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include b-cell non-Hodgkin lymphoma +@dataElement: HIV.D.DE226 - Clinical failure +@activity: HIV.D17 Check for signs of treatment failure +@description: New or recurrent clinical event indicating severe immunodeficiency in adults or advanced or severe immunodeficiency in children */ // TODO: Replace placeholder with relevant CQL logic -define "B-cell non-Hodgkin lymphoma": - exists "B-cell non-Hodgkin lymphoma Condition" - or exists "B-cell non-Hodgkin lymphoma Observation" -define "B-cell non-Hodgkin lymphoma Condition": - Elements."B-cell non-Hodgkin lymphoma Condition" C +define "Clinical failure": + exists "Clinical failure Condition" + or exists "Clinical failure Observation" +define "Clinical failure Condition": + Elements."Clinical failure Condition" C where C.prevalenceInterval() starts on or before Today -define "B-cell non-Hodgkin lymphoma Observation": - Elements."B-cell non-Hodgkin lymphoma Observation" O +define "Clinical failure Observation": + Elements."Clinical failure Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of B-cell non-Hodgkin lymphoma */ +/* End of Clinical failure */ /* -@dataElement: HIV.D.DE353 - HIV-associated nephropathy or cardiomyopathy -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include HIV- associated nephropathy or cardiomyopathy +@dataElement: HIV.D.DE227 - Immunological failure +@activity: HIV.D17 Check for signs of treatment failure +@description: CD4 count at or below 250 cells/mm3 following clinical failure */ // TODO: Replace placeholder with relevant CQL logic -define "HIV-associated nephropathy or cardiomyopathy": - exists "HIV-associated nephropathy or cardiomyopathy Condition" - or exists "HIV-associated nephropathy or cardiomyopathy Observation" -define "HIV-associated nephropathy or cardiomyopathy Condition": - Elements."HIV-associated nephropathy or cardiomyopathy Condition" C +define "Immunological failure": + exists "Immunological failure Condition" + or exists "Immunological failure Observation" +define "Immunological failure Condition": + Elements."Immunological failure Condition" C where C.prevalenceInterval() starts on or before Today -define "HIV-associated nephropathy or cardiomyopathy Observation": - Elements."HIV-associated nephropathy or cardiomyopathy Observation" O +define "Immunological failure Observation": + Elements."Immunological failure Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of HIV-associated nephropathy or cardiomyopathy */ +/* End of Immunological failure */ /* -@dataElement: HIV.D.DE354 - Recurrent septicaemia including nontyphoidal Salmonella -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include recurrent bacteraemia (septicaemia) (including nontyphoidal salmonella) +@dataElement: HIV.D.DE228 - Virological failure +@activity: HIV.D17 Check for signs of treatment failure +@description: The inability to achieve or maintain viral suppression below a certain threshold indicated by viral load above 1000 copies/mL based on two consecutive viral load measurements in 3 months, with adherence support following the first viral load test */ // TODO: Replace placeholder with relevant CQL logic -define "Recurrent septicaemia including nontyphoidal Salmonella": - exists "Recurrent septicaemia including nontyphoidal Salmonella Condition" - or exists "Recurrent septicaemia including nontyphoidal Salmonella Observation" -define "Recurrent septicaemia including nontyphoidal Salmonella Condition": - Elements."Recurrent septicaemia including nontyphoidal Salmonella Condition" C +define "Virological failure": + exists "Virological failure Condition" + or exists "Virological failure Observation" +define "Virological failure Condition": + Elements."Virological failure Condition" C where C.prevalenceInterval() starts on or before Today -define "Recurrent septicaemia including nontyphoidal Salmonella Observation": - Elements."Recurrent septicaemia including nontyphoidal Salmonella Observation" O +define "Virological failure Observation": + Elements."Virological failure Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Recurrent septicaemia including nontyphoidal Salmonella */ +/* End of Virological failure */ /* -@dataElement: HIV.D.DE355 - Invasive cervical carcinoma -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include invasive cervical carcinoma +@dataElement: HIV.D.DE259 - Risk factors, comorbidities and coinfections signs and symptoms +@activity: HIV.D14 Prevent, screen, and manage comorbidities and coinfections +@description: Signs and symptoms of opportunistic infections or other comorbidities experienced by client */ // TODO: Replace placeholder with relevant CQL logic -define "Invasive cervical carcinoma": - exists "Invasive cervical carcinoma Condition" - or exists "Invasive cervical carcinoma Observation" -define "Invasive cervical carcinoma Condition": - Elements."Invasive cervical carcinoma Condition" C - where C.prevalenceInterval() starts on or before Today -define "Invasive cervical carcinoma Observation": - Elements."Invasive cervical carcinoma Observation" O +define "Risk factors, comorbidities and coinfections signs and symptoms": + exists "Risk factors, comorbidities and coinfections signs and symptoms Observation" +define "Risk factors, comorbidities and coinfections signs and symptoms Observation": + Elements."Risk factors, comorbidities and coinfections signs and symptoms Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Invasive cervical carcinoma */ +/* End of Risk factors, comorbidities and coinfections signs and symptoms */ /* -@dataElement: HIV.D.DE356 - Atypical disseminated leishmaniasis -@activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include atypical disseminated leishmaniasis +@dataElement: HIV.D.DE282 - Presumptive TB +@activity: HIV.D14 Prevent, screen, and manage comorbidities and coinfections +@description: Client's comorbidities or coinfections or symptoms of these include presumptive TB */ // TODO: Replace placeholder with relevant CQL logic -define "Atypical disseminated leishmaniasis": - exists "Atypical disseminated leishmaniasis Condition" - or exists "Atypical disseminated leishmaniasis Observation" -define "Atypical disseminated leishmaniasis Condition": - Elements."Atypical disseminated leishmaniasis Condition" C +define "Presumptive TB D.DE282": + exists "Presumptive TB D.DE282 Condition" + or exists "Presumptive TB D.DE282 Observation" +define "Presumptive TB D.DE282 Condition": + Elements."Presumptive TB D.DE282 Condition" C where C.prevalenceInterval() starts on or before Today -define "Atypical disseminated leishmaniasis Observation": - Elements."Atypical disseminated leishmaniasis Observation" O +define "Presumptive TB D.DE282 Observation": + Elements."Presumptive TB D.DE282 Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -/* End of Atypical disseminated leishmaniasis */ +/* End of Presumptive TB D.DE282 */ /* -@dataElement: HIV.D.DE357 - Neutropenia +@dataElement: HIV.D.DE289 - WHO HIV clinical stage condition or symptom @activity: HIV.D15 Determine clinical stage of HIV -@description: Client's symptoms include neutropenia, an abnormally low count of a type of white blood cell (neutrophils) +@description: New or recurrent clinical events used to categorize HIV disease severity based at baseline and follow up */ -// TODO: Replace placeholder with relevant CQL logic -define "Neutropenia": - exists "Neutropenia Condition" - or exists "Neutropenia Observation" -define "Neutropenia Condition": - Elements."Neutropenia Condition" C - where C.prevalenceInterval() starts on or before Today -define "Neutropenia Observation": - Elements."Neutropenia Observation" O +define "WHO HIV clinical stage condition or symptom D.DE289 Observation": + Elements."WHO HIV clinical stage condition or symptom D.DE289 Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Neutropenia */ +/* End of WHO HIV clinical stage condition or symptom D.DE289 */ /* @dataElement: HIV.D.DE364 - CD4 count @activity: HIV.D20 Diagnostics @description: CD4 cell count in cells/mm^3 */ -// TODO: Replace placeholder with relevant CQL logic define "CD4 count D.DE364": Elements."CD4 count D.DE364" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "CD4 count D.DE364 Value": - "CD4 count D.DE364" O - return O.value /* End of CD4 count D.DE364 */ /* @@ -6346,13 +4115,9 @@ define "Dose adjustment recommended Observation": @activity: HIV.D23 Prescribe @description: Client has been on ART, but has stopped taking it or a treatment failure is suspected */ -// TODO: Replace placeholder with relevant CQL logic -define "Suspicion of treatment failure or interruption": - exists "Suspicion of treatment failure or interruption Observation" define "Suspicion of treatment failure or interruption Observation": Elements."Suspicion of treatment failure or interruption Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Suspicion of treatment failure or interruption */ /* @@ -7957,13 +5722,9 @@ define "Presumptive TB D.DE945 Observation": @activity: HIV.D4 Screen for TB @description: Screening algorithm selected for screening activities */ -// TODO: Replace placeholder with relevant CQL logic -define "TB screening algorithm": - exists "TB screening algorithm Observation" define "TB screening algorithm Observation": Elements."TB screening algorithm Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of TB screening algorithm */ /* @@ -8223,13 +5984,9 @@ define "Other TB screening algorithm Observation": @activity: HIV.D4 Screen for TB @description: Symptoms that may indicate TB disease in clients living with HIV, based on a clinical algorithm */ -// TODO: Replace placeholder with relevant CQL logic -define "Symptoms of TB": - exists "Symptoms of TB Observation" define "Symptoms of TB Observation": Elements."Symptoms of TB Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of Symptoms of TB */ /* @@ -8435,13 +6192,9 @@ define "None Observation": @activity: HIV.D4 Screen for TB @description: Client had a history of a contact with a person with TB */ -// TODO: Replace placeholder with relevant CQL logic -define "History of contact with a person with TB": - exists "History of contact with a person with TB Observation" define "History of contact with a person with TB Observation": Elements."History of contact with a person with TB Observation" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of History of contact with a person with TB */ /* @@ -8507,14 +6260,9 @@ define "TB prevention services accepted Observation": @activity: HIV.D4 Screen for TB @description: Test result of the client's C reactive protein test result in mg/L */ -// TODO: Replace placeholder with relevant CQL logic define "C reactive protein test result": Elements."C reactive protein test result" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "C reactive protein test result Value": - "C reactive protein test result" O - return O.value /* End of C reactive protein test result */ /* @@ -9792,13 +7540,9 @@ define "Inconclusive G.DE73 Observation": @activity: HIV.B6 Capture or update client history @description: HIV status of the partner or contact given by the index case */ -// TODO: Replace placeholder with relevant CQL logic define "HIV status of partner or contact": - exists "HIV status of partner or contact Observation" -define "HIV status of partner or contact Observation": - Elements."HIV status of partner or contact Observation" O + Elements."HIV status of partner or contact" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of HIV status of partner or contact */ /* @@ -9865,13 +7609,9 @@ define "At elevated risk for HIV acquisition PRV.DE1 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: The result from HIV testing after applying the testing algorithm */ -// TODO: Replace placeholder with relevant CQL logic define "HIV test result SRV.DE2": - exists "HIV test result SRV.DE2 Observation" -define "HIV test result SRV.DE2 Observation": - Elements."HIV test result SRV.DE2 Observation" O + Elements."HIV test result SRV.DE2" O where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today /* End of HIV test result SRV.DE2 */ /* @@ -10080,4 +7820,4 @@ define "HPV DNA testing operational at the health facility Observation": /* * Custom elements and logic for use DT and IND CQL Libraries - */ \ No newline at end of file + */ diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index ccef7bbbf3b..c344d5d1da6 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -6582,9 +6582,7 @@ define "HIV test date SRV.DE1 Value": */ // TODO: Replace placeholder with relevant CQL logic define "HIV test result SRV.DE2": - exists "HIV test result SRV.DE2 Observation" -define "HIV test result SRV.DE2 Observation": - Elements."HIV test result SRV.DE2 Observation" O + Elements."HIV test result SRV.DE2" O where O.effective.toInterval() during "Measurement Period" /* End of HIV test result SRV.DE2 */ diff --git a/input/fsh/activitydefinition/HIVGuidanceCommunicationRequestActivity.fsh b/input/fsh/activitydefinition/HIVGuidanceCommunicationRequestActivity.fsh new file mode 100644 index 00000000000..b4eb923e325 --- /dev/null +++ b/input/fsh/activitydefinition/HIVGuidanceCommunicationRequestActivity.fsh @@ -0,0 +1,28 @@ +Instance: HIVGuidanceCommunicationRequestActivity +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-communicationactivity +Title: "HIVGuidanceCommunicationRequestActivity" +Description: "CommunicationRequest to provide HIV Guidance to practitioner" +Usage: #definition +* name = "HIVGuidanceCommunicationRequestActivity" +* status = #draft +* experimental = true +* date = 2024-07-25 +* publisher = "World Health Organization (WHO)" +* contact[+] + * telecom[+] + * system = #url + * value = "https://who.int" +* intent = #proposal +* doNotPerform = false +* dynamicValue[+] + * path = "status" + * expression + * description = "Status = 'draft'" + * language = #text/cql + * expression = "'draft' from \"http://hl7.org/fhir/request-status\"" +* dynamicValue[+] + * path = "priority" + * expression + * description = "Priority = 'routine'" + * language = #text/cql + * expression = "'routine' from \"http://hl7.org/fhir/request-priority\"" diff --git a/input/fsh/libraries/HIVC23DTLogic.fsh b/input/fsh/libraries/HIVC23DTLogic.fsh new file mode 100644 index 00000000000..32e92469b53 --- /dev/null +++ b/input/fsh/libraries/HIVC23DTLogic.fsh @@ -0,0 +1,19 @@ +Instance: HIVC23DTLogic +InstanceOf: Library +Title: "HIV.C23.DT Logic" +Description: "HIV.C23.DT Logic" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/hiv/Library/HIVC23DTLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "HIVC23DTLogic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-HIVC23DTLogic.cql" diff --git a/input/fsh/libraries/HIVC7DTLogic.fsh b/input/fsh/libraries/HIVC7DTLogic.fsh new file mode 100644 index 00000000000..6b75a5b2fef --- /dev/null +++ b/input/fsh/libraries/HIVC7DTLogic.fsh @@ -0,0 +1,19 @@ +Instance: HIVC7DTLogic +InstanceOf: Library +Title: "HIV.C7.DT Logic" +Description: "HIV.C7.DT Logic" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/hiv/Library/HIVC7DTLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "HIVC7DTLogic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-HIVC7DTLogic.cql" diff --git a/input/fsh/libraries/HIVD12DTLogic.fsh b/input/fsh/libraries/HIVD12DTLogic.fsh new file mode 100644 index 00000000000..d373d11c1a5 --- /dev/null +++ b/input/fsh/libraries/HIVD12DTLogic.fsh @@ -0,0 +1,19 @@ +Instance: HIVD12DTLogic +InstanceOf: Library +Title: "HIV.D12.DT Logic" +Description: "HIV.D12.DT Logic" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/hiv/Library/HIVD12DTLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "HIVD12DTLogic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-HIVD12DTLogic.cql" diff --git a/input/fsh/libraries/HIVD4DTLogic.fsh b/input/fsh/libraries/HIVD4DTLogic.fsh new file mode 100644 index 00000000000..d9b81b3839d --- /dev/null +++ b/input/fsh/libraries/HIVD4DTLogic.fsh @@ -0,0 +1,19 @@ +Instance: HIVD4DTLogic +InstanceOf: Library +Title: "HIV.D4.DT Logic" +Description: "HIV.D4.DT Logic" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/hiv/Library/HIVD4DTLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "HIVD4DTLogic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-HIVD4DTLogic.cql" diff --git a/input/fsh/plandefinition/HIVB2DT.fsh b/input/fsh/plandefinition/HIVB2DT.fsh index c01f8e6856c..f425b91a8f1 100644 --- a/input/fsh/plandefinition/HIVB2DT.fsh +++ b/input/fsh/plandefinition/HIVB2DT.fsh @@ -24,8 +24,9 @@ Usage: #definition * condition[+] * kind = #applicability * expression - * language = #text/cql - * expression = "exists(Guidance)" + * language = #text/cql-identifier + * expression = "Guidance" + * definitionCanonical = Canonical(HIVGuidanceCommunicationRequestActivity) * dynamicValue[+] * path = "description" * expression diff --git a/input/fsh/plandefinition/HIVB9DT.fsh b/input/fsh/plandefinition/HIVB9DT.fsh index 5d81073c3fc..b6ba7e2aa5a 100644 --- a/input/fsh/plandefinition/HIVB9DT.fsh +++ b/input/fsh/plandefinition/HIVB9DT.fsh @@ -206,3 +206,16 @@ Usage: #definition * description = "HIV Screening" * language = #text/cql * expression = "'171121004' from \"SNOMED-CT\" display 'HIV screening'" + * action[+] + * textEquivalent = "Send retest recommendation to provider" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Guidance" + * definitionCanonical = Canonical(HIVGuidanceCommunicationRequestActivity) + * dynamicValue[+] + * path = "description" + * expression + * language = #text/cql-identifier + * expression = "Guidance" diff --git a/input/fsh/plandefinition/HIVC23DT.fsh b/input/fsh/plandefinition/HIVC23DT.fsh new file mode 100644 index 00000000000..cd2455ec41c --- /dev/null +++ b/input/fsh/plandefinition/HIVC23DT.fsh @@ -0,0 +1,47 @@ +Instance: HIVC23DT +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition +Title: "HIV.C23.DT Determine PEP or PrEP regimen" +Description: "Determine PEP or PrEP regimen" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" +* library = Canonical(HIVC23DTLogic) +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/hiv/PlanDefinition/HIVC23DT" +* name = "HIVC23DT" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "Consolidated Guidelines on HIV Testing Services (2019)" +* action[+] + * textEquivalent = "Determine PEP or PrEP regimen" + * action[+] + * textEquivalent = "Prescribe appropriate PrEP regimen" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Recommended PrEP regimen" + * definitionCanonical = Canonical(HIVGuidanceCommunicationRequestActivity) + * dynamicValue[+] + * path = "description" + * expression + * language = #text/cql-identifier + * expression = "Guidance" + * action[+] + * textEquivalent = "Prescribe appropriate PEP regimen" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Preferred PEP backbone regimen" + * definitionCanonical = Canonical(HIVGuidanceCommunicationRequestActivity) + * dynamicValue[+] + * path = "description" + * expression + * language = #text/cql-identifier + * expression = "Guidance" diff --git a/input/fsh/plandefinition/HIVC7DT.fsh b/input/fsh/plandefinition/HIVC7DT.fsh new file mode 100644 index 00000000000..9012c7df82b --- /dev/null +++ b/input/fsh/plandefinition/HIVC7DT.fsh @@ -0,0 +1,47 @@ +Instance: HIVC7DT +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition +Title: "HIV.C7.DT Check for signs of serious illness" +Description: "Check for signs of serious illness" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" +* library = Canonical(HIVC7DTLogic) +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/hiv/PlanDefinition/HIVC7DT" +* name = "HIVC7DT" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "Consolidated Guidelines on HIV Testing Services (2019)" +* action[+] + * textEquivalent = "Check suitability for PrEP or PEP" + * action[+] + * textEquivalent = "Counsel client on PrEP. Based on answers given, client is suitable for PrEP." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Suitable for PrEP" + * definitionCanonical = Canonical(HIVGuidanceCommunicationRequestActivity) + * dynamicValue[+] + * path = "payload[+].contentString" + * expression + * language = #text/cql-identifier + * expression = "Guidance" + * action[+] + * textEquivalent = "Client is ineligible for PrEP based on answers given." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Not suitable for PrEP" + * definitionCanonical = Canonical(HIVGuidanceCommunicationRequestActivity) + * dynamicValue[+] + * path = "payload[+].contentString" + * expression + * language = #text/cql-identifier + * expression = "Guidance" diff --git a/input/fsh/plandefinition/HIVD12DT.fsh b/input/fsh/plandefinition/HIVD12DT.fsh new file mode 100644 index 00000000000..64601d75790 --- /dev/null +++ b/input/fsh/plandefinition/HIVD12DT.fsh @@ -0,0 +1,27 @@ +Instance: HIVD12DT +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition +Title: "HIV.D12.Determine recommended screenings and tests" +Description: "Determine recommended screenings and tests" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" +* library = Canonical(HIVD12DTLogic) +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/hiv/PlanDefinition/HIVD4DT" +* name = "HIVD4DT" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "Consolidated Guidelines on HIV Testing Services (2019)" +* action[+] + * textEquivalent = "Recommended screenings and tests" + * definitionCanonical = Canonical(HIVGuidanceCommunicationRequestActivity) + * dynamicValue[+] + * path = "payload[+].contentString" + * expression + * language = #text/cql-identifier + * expression = "Guidance" diff --git a/input/fsh/plandefinition/HIVD4DT.fsh b/input/fsh/plandefinition/HIVD4DT.fsh new file mode 100644 index 00000000000..313c1dac855 --- /dev/null +++ b/input/fsh/plandefinition/HIVD4DT.fsh @@ -0,0 +1,27 @@ +Instance: HIVD4DT +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition +Title: "HIV.D4.DT TB Screening Decision Tables" +Description: "Screen for TB using one of three algorithms" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" +* library = Canonical(HIVD4DTLogic) +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/hiv/PlanDefinition/HIVD4DT" +* name = "HIVD4DT" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "Consolidated Guidelines on HIV Testing Services (2019)" +* action[+] + * textEquivalent = "Outcome of TB screening" + * definitionCanonical = Canonical(HIVGuidanceCommunicationRequestActivity) + * dynamicValue[+] + * path = "payload[+].contentString" + * expression + * language = #text/cql-identifier + * expression = "Guidance"