From b6eb9b9c037622379ec75fbad7d7709607b3fb96 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Fri, 6 Dec 2024 11:09:05 -0800 Subject: [PATCH] Integration and cleanup of profiling work (#61) * Profiling integration * Additional integration, fixes, and updates * Additional integration, fixes, and updates * Post-discussion fixes * Build fixes * Small fix * CQL fixes * Profiling * Additional profiling work * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Froze dependency versions --- input/cql/HIVConcepts.cql | 5 +- input/cql/HIVElements.cql | 84 +++--- input/cql/HIVEncounterElements.cql | 282 ++++-------------- input/cql/HIVIND27Logic.cql | 6 + input/cql/HIVIND2Logic.cql | 5 + input/cql/HIVIND70Logic.cql | 8 +- input/cql/HIVIND71Logic.cql | 11 +- input/cql/HIVIND72Logic.cql | 18 +- input/cql/HIVIND73Logic.cql | 14 +- input/cql/HIVIND74Logic.cql | 7 + input/cql/HIVIND75Logic.cql | 17 +- input/cql/HIVIND88Logic.cql | 21 +- input/cql/HIVIND89Logic.cql | 11 +- input/cql/HIVIND91Logic.cql | 7 + input/cql/HIVIND92Logic.cql | 12 +- input/cql/HIVIND93Logic.cql | 7 + input/cql/HIVIND94Logic.cql | 8 + input/cql/HIVIND95Logic.cql | 16 +- input/cql/HIVIND96Logic.cql | 28 +- input/cql/HIVIND9Logic.cql | 5 +- input/cql/HIVIndicatorElements.cql | 83 +++--- input/cql/cql-options.json | 19 ++ .../examples/HivCervicalCancerScreening.fsh | 10 + .../HivElevatedRiskForAcquisition.fsh | 2 +- input/fsh/examples/HivHcvTest.fsh | 11 + .../HivInvasiveCervicalCancerDiagnosis.fsh | 11 + .../HivInvasiveCervicalCancerTreatment.fsh | 10 + input/fsh/examples/HivKeyPopulation.fsh | 2 +- input/fsh/examples/HivOnArt.fsh | 2 +- input/fsh/examples/HivPatient.fsh | 3 +- input/fsh/examples/HivPepPrescriptions.fsh | 30 +- input/fsh/examples/HivPrepPrescriptions.fsh | 11 +- .../examples/HivPreventionIntervention.fsh | 9 + input/fsh/examples/HivStatusCondition.fsh | 3 +- input/fsh/examples/HivTest.fsh | 7 +- input/fsh/examples/HivVmmcProcedure.fsh | 8 + ...sh => HIvTreatmentMedicationStatement.fsh} | 9 +- .../HivAltPepBackbonePrescription.fsh | 1 - .../profiles/HivAltThirdPepPrescription.fsh | 1 - .../fsh/profiles/HivAntiRetroviralEpisode.fsh | 8 + .../profiles/HivAntiRetroviralTreatment.fsh | 8 + .../profiles/HivCervicalCancerScreening.fsh | 11 + input/fsh/profiles/HivCondition.fsh | 8 + .../HivCurrentPrepRegimenPrescription.fsh | 1 - ...HivElevatedHivAcquisitionRiskCondition.fsh | 8 + input/fsh/profiles/HivGonorrhoeaTest.fsh | 7 + input/fsh/profiles/HivGonorrhoeaTreatment.fsh | 9 + input/fsh/profiles/HivHBsAgTest.fsh | 9 + input/fsh/profiles/HivHcvTest.fsh | 6 + input/fsh/profiles/HivHcvTreatment.fsh | 8 + input/fsh/profiles/HivHcvViralLoadTest.fsh | 6 + input/fsh/profiles/HivHivTest.fsh | 7 + input/fsh/profiles/HivHtsVisit.fsh | 9 + .../HivInvasiveCervicalCancerDiagnosis.fsh | 8 + .../HivInvasiveCervicalCancerTreatment.fsh | 8 + ...{HivTest.fsh => HivLabTestObservation.fsh} | 10 +- .../fsh/profiles/HivLabTestServiceRequest.fsh | 8 + input/fsh/profiles/HivLabTestSpecimen.fsh | 6 + .../HivPepBackboneAlternativeTreatment.fsh | 10 + ...h => HivPepBackbonePreferredTreatment.fsh} | 7 +- .../HivPepThirdAlternativeTreatment.fsh | 10 + ....fsh => HivPreferredThirdPepTreatment.fsh} | 7 +- ...ctPrescription.fsh => HivPrepTreament.fsh} | 6 +- .../profiles/HivPreventionIntervention.fsh | 11 + .../fsh/profiles/HivScreeningObservation.fsh | 0 input/fsh/profiles/HivStiServices.fsh | 8 + input/fsh/profiles/HivTreatmentProcedure.fsh | 8 + input/fsh/profiles/HivVmmcAdverseEvent.fsh | 8 + input/fsh/profiles/HivVmmcProcedure.fsh | 9 + input/fsh/valuesets/HIV.D.DE789.fsh | 2 +- sushi-config.yaml | 4 +- todo.md | 65 ++++ 72 files changed, 669 insertions(+), 435 deletions(-) create mode 100644 input/cql/cql-options.json create mode 100644 input/fsh/examples/HivCervicalCancerScreening.fsh create mode 100644 input/fsh/examples/HivHcvTest.fsh create mode 100644 input/fsh/examples/HivInvasiveCervicalCancerDiagnosis.fsh create mode 100644 input/fsh/examples/HivInvasiveCervicalCancerTreatment.fsh create mode 100644 input/fsh/examples/HivPreventionIntervention.fsh create mode 100644 input/fsh/examples/HivVmmcProcedure.fsh rename input/fsh/profiles/{HivPrepActive.fsh => HIvTreatmentMedicationStatement.fsh} (54%) create mode 100644 input/fsh/profiles/HivAntiRetroviralEpisode.fsh create mode 100644 input/fsh/profiles/HivAntiRetroviralTreatment.fsh create mode 100644 input/fsh/profiles/HivCervicalCancerScreening.fsh create mode 100644 input/fsh/profiles/HivCondition.fsh create mode 100644 input/fsh/profiles/HivElevatedHivAcquisitionRiskCondition.fsh create mode 100644 input/fsh/profiles/HivGonorrhoeaTest.fsh create mode 100644 input/fsh/profiles/HivGonorrhoeaTreatment.fsh create mode 100644 input/fsh/profiles/HivHBsAgTest.fsh create mode 100644 input/fsh/profiles/HivHcvTest.fsh create mode 100644 input/fsh/profiles/HivHcvTreatment.fsh create mode 100644 input/fsh/profiles/HivHcvViralLoadTest.fsh create mode 100644 input/fsh/profiles/HivHivTest.fsh create mode 100644 input/fsh/profiles/HivHtsVisit.fsh create mode 100644 input/fsh/profiles/HivInvasiveCervicalCancerDiagnosis.fsh create mode 100644 input/fsh/profiles/HivInvasiveCervicalCancerTreatment.fsh rename input/fsh/profiles/{HivTest.fsh => HivLabTestObservation.fsh} (78%) create mode 100644 input/fsh/profiles/HivLabTestServiceRequest.fsh create mode 100644 input/fsh/profiles/HivLabTestSpecimen.fsh create mode 100644 input/fsh/profiles/HivPepBackboneAlternativeTreatment.fsh rename input/fsh/profiles/{HivPreferredPepBackbonePrescription.fsh => HivPepBackbonePreferredTreatment.fsh} (75%) create mode 100644 input/fsh/profiles/HivPepThirdAlternativeTreatment.fsh rename input/fsh/profiles/{HivPreferredThirdPepPrescription.fsh => HivPreferredThirdPepTreatment.fsh} (76%) rename input/fsh/profiles/{HivPrepProductPrescription.fsh => HivPrepTreament.fsh} (81%) create mode 100644 input/fsh/profiles/HivPreventionIntervention.fsh create mode 100644 input/fsh/profiles/HivScreeningObservation.fsh create mode 100644 input/fsh/profiles/HivStiServices.fsh create mode 100644 input/fsh/profiles/HivTreatmentProcedure.fsh create mode 100644 input/fsh/profiles/HivVmmcAdverseEvent.fsh create mode 100644 input/fsh/profiles/HivVmmcProcedure.fsh create mode 100644 todo.md diff --git a/input/cql/HIVConcepts.cql b/input/cql/HIVConcepts.cql index 5d4d3166ee2..fc564cf4f65 100644 --- a/input/cql/HIVConcepts.cql +++ b/input/cql/HIVConcepts.cql @@ -388,7 +388,7 @@ code "Prevention services offered and referrals - HIV.B.DE149": 'HIV.B.DE149' fr code "Offer male and female condoms and condom-compatible lubricants - HIV.B.DE150": 'HIV.B.DE150' from "HIVConcepts" display 'Offer male and female condoms and condom-compatible lubricants' code "Offer pre-exposure prophylaxis PrEP for people at elevated risk for HIV acquisition": 'HIV.B.DE151' from "HIVConcepts" display 'Offer pre-exposure prophylaxis PrEP for people at elevated risk for HIV acquisition' code "Offer post-exposure prophylaxis PEP following suspected exposure": 'HIV.B.DE152' from "HIVConcepts" display 'Offer post-exposure prophylaxis PEP following suspected exposure' -code "Voluntary medical male circumcision VMMC": 'HIV.B.DE153' from "HIVConcepts" display 'Voluntary medical male circumcision VMMC' +code "Voluntary medical male circumcision VMMC referral": 'HIV.B.DE153' from "HIVConcepts" display 'Voluntary medical male circumcision VMMC referral offered' code "Harm reduction for people who inject drugs - HIV.B.DE154": 'HIV.B.DE154' from "HIVConcepts" display 'Harm reduction for people who inject drugs' code "Behavioural interventions to support risk reduction, particularly for people with HIV and members of key populations": 'HIV.B.DE155' from "HIVConcepts" display 'Behavioural interventions to support risk reduction, particularly for people with HIV and members of key populations' code "HIV testing for partners and biological children - HIV.B.DE156": 'HIV.B.DE156' from "HIVConcepts" display 'HIV testing for partners and biological children' @@ -417,6 +417,7 @@ code "Type of follow-up appointment - HIV.B.DE191": 'HIV.B.DE191' from "HIVConce code "Retesting for HIV - HIV.B.DE192": 'HIV.B.DE192' from "HIVConcepts" display 'Retesting for HIV' code "Other - HIV.B.DE193": 'HIV.B.DE193' from "HIVConcepts" display 'Other' code "Date/time of follow-up appointment - HIV.B.DE195": 'HIV.B.DE195' from "HIVConcepts" display 'Date/time of follow-up appointment' +code "VMMC procedure": 'HIV.B.DE197' from "HIVConcepts" display 'VMMC procedure performed' code "VMMC procedure date": 'HIV.B.DE198' from "HIVConcepts" display 'VMMC procedure date' code "Adverse event severity": 'HIV.B.DE201' from "HIVConcepts" display 'Adverse event severity' code "Moderate": 'HIV.B.DE202' from "HIVConcepts" display 'Moderate' @@ -560,7 +561,7 @@ code "Follow-up appointment for PrEP": 'HIV.C.DE127' from "HIVConcepts" display code "Other - HIV.C.DE128": 'HIV.C.DE128' from "HIVConcepts" display 'Other' code "Prevention services offered and referrals - HIV.C.DE131": 'HIV.C.DE131' from "HIVConcepts" display 'Prevention services offered and referrals' code "Male and female condoms and condom-compatible lubricants offered": 'HIV.C.DE132' from "HIVConcepts" display 'Male and female condoms and condom-compatible lubricants offered' -code "Voluntary medical male circumcision VMMC referral": 'HIV.C.DE133' from "HIVConcepts" display 'Voluntary medical male circumcision VMMC referral' +code "Voluntary medical male circumcision VMMC referral - HIV.C.DE133": 'HIV.C.DE133' from "HIVConcepts" display 'Voluntary medical male circumcision VMMC referral' code "Harm reduction for people who inject drugs - HIV.C.DE134": 'HIV.C.DE134' from "HIVConcepts" display 'Harm reduction for people who inject drugs' code "Behavioural interventions to support risk reduction - HIV.C.DE135": 'HIV.C.DE135' from "HIVConcepts" display 'Behavioural interventions to support risk reduction' code "Condom type": 'HIV.C.DE138' from "HIVConcepts" display 'Condom type' diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index d9a1375d088..0b8be825dc9 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -138,13 +138,10 @@ define "Viral load tests received after ART intitiation": @activity: HIV.A2 Gather client details @description: The date and time of the client's visit */ -// TODO: Replace placeholder with relevant CQL logic define "Visit date A.DE3": - [Observation: Concepts."Visit date - HIV.A.DE3"] O - where O.status in { 'final', 'amended', 'corrected' } -define "Visit date A.DE3 Value": - "Visit date A.DE3" O - return O.value + [Encounter] E + where E.type.coding.code contains Concepts."HIV testing services visit".code + /* End of Visit date A.DE3 */ /* @@ -289,17 +286,17 @@ define "Other A.DE23 Observation": @activity: HIV.B1 Determine reason for visit @description: Encounter for HIV testing services visit */ -define "HTS Visit Encounter": +define "HTS Visit": [Encounter] E where E.type.coding.code contains ConceptsCustom."HTS Visit".code - + /* @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": - "HTS Visit Encounter" E + "HTS Visit" E return E.reasonCode /* End of Reason for visit B.DE1 */ @@ -309,7 +306,7 @@ define "Reason for visit B.DE1": @description: First encounter for screening for human immunodeficiency virus */ define "First-time HIV test Encounter": - "HTS Visit Encounter" E + "HTS Visit" E where E.reasonCode.coding.code contains Concepts."First-time HIV test".code /* End of First-time HIV test */ @@ -320,7 +317,7 @@ define "First-time HIV test Encounter": */ // TODO: Replace placeholder with relevant CQL logic define "Retesting for HIV B.DE3 Encounter": - "HTS Visit Encounter" E + "HTS Visit" E where E.reasonCode.coding.code contains Concepts."Retesting for HIV - HIV.B.DE3".code /* End of Retesting for HIV B.DE3 */ @@ -331,7 +328,7 @@ define "Retesting for HIV B.DE3 Encounter": */ // TODO: Replace placeholder with relevant CQL logic define "HIV testing services visit Encounter": - "HTS Visit Encounter" E + "HTS Visit" E where E.reasonCode.coding.code contains Concepts."HIV testing services visit".code /* End of HIV testing services visit */ @@ -1720,11 +1717,11 @@ define "Voluntary medical male circumcision VMMC": exists "Voluntary medical male circumcision VMMC Condition" or exists "Voluntary medical male circumcision VMMC Observation" define "Voluntary medical male circumcision VMMC Condition": - [Condition: Concepts."Voluntary medical male circumcision VMMC"] + [Condition: Concepts."Voluntary medical male circumcision VMMC referral"] define "Voluntary medical male circumcision VMMC Observation": "Prevention services offered and referrals B.DE149 Observation" O where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Voluntary medical male circumcision VMMC" + and O.value ~ Concepts."Voluntary medical male circumcision VMMC referral" /* End of Voluntary medical male circumcision VMMC */ /* @@ -6261,10 +6258,8 @@ define "HBV treatment TDF start date": */ define "HCV test date D.DE169": - [Procedure] P - where P.status = 'completed' - and P.code ~ ConceptsCustom."HCV test" - + "HCV test result D.DE170" O + return O.effective.toInterval().low /* End of HCV test date D.DE169 */ @@ -9511,8 +9506,8 @@ define "Other medications Observation": */ define "Date of cervical cancer screening test": - "Cervical cancer primary screening test type" P - sort by start of performed.toInterval() + "Cervical cancer primary screening test" O + return O.effective.toInterval().low /* End of Date of cervical cancer screening test */ /* @@ -9536,10 +9531,12 @@ define "Lifetime screening test number Value": @description: Type of cervical cancer screening test used in primary screening */ -define "Cervical cancer primary screening test type": - [Procedure] P - where P.status = 'completed' - and P.category ~ ConceptsCustom."cervical cancer screening test" +define "Cervical cancer primary screening test": + [Observation] O + where O.status in { 'final', 'amended', 'corrected' } + and O.code in Concepts."Cervical cancer primary screening test type Choices" + + // and P.category ~ Concepts."Procedure" we could /* End of Cervical cancer primary screening test type */ /* @@ -9549,7 +9546,7 @@ define "Cervical cancer primary screening test type": */ define "HPV-DNA": - "Cervical cancer primary screening test type" P + "Cervical cancer primary screening test" P where P.code ~ Concepts."HPV-DNA" /* End of HPV-DNA */ @@ -9560,7 +9557,7 @@ define "HPV-DNA": */ define "VIA": - "Cervical cancer primary screening test type" P + "Cervical cancer primary screening test" P where P.code ~ Concepts."VIA" /* End of VIA */ @@ -9571,7 +9568,7 @@ define "VIA": */ define "Cervical cytology": - "Cervical cancer primary screening test type" P + "Cervical cancer primary screening test" P where P.code ~ Concepts."Cervical cytology" /* End of Cervical cytology */ @@ -9582,7 +9579,7 @@ define "Cervical cytology": */ define "Other D.DE662": - "Cervical cancer primary screening test type" P + "Cervical cancer primary screening test" P where P.code ~ Concepts."Other - HIV.D.DE662" /* End of Other D.DE662 */ @@ -9591,13 +9588,7 @@ define "Other D.DE662": @activity: HIV.D28 Offer other services @description: Date of diagnosis of cervical precancer lesions or invasive cervical cancer */ -// TODO: Replace placeholder with relevant CQL logic -define "Date of diagnosis of cervical precancer lesions or invasive cervical cancer": - [Observation: Concepts."Date of diagnosis of cervical precancer lesions or invasive cervical cancer"] O - where O.status in { 'final', 'amended', 'corrected' } -define "Date of diagnosis of cervical precancer lesions or invasive cervical cancer Value": - "Date of diagnosis of cervical precancer lesions or invasive cervical cancer" O - return O.value + /* End of Date of diagnosis of cervical precancer lesions or invasive cervical cancer */ /* @@ -9673,7 +9664,8 @@ define "Cervical precancer lesions": */ define "Invasive cervical cancer": - [Condition: Concepts."Invasive cervical cancer"] + [Condition: Concepts."Invasive cervical cancer"] C + where exists (C.clinicalStatus.coding CStatus where CStatus.code in { 'active', 'recurrence', 'relapse' }) /* End of Invasive cervical cancer */ @@ -9752,7 +9744,7 @@ define "Stage IV": define "Date of treatment for cervical precancer lesions": [Procedure] P where P.status = 'completed' - and P.category ~ ConceptsCustom."cervical precancer lesion treatment" + and P.code in Concepts."Invasive cervical cancer treatment method Choices" /* End of Date of treatment for cervical precancer lesions */ /* @@ -9778,8 +9770,8 @@ define "Invasive cervical cancer treatment episode Value": define "Invasive cervical cancer treatment method": [Procedure] P - where P.status = 'completed' - and P.category ~ ConceptsCustom."Invasive cervical cancer treatment" + where P.status in { 'completed', 'in-progress' } + and P.code in Concepts."Invasive cervical cancer treatment method Choices" /* End of Invasive cervical cancer treatment method */ @@ -14275,12 +14267,10 @@ define "STI services date": define "VMMC": [Procedure] P where P.status = 'completed' - and P.code ~ Concepts."Voluntary medical male circumcision VMMC" + and P.code ~ Concepts."VMMC procedure" define "VMMC date": - [Procedure] P - where P.status = 'completed' - and P.code ~ Concepts."Voluntary medical male circumcision VMMC" + "VMMC" P return start of P.performed.toInterval() /* End of VMMC */ @@ -14344,8 +14334,7 @@ define "HIV-positive PRV.DE12 Condition": [Condition: Concepts."HIV-positive - HIV.PRV.DE12"] define "HIV-positive PRV.DE12 Observation": "HIV status of contact Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."HIV-positive - HIV.PRV.DE12" + where O.value ~ Concepts."HIV-positive - HIV.PRV.DE12" /* End of HIV-positive PRV.DE12 */ /* @@ -14374,8 +14363,10 @@ define "HIV-negative PRV.DE13 Observation": define "Unknown PRV.DE14": exists "Unknown PRV.DE14 Condition" or exists "Unknown PRV.DE14 Observation" + define "Unknown PRV.DE14 Condition": [Condition: Concepts."Unknown - HIV.PRV.DE14"] + define "Unknown PRV.DE14 Observation": "HIV status of contact Observation" O where O.status in { 'final', 'amended', 'corrected' } @@ -14618,9 +14609,10 @@ define "Viral load test result SRV.DE13 Value": @activity: HIV.A2 Gather client details @description: The date and time of the client's visit */ - +// TODO: MARK as visit? define "Visit date SRV.DE15": [Encounter] E + return E.period /* End of Visit date SRV.DE15 */ /* diff --git a/input/cql/HIVEncounterElements.cql b/input/cql/HIVEncounterElements.cql index d9b0a81fe4d..39a64d75a86 100644 --- a/input/cql/HIVEncounterElements.cql +++ b/input/cql/HIVEncounterElements.cql @@ -30,14 +30,12 @@ context Patient @activity: HIV.A2 Gather client details @description: The date and time of the client's visit */ -// TODO: Replace placeholder with relevant CQL logic define "Visit date A.DE3": - Elements."Visit date A.DE3" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + 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" O - return O.value + "Visit date A.DE3" E + return E.period.start /* End of Visit date A.DE3 */ /* @@ -189,7 +187,7 @@ define "Other A.DE23 Observation": @description: Reason for HIV testing services visit */ define "Reason for visit B.DE1": - Elements."HTS Visit Encounter" E + Elements."HTS Visit" E where E.partOf.references(EncounterId) or E.period.start = Today return E.reasonCode @@ -255,13 +253,10 @@ define "Date/time of suspected exposure to HIV B.DE14 Value": @activity: HIV.B6 Capture or update client history @description: Client is currently pregnant */ -// TODO: Replace placeholder with relevant CQL logic define "Currently pregnant B.DE29": - exists "Currently pregnant B.DE29 Observation" -define "Currently pregnant B.DE29 Observation": - Elements."Currently pregnant B.DE29 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + exists Elements."Currently pregnant B.DE29" C + where C.prevalenceInterval() starts on or before Today + or C.encounter.references(EncounterId) /* End of Currently pregnant B.DE29 */ /* @@ -1677,9 +1672,7 @@ define "At elevated risk for HIV acquisition B.DE225": */ // TODO: Replace placeholder with relevant CQL logic define "Syphilis test result B.DE250": - exists "Syphilis test result B.DE250 Observation" -define "Syphilis test result B.DE250 Observation": - Elements."Syphilis test result B.DE250 Observation" O + Elements."Syphilis test result B.DE250" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Syphilis test result B.DE250 */ @@ -1689,18 +1682,9 @@ define "Syphilis test result B.DE250 Observation": @activity: HIV.B23 Offer sexual and reproductive health services @description: Test result is positive for syphilis */ -// TODO: Replace placeholder with relevant CQL logic define "Positive B.DE251": - exists "Positive B.DE251 Condition" - or exists "Positive B.DE251 Observation" -define "Positive B.DE251 Condition": - Elements."Positive B.DE251 Condition" C - where C.prevalenceInterval() starts on or before Today - or C.encounter.references(EncounterId) -define "Positive B.DE251 Observation": - Elements."Positive B.DE251 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + exists "Syphilis test result B.DE250" O + where O.value ~ Concepts."Positive - HIV.B.DE251" /* End of Positive B.DE251 */ /* @@ -1708,17 +1692,9 @@ define "Positive B.DE251 Observation": @activity: HIV.B23 Offer sexual and reproductive health services @description: Test result is negative for syphilis */ -// TODO: Replace placeholder with relevant CQL logic define "Negative B.DE252": - exists "Negative B.DE252 Condition" - or exists "Negative B.DE252 Observation" -define "Negative B.DE252 Condition": - Elements."Negative B.DE252 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Negative B.DE252 Observation": - Elements."Negative B.DE252 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + exists "Syphilis test result B.DE250" O + where O.value ~ Concepts."Negative - HIV.B.DE252" /* End of Negative B.DE252 */ /* @@ -1726,17 +1702,9 @@ define "Negative B.DE252 Observation": @activity: HIV.B23 Offer sexual and reproductive health services @description: Test result is inconclusive */ -// TODO: Replace placeholder with relevant CQL logic define "Inconclusive B.DE253": - exists "Inconclusive B.DE253 Condition" - or exists "Inconclusive B.DE253 Observation" -define "Inconclusive B.DE253 Condition": - Elements."Inconclusive B.DE253 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Inconclusive B.DE253 Observation": - Elements."Inconclusive B.DE253 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + exists "Syphilis test result B.DE250" O + where O.value ~ Concepts."Inconclusive - HIV.B.DE253" /* End of Inconclusive B.DE253 */ /* @@ -3691,13 +3659,10 @@ define "Established on ART Observation": @activity: HIV.D8 Capture or update client history @description: Whether the client is ART naive or is restarting ART */ -// TODO: Replace placeholder with relevant CQL logic define "ART start type": - exists "ART start type Observation" -define "ART start type Observation": - Elements."ART start type Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + Elements."ART start type" MS + where MS.effective.toInterval() starts on or before Today + or MS.context.references(EncounterId) /* End of ART start type */ /* @@ -3705,17 +3670,10 @@ define "ART start type Observation": @activity: HIV.D8 Capture or update client history @description: Client is ART naive, having never taken ART to treat HIV before */ -// TODO: Replace placeholder with relevant CQL logic define "First-time user of ART": - exists "First-time user of ART Condition" - or exists "First-time user of ART Observation" -define "First-time user of ART Condition": - Elements."First-time user of ART Condition" C - where C.prevalenceInterval() starts on or before Today -define "First-time user of ART Observation": - Elements."First-time user of ART Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + Elements."First-time user of ART" MS + where MS.effective.toInterval() starts on or before Today + or MS.context.references(EncounterId) /* End of First-time user of ART */ /* @@ -3723,17 +3681,10 @@ define "First-time user of ART Observation": @activity: HIV.D8 Capture or update client history @description: Client is restarting ART after stopping treatment for any reason */ -// TODO: Replace placeholder with relevant CQL logic define "Restarting ART": - exists "Restarting ART Condition" - or exists "Restarting ART Observation" -define "Restarting ART Condition": - Elements."Restarting ART Condition" C - where C.prevalenceInterval() starts on or before Today -define "Restarting ART Observation": - Elements."Restarting ART Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + Elements."Restarting ART" MS + where MS.effective.toInterval() starts on or before Today + or MS.context.references(EncounterId) /* End of Restarting ART */ /* @@ -4435,11 +4386,8 @@ define "STI testing and treatment D.DE160 Observation": @activity: HIV.D12 Determine recommended screenings and tests @description: Hepatitis B virus test result (HBsAg) */ -// TODO: Replace placeholder with relevant CQL logic define "HBsAg test result D.DE162": - exists "HBsAg test result D.DE162 Observation" -define "HBsAg test result D.DE162 Observation": - Elements."HBsAg test result D.DE162 Observation" O + 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 */ @@ -4449,15 +4397,8 @@ define "HBsAg test result D.DE162 Observation": @activity: HIV.D12 Determine recommended screenings and tests @description: HBsAg test result was positive */ -// TODO: Replace placeholder with relevant CQL logic define "Positive D.DE163": - exists "Positive D.DE163 Condition" - or exists "Positive D.DE163 Observation" -define "Positive D.DE163 Condition": - Elements."Positive D.DE163 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Positive D.DE163 Observation": - Elements."Positive D.DE163 Observation" O + Elements."Positive D.DE163" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Positive D.DE163 */ @@ -4467,15 +4408,8 @@ define "Positive D.DE163 Observation": @activity: HIV.D12 Determine recommended screenings and tests @description: HBsAg test result was negative */ -// TODO: Replace placeholder with relevant CQL logic define "Negative D.DE164": - exists "Negative D.DE164 Condition" - or exists "Negative D.DE164 Observation" -define "Negative D.DE164 Condition": - Elements."Negative D.DE164 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Negative D.DE164 Observation": - Elements."Negative D.DE164 Observation" O + Elements."Negative D.DE164" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Negative D.DE164 */ @@ -4485,15 +4419,8 @@ define "Negative D.DE164 Observation": @activity: HIV.D12 Determine recommended screenings and tests @description: HBsAg test result was indeterminate */ -// TODO: Replace placeholder with relevant CQL logic define "Indeterminate D.DE165": - exists "Indeterminate D.DE165 Condition" - or exists "Indeterminate D.DE165 Observation" -define "Indeterminate D.DE165 Condition": - Elements."Indeterminate D.DE165 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Indeterminate D.DE165 Observation": - Elements."Indeterminate D.DE165 Observation" O + Elements."Indeterminate D.DE165" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Indeterminate D.DE165 */ @@ -4503,11 +4430,8 @@ define "Indeterminate D.DE165 Observation": @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 "HCV test result D.DE170": - exists "HCV test result D.DE170 Observation" -define "HCV test result D.DE170 Observation": - Elements."HCV test result D.DE170 Observation" O + 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 */ @@ -4517,15 +4441,8 @@ define "HCV test result D.DE170 Observation": @activity: HIV.D12 Determine recommended screenings and tests @description: HCV test result was positive */ -// TODO: Replace placeholder with relevant CQL logic -define "Positive D.DE171": - exists "Positive D.DE171 Condition" - or exists "Positive D.DE171 Observation" -define "Positive D.DE171 Condition": - Elements."Positive D.DE171 Condition" C - where C.prevalenceInterval() starts on or before Today define "Positive D.DE171 Observation": - Elements."Positive D.DE171 Observation" O + Elements."Positive D.DE171" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Positive D.DE171 */ @@ -4535,15 +4452,8 @@ define "Positive D.DE171 Observation": @activity: HIV.D12 Determine recommended screenings and tests @description: HCV test result was negative */ -// TODO: Replace placeholder with relevant CQL logic define "Negative D.DE172": - exists "Negative D.DE172 Condition" - or exists "Negative D.DE172 Observation" -define "Negative D.DE172 Condition": - Elements."Negative D.DE172 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Negative D.DE172 Observation": - Elements."Negative D.DE172 Observation" O + Elements."Negative D.DE172" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Negative D.DE172 */ @@ -4553,15 +4463,8 @@ define "Negative D.DE172 Observation": @activity: HIV.D12 Determine recommended screenings and tests @description: HCV test result was indeterminate */ -// TODO: Replace placeholder with relevant CQL logic define "Indeterminate D.DE173": - exists "Indeterminate D.DE173 Condition" - or exists "Indeterminate D.DE173 Observation" -define "Indeterminate D.DE173 Condition": - Elements."Indeterminate D.DE173 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Indeterminate D.DE173 Observation": - Elements."Indeterminate D.DE173 Observation" O + Elements."Indeterminate D.DE173" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Indeterminate D.DE173 */ @@ -7107,14 +7010,11 @@ define "Other medications Observation": @activity: HIV.D28 Offer other services @description: Date of cervical cancer screening test */ -// TODO: Replace placeholder with relevant CQL logic define "Date of cervical cancer screening test": - Elements."Date of cervical cancer screening test" O + Elements."Cervical cancer primary screening test" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today -define "Date of cervical cancer screening test Value": - "Date of cervical cancer screening test" O - return O.value + return O.effective.toInterval().low /* End of Date of cervical cancer screening test */ /* @@ -7138,10 +7038,10 @@ define "Lifetime screening test number Value": @description: Type of cervical cancer screening test used in primary screening */ // TODO: Replace placeholder with relevant CQL logic -define "Cervical cancer primary screening test type": +define "Cervical cancer primary screening test": exists "Cervical cancer primary screening test type Observation" define "Cervical cancer primary screening test type Observation": - Elements."Cervical cancer primary screening test type Observation" O + Elements."Cervical cancer primary screening test" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Cervical cancer primary screening test type */ @@ -7151,15 +7051,8 @@ define "Cervical cancer primary screening test type Observation": @activity: HIV.D28 Offer other services @description: Screened for cervical cancer using HPV-DNA test */ -// TODO: Replace placeholder with relevant CQL logic define "HPV-DNA": - exists "HPV-DNA Condition" - or exists "HPV-DNA Observation" -define "HPV-DNA Condition": - Elements."HPV-DNA Condition" C - where C.prevalenceInterval() starts on or before Today -define "HPV-DNA Observation": - Elements."HPV-DNA Observation" O + Elements."HPV-DNA" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of HPV-DNA */ @@ -7169,15 +7062,8 @@ define "HPV-DNA Observation": @activity: HIV.D28 Offer other services @description: Screened for cervical cancer using visual inspection with acetic acid (VIA) */ -// TODO: Replace placeholder with relevant CQL logic define "VIA": - exists "VIA Condition" - or exists "VIA Observation" -define "VIA Condition": - Elements."VIA Condition" C - where C.prevalenceInterval() starts on or before Today -define "VIA Observation": - Elements."VIA Observation" O + Elements."VIA" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of VIA */ @@ -7187,15 +7073,8 @@ define "VIA Observation": @activity: HIV.D28 Offer other services @description: Screened for cervical cancer using cervical cytology */ -// TODO: Replace placeholder with relevant CQL logic define "Cervical cytology": - exists "Cervical cytology Condition" - or exists "Cervical cytology Observation" -define "Cervical cytology Condition": - Elements."Cervical cytology Condition" C - where C.prevalenceInterval() starts on or before Today -define "Cervical cytology Observation": - Elements."Cervical cytology Observation" O + Elements."Cervical cytology" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Cervical cytology */ @@ -7205,15 +7084,8 @@ define "Cervical cytology Observation": @activity: HIV.D28 Offer other services @description: Screened for cervical cancer using other method */ -// TODO: Replace placeholder with relevant CQL logic define "Other D.DE662": - exists "Other D.DE662 Condition" - or exists "Other D.DE662 Observation" -define "Other D.DE662 Condition": - Elements."Other D.DE662 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Other D.DE662 Observation": - Elements."Other D.DE662 Observation" O + Elements."Other D.DE662" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Other D.DE662 */ @@ -7586,17 +7458,10 @@ define "Terfenadine Observation": @activity: HIV.D21 Determine regimen and treatment options @description: TDF currently being taken by, or considered for, client */ -// TODO: Replace placeholder with relevant CQL logic define "TDF D.DE912": - exists "TDF D.DE912 Condition" - or exists "TDF D.DE912 Observation" -define "TDF D.DE912 Condition": - Elements."TDF D.DE912 Condition" C - where C.prevalenceInterval() starts on or before Today -define "TDF D.DE912 Observation": - Elements."TDF D.DE912 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + Elements."TDF D.DE912" MS + where MS.effective.toInterval() starts on or before Today + or MS.context.references(EncounterId) /* End of TDF D.DE912 */ /* @@ -8584,11 +8449,8 @@ define "History of contact with a person with TB Observation": @activity: HIV.D4 Screen for TB @description: Record the result of the tuberculosis (TB) screening */ -// TODO: Replace placeholder with relevant CQL logic define "TB screening result": - exists "TB screening result Observation" -define "TB screening result Observation": - Elements."TB screening result Observation" O + Elements."TB screening result" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of TB screening result */ @@ -8598,15 +8460,8 @@ define "TB screening result Observation": @activity: HIV.D4 Screen for TB @description: Screening result was positive for tuberculosis (TB) */ -// TODO: Replace placeholder with relevant CQL logic define "Screen positive for TB": - exists "Screen positive for TB Condition" - or exists "Screen positive for TB Observation" -define "Screen positive for TB Condition": - Elements."Screen positive for TB Condition" C - where C.prevalenceInterval() starts on or before Today -define "Screen positive for TB Observation": - Elements."Screen positive for TB Observation" O + Elements."Screen positive for TB" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Screen positive for TB */ @@ -8616,15 +8471,8 @@ define "Screen positive for TB Observation": @activity: HIV.D4 Screen for TB @description: Screening result was negative for tuberculosis (TB) */ -// TODO: Replace placeholder with relevant CQL logic define "Screen negative for TB": - exists "Screen negative for TB Condition" - or exists "Screen negative for TB Observation" -define "Screen negative for TB Condition": - Elements."Screen negative for TB Condition" C - where C.prevalenceInterval() starts on or before Today -define "Screen negative for TB Observation": - Elements."Screen negative for TB Observation" O + Elements."Screen negative for TB" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Screen negative for TB */ @@ -8634,15 +8482,8 @@ define "Screen negative for TB Observation": @activity: HIV.D4 Screen for TB @description: Screening result was inconclusive for tuberculosis (TB) */ -// TODO: Replace placeholder with relevant CQL logic define "Inconclusive D.DE989": - exists "Inconclusive D.DE989 Condition" - or exists "Inconclusive D.DE989 Observation" -define "Inconclusive D.DE989 Condition": - Elements."Inconclusive D.DE989 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Inconclusive D.DE989 Observation": - Elements."Inconclusive D.DE989 Observation" O + Elements."Inconclusive D.DE989" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today /* End of Inconclusive D.DE989 */ @@ -8681,14 +8522,12 @@ define "C reactive protein test result Value": @activity: HIV.E1 Capture or update mother's history @description: The date and time of the client's ANC contact (in the ANC DAK this is called 'Contact date') */ -// TODO: Replace placeholder with relevant CQL logic define "ANC contact date E.DE85": - Elements."ANC contact date E.DE85" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "ANC contact date E.DE85 Value": - "ANC contact date E.DE85" O - return O.value + Elements."Antenatal care contact" E + where E.period.toInterval() starts on or before Today + or E.partOf.references(EncounterId) + return E.period + /* End of ANC contact date E.DE85 */ /* @@ -10069,13 +9908,10 @@ define "ART start date SRV.DE6 Value": @activity: HIV.B6 Capture or update client history @description: Client is currently pregnant */ -// TODO: Replace placeholder with relevant CQL logic define "Currently pregnant SRV.DE7": - exists "Currently pregnant SRV.DE7 Observation" -define "Currently pregnant SRV.DE7 Observation": - Elements."Currently pregnant SRV.DE7 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + Elements."Currently pregnant SRV.DE7 Condition" C + where C.prevalenceInterval() starts on or before Today + or C.encounter.references(EncounterId) /* End of Currently pregnant SRV.DE7 */ /* @@ -10130,12 +9966,8 @@ define "Viral load test result SRV.DE13 Value": */ // TODO: Replace placeholder with relevant CQL logic define "Visit date SRV.DE15": - Elements."Visit date SRV.DE15" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "Visit date SRV.DE15 Value": - "Visit date SRV.DE15" O - return O.value + Elements."Visit date SRV.DE15" p + where p starts on or before Today /* End of Visit date SRV.DE15 */ /* diff --git a/input/cql/HIVIND27Logic.cql b/input/cql/HIVIND27Logic.cql index 3113188e34c..146697a7716 100644 --- a/input/cql/HIVIND27Logic.cql +++ b/input/cql/HIVIND27Logic.cql @@ -61,6 +61,12 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ +/* + * Profiles: + * - HIVStatusCondition + * - HIVStatusObservation + * - HIVAntiRetroviralTreatment + library HIVIND27Logic // Included Libraries diff --git a/input/cql/HIVIND2Logic.cql b/input/cql/HIVIND2Logic.cql index 6970f0fe22c..51701307d81 100644 --- a/input/cql/HIVIND2Logic.cql +++ b/input/cql/HIVIND2Logic.cql @@ -81,6 +81,11 @@ * Suggested Scoring Method: continuous-variable | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cv-measure-cqfm */ +/** + * Profiles: + * + */ + library HIVIND2Logic // Included Libraries diff --git a/input/cql/HIVIND70Logic.cql b/input/cql/HIVIND70Logic.cql index 52b0196948e..226fa5f45d4 100644 --- a/input/cql/HIVIND70Logic.cql +++ b/input/cql/HIVIND70Logic.cql @@ -98,6 +98,12 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ + /* + * Profiles: + * - HivGonorhoeaTest + * - HivPreventionIntervention + */ + library HIVIND70Logic // Included Libraries @@ -132,7 +138,7 @@ define "Initial Population": */ define "Numerator": - HIE."Gonorrhoea test date B.DE255" + HIE."Gonorrhoea test result B.DE256" and HIE."Date accessed HIV prevention intervention" diff --git a/input/cql/HIVIND71Logic.cql b/input/cql/HIVIND71Logic.cql index 9961c6ab395..59704556fd4 100644 --- a/input/cql/HIVIND71Logic.cql +++ b/input/cql/HIVIND71Logic.cql @@ -91,6 +91,13 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ + /* + * Profiles: + * - HivGonorhoeaTest + * - HivStatusObservation + * - HivStatusCondition + */ + library HIVIND71Logic // Included Libraries @@ -126,7 +133,7 @@ define "Initial Population": define "Numerator": HIE."Has HIV-positive Status" and - HIE."Gonorrhoea test date B.DE255" + HIE."Gonorrhoea test result B.DE256" /** @@ -138,7 +145,7 @@ define "Numerator": define "Denominator": HIE."Has HIV-positive Status" and - HIE."Visit date SRV.DE15" + HIE."Visit date" /* end Populations */ diff --git a/input/cql/HIVIND72Logic.cql b/input/cql/HIVIND72Logic.cql index ee4846daae1..71d78af000c 100644 --- a/input/cql/HIVIND72Logic.cql +++ b/input/cql/HIVIND72Logic.cql @@ -107,6 +107,14 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ + /* + * Profiles: + * - HivGonorrhoeaTest + * - HivStatusObservation + * - HivStatusCondition + * - HivPreventionServices + */ + library HIVIND72Logic // Included Libraries @@ -141,9 +149,7 @@ define "Initial Population": */ define "Numerator": - exists(HE."Positive B.DE257" G - with HE."Gonorrhoea test date B.DE255" P - such that G.partOf.references(P) and P.performed.toInterval() during "Measurement Period") + exists(HIE."Positive B.DE257") /** @@ -154,9 +160,9 @@ define "Numerator": */ define "Denominator": - exists(HE."Gonorrhoea test date B.DE255" P - where P.performed.toInterval() during "Measurement Period" - and exists (HE."Date accessed HIV prevention intervention" t where t = start of P.performed.toInterval())) + exists(HE."Gonorrhoea test date B.DE255" d + where d during "Measurement Period" + and exists (HE."Date accessed HIV prevention intervention" t where t = d)) /* end Populations */ diff --git a/input/cql/HIVIND73Logic.cql b/input/cql/HIVIND73Logic.cql index 6ecc63dfc80..9e9dd396fd5 100644 --- a/input/cql/HIVIND73Logic.cql +++ b/input/cql/HIVIND73Logic.cql @@ -97,6 +97,13 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ + /* + * Profiles: + * - HivGonorrhoeaTest + * - HivStatusObservation + * - HivStatusCondition + */ + library HIVIND73Logic // Included Libraries @@ -132,10 +139,7 @@ define "Initial Population": define "Numerator": HIE."Has HIV-positive Status" and - exists(HE."Positive B.DE257" G - with HE."Gonorrhoea test date B.DE255" P - such that G.partOf.references(P) and P.performed.toInterval() during "Measurement Period") - + exists(HIE."Positive B.DE257" G) /** * Denominator @@ -146,7 +150,7 @@ define "Numerator": define "Denominator": HIE."Has HIV-positive Status" and - HIE."Gonorrhoea test date B.DE255" + HIE."Gonorrhoea test result B.DE256": /* end Populations */ diff --git a/input/cql/HIVIND74Logic.cql b/input/cql/HIVIND74Logic.cql index 165697d2b0c..09e16806aa1 100644 --- a/input/cql/HIVIND74Logic.cql +++ b/input/cql/HIVIND74Logic.cql @@ -82,6 +82,13 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ + /* + * Profiles: + * - HivGonorrhoeaTest + * - HivStatusObservation + * - HivStatusCondition + */ + library HIVIND74Logic // Included Libraries diff --git a/input/cql/HIVIND75Logic.cql b/input/cql/HIVIND75Logic.cql index cc6d07e8faa..16d44a1da3a 100644 --- a/input/cql/HIVIND75Logic.cql +++ b/input/cql/HIVIND75Logic.cql @@ -73,6 +73,15 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ + + /* + * Profiles: + * - HivGonorrhoeaTest + * - HivStatusObservation + * - HivStatusCondition + * - GonorrhoeaTreatment + */ + library HIVIND75Logic // Included Libraries @@ -108,9 +117,7 @@ define "Initial Population": define "Numerator": HIE."Has HIV-positive Status" - and exists(HE."Positive B.DE257" G - with HE."Gonorrhoea test date B.DE255" P - such that G.partOf.references(P) and P.performed.toInterval() during "Measurement Period") + and HIE."Positive B.DE257" and HIE."Gonorrhoea treatment start date B.DE260" @@ -124,9 +131,7 @@ HIE."Has HIV-positive Status" define "Denominator": HIE."Has HIV-positive Status" - and exists(HE."Positive B.DE257" G - with HE."Gonorrhoea test date B.DE255" P - such that G.partOf.references(P) and P.performed.toInterval() during "Measurement Period") + and HIE."Positive B.DE257" /* end Populations */ diff --git a/input/cql/HIVIND88Logic.cql b/input/cql/HIVIND88Logic.cql index 3c98293044a..c0d4a133002 100644 --- a/input/cql/HIVIND88Logic.cql +++ b/input/cql/HIVIND88Logic.cql @@ -73,6 +73,12 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ + /* + * Profiles: + * - HivHcvTest + * - HivPreventionIntervention + */ + library HIVIND88Logic // Included Libraries @@ -107,10 +113,8 @@ define "Initial Population": */ define "Numerator": - exists(HE."Positive D.DE171" G - with HE."HCV test date D.DE169" P - such that G.partOf.references(P) and P.performed.toInterval() during "Measurement Period" - and exists (HE."Date accessed HIV prevention intervention" t where t = start of P.performed.toInterval())) + exists(HIE."Positive D.DE171" O + where exists HIE."Date accessed HIV prevention intervention" t where t = start of O.effective.toInterval()) /** @@ -121,12 +125,11 @@ define "Numerator": */ define "Denominator": - exists(HE."HCV test date D.DE169" P - where P.performed.toInterval() during "Measurement Period" - and exists (HE."Date accessed HIV prevention intervention" t where t = start of P.performed.toInterval())) - + exists( + HIE."HCV test result D.DE170" O + where exists(HIE."Date accessed HIV prevention intervention" t where t = start of O.effective.toInterval())) -/* end Populations */ +/* end Populations */ /* * Disaggregators diff --git a/input/cql/HIVIND89Logic.cql b/input/cql/HIVIND89Logic.cql index d3e01c7bf43..56287e9ac5a 100644 --- a/input/cql/HIVIND89Logic.cql +++ b/input/cql/HIVIND89Logic.cql @@ -71,6 +71,11 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ + /* + * Profiles: + * - HivHcvTest + */ + library HIVIND89Logic // Included Libraries @@ -107,10 +112,7 @@ define "Initial Population": define "Numerator": HIE."Has HIV-positive Status" and - exists(HE."Positive D.DE171" G - with HE."HCV test date D.DE169" P - such that G.partOf.references(P) and P.performed.toInterval() during "Measurement Period") - + exists(HIE."Positive D.DE171") /** * Denominator @@ -122,7 +124,6 @@ define "Numerator": define "Denominator": HIE."Has HIV-positive Status" and HIE."HCV test date D.DE169" - /* end Populations */ diff --git a/input/cql/HIVIND91Logic.cql b/input/cql/HIVIND91Logic.cql index 68c34944a81..14ad0f0e374 100644 --- a/input/cql/HIVIND91Logic.cql +++ b/input/cql/HIVIND91Logic.cql @@ -76,6 +76,13 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ +/* + * Profiles: + * - HivStatus + * - HcvTreatment + * - HcvViralLoadResult + */ + library HIVIND91Logic // Included Libraries diff --git a/input/cql/HIVIND92Logic.cql b/input/cql/HIVIND92Logic.cql index acbbd38ea04..b6e88c66f9b 100644 --- a/input/cql/HIVIND92Logic.cql +++ b/input/cql/HIVIND92Logic.cql @@ -74,6 +74,13 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ +/* + * Profiles: + * - HivStatus + * - HcvTreatment + * - HcvViralLoadResult + */ + library HIVIND92Logic // Included Libraries @@ -109,10 +116,7 @@ define "Initial Population": define "Numerator": HIE."Has HIV-positive Status" and - exists(HE."Positive D.DE171" G - with HE."HCV test date D.DE169" P - such that G.partOf.references(P) and P.performed.toInterval() during "Measurement Period") and - HIE."HCV treatment completion date" and + exists(HIE."HCV treatment completion date" d) and exists( HE."Not detected D.DE181" O with HE."HCV viral load test date D.DE178" P diff --git a/input/cql/HIVIND93Logic.cql b/input/cql/HIVIND93Logic.cql index 39a8279b4a9..182d8d412b5 100644 --- a/input/cql/HIVIND93Logic.cql +++ b/input/cql/HIVIND93Logic.cql @@ -43,6 +43,13 @@ * Suggested Scoring Method: continuous-variable | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cv-measure-cqfm */ + /* + * Profiles: + * - HIVStatusCondition + * - HIVStatusObservation + * - HivCervicalCancerScreening + */ + library HIVIND93Logic // Included Libraries diff --git a/input/cql/HIVIND94Logic.cql b/input/cql/HIVIND94Logic.cql index 4bba85c3664..fa476423570 100644 --- a/input/cql/HIVIND94Logic.cql +++ b/input/cql/HIVIND94Logic.cql @@ -48,6 +48,14 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ +/* + * Profiles: + * - HIVStatusCondition + * - HIVStatusObservation + * - CervicalCancerScreening + * - CervicalCancerScreeningOutcome + */ + library HIVIND94Logic // Included Libraries diff --git a/input/cql/HIVIND95Logic.cql b/input/cql/HIVIND95Logic.cql index b772238405d..94972b50599 100644 --- a/input/cql/HIVIND95Logic.cql +++ b/input/cql/HIVIND95Logic.cql @@ -58,6 +58,15 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ +/* + * Profiles: + * - HIVStatusCondition + * - HIVStatusObservation + * - Patient + * - InvasiveCervicalCancerDiagnosis + * - InvasiveCervicalCancerTreatment +*/ + library HIVIND95Logic // Included Libraries @@ -94,10 +103,9 @@ define "Initial Population": define "Numerator": HIE."Has HIV-positive Status" and - HIE."Invasive cervical cancer" and - exists HE."Invasive cervical cancer treatment method" P - where P.performed after start of "Measurement Period" - + HIE."Invasive cervical cancer" C and + exists HIE."Invasive cervical cancer treatment method" P + where P.performed after start of C.prevalenceInterval() /** * Denominator diff --git a/input/cql/HIVIND96Logic.cql b/input/cql/HIVIND96Logic.cql index 85063967186..36db6c0c7e4 100644 --- a/input/cql/HIVIND96Logic.cql +++ b/input/cql/HIVIND96Logic.cql @@ -52,6 +52,14 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ +// Profiles: +/* + - HIVStatusCondition + - HIVStatusObservation + - Patient + - InvasiveCervicalCancerDiagnosis + */ + library HIVIND96Logic // Included Libraries @@ -87,10 +95,7 @@ define "Initial Population": define "Numerator": HIE."Has HIV-positive Status" and - exists (HE."Invasive cervical cancer" C - where C.prevalenceInterval() starts before start of "Measurement Period" - and C.prevalenceInterval() starts after (start of "Measurement Period" - 12 months) - ) + exists (HIE."Invasive cervical cancer in the last 12 months" C) /** @@ -100,11 +105,9 @@ define "Numerator": */ define "Numerator Exclusions": - exists (HE."Invasive cervical cancer" C - where C.prevalenceInterval() starts before start of "Measurement Period" - and C.prevalenceInterval() starts after (start of "Measurement Period" - 12 months) - and (HE."Death documented" after start of C.prevalenceInterval() and - HE."Death documented" before (start of C.prevalenceInterval() + 12 months)) + exists (HIE."Invasive cervical cancer in the last 12 months" C where + ( HE."Death documented" after start of C.prevalenceInterval() and + HE."Death documented" before (start of C.prevalenceInterval() + 12 months)) ) @@ -117,11 +120,8 @@ define "Numerator Exclusions": define "Denominator": HIE."Has HIV-positive Status" and - exists (HE."Invasive cervical cancer" C - where C.prevalenceInterval() starts before start of "Measurement Period" - and C.prevalenceInterval() starts after (start of "Measurement Period" - 12 months)) - - + exists(HIE."Invasive cervical cancer in the last 12 months" C) + /* end Populations */ /* diff --git a/input/cql/HIVIND9Logic.cql b/input/cql/HIVIND9Logic.cql index 05721809ba9..07cbab65481 100644 --- a/input/cql/HIVIND9Logic.cql +++ b/input/cql/HIVIND9Logic.cql @@ -57,6 +57,10 @@ * Suggested Scoring Method: proportion | http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm */ + /* + * Profiles: + * - + library HIVIND9Logic // Included Libraries @@ -90,7 +94,6 @@ define "Initial Population": define "Numerator": true - /** * Denominator * diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index b2fafb87f51..ccef7bbbf3b 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -295,13 +295,14 @@ define "HIV status of partner or contact": @activity: HIV.A2 Gather client details @description: The date and time of the client's visit */ -// TODO: Replace placeholder with relevant CQL logic -define "Visit date A.DE3": - Elements."Visit date A.DE3" O - where O.effective.toInterval() during "Measurement Period" -define "Visit date A.DE3 Value": - "Visit date A.DE3" O - return O.value +define "HTS Visit": + Elements."HTS Visit" E + where E.period.toInterval() during "Measurement Period" + +define "Visit date": + "HTS Visit" E + return E.period.start + /* End of Visit date A.DE3 */ /* @@ -1119,7 +1120,7 @@ define "VMMC_adverse_event": [AdverseEvent] AE with [Procedure] P such that AE.suspectEntity.instance.references(P) and P.status = 'completed' - and P.code ~ Concepts."Voluntary medical male circumcision VMMC" + and P.code ~ Concepts."Voluntary medical male circumcision VMMC referral" and P.performed after start of "Measurement Period" and P.performed before end of "Measurement Period" and AE.date <= (P.performed + 30 days) @@ -1149,7 +1150,7 @@ define "VMMC_adverse_event_Intraoperative": [AdverseEvent] AE with [Procedure] P such that AE.suspectEntity.instance.references(P) and P.status = 'completed' - and P.code ~ Concepts."Voluntary medical male circumcision VMMC" + and P.code ~ Concepts."Voluntary medical male circumcision VMMC referral" and P.performed after start of "Measurement Period" and P.performed before end of "Measurement Period" and AE.date = P.performed @@ -1159,7 +1160,7 @@ define "VMMC_adverse_event_Postoperative": [AdverseEvent] AE with [Procedure] P such that AE.suspectEntity.instance.references(P) and P.status = 'completed' - and P.code ~ Concepts."Voluntary medical male circumcision VMMC" + and P.code ~ Concepts."Voluntary medical male circumcision VMMC referral" and P.performed after start of "Measurement Period" and P.performed before end of "Measurement Period" and AE.date <= (P.performed + 30 days) @@ -1790,8 +1791,8 @@ define "Syphilis treatment start date B.DE254": */ define "Gonorrhoea test date B.DE255": - exists(Elements."Gonorrhoea test date B.DE255" P - where P.performed.toInterval() during "Measurement Period") + "Gonorrhoea test result B.DE256" O + return O.effective /* End of Gonorrhoea test date B.DE255 */ /* @@ -1801,8 +1802,9 @@ define "Gonorrhoea test date B.DE255": */ define "Gonorrhoea test result B.DE256": - exists(Elements."Gonorrhoea test result B.DE256" O - where O.effective.toInterval() during "Measurement Period") + Elements."Gonorrhoea test result B.DE256" O + where O.effective.toInterval() during "Measurement Period" + /* End of Gonorrhoea test result B.DE256 */ /* @@ -1812,8 +1814,8 @@ define "Gonorrhoea test result B.DE256": */ define "Positive B.DE257": - exists Elements."Positive B.DE257" O - where O.effective.toInterval() during "Measurement Period" + exists(Elements."Positive B.DE257" O + where O.effective.toInterval() during "Measurement Period") /* End of Positive B.DE257 */ /* @@ -2752,9 +2754,9 @@ define "HBV treatment TDF start date": */ define "HCV test date D.DE169": - exists(Elements."HCV test date D.DE169" P - where P.performed.toInterval() during "Measurement Period") - + "HCV test result D.DE170" O + return O.effective.toInterval().low + /* End of HCV test date D.DE169 */ /* @@ -2764,7 +2766,7 @@ define "HCV test date D.DE169": */ define "HCV test result D.DE170": - exists Elements."HCV test result D.DE170" O + Elements."HCV test result D.DE170" O where O.effective.toInterval() during "Measurement Period" /* End of HCV test result D.DE170 */ @@ -2775,7 +2777,7 @@ define "HCV test result D.DE170": */ define "Positive D.DE171": - exists Elements."Positive D.DE171" O + Elements."Positive D.DE171" O where O.effective.toInterval() during "Measurement Period" /* End of Positive D.DE171 */ @@ -3739,8 +3741,8 @@ define "Enhanced adherence counselling provided Observation": */ define "Date of cervical cancer screening test": - exists Elements."Date of cervical cancer screening test" P - where P.performed during "Measurement Period" + exists Elements."Date of cervical cancer screening test" d + where d during "Measurement Period" /* End of Date of cervical cancer screening test */ /* @@ -3765,13 +3767,6 @@ define "Lifetime screening test number Value": @activity: HIV.D28 Offer other services @description: Date of diagnosis of cervical precancer lesions or invasive cervical cancer */ -// TODO: Replace placeholder with relevant CQL logic -define "Date of diagnosis of cervical precancer lesions or invasive cervical cancer": - Elements."Date of diagnosis of cervical precancer lesions or invasive cervical cancer" O - where O.effective.toInterval() during "Measurement Period" -define "Date of diagnosis of cervical precancer lesions or invasive cervical cancer Value": - "Date of diagnosis of cervical precancer lesions or invasive cervical cancer" O - return O.value /* End of Date of diagnosis of cervical precancer lesions or invasive cervical cancer */ /* @@ -3850,6 +3845,16 @@ define "Invasive cervical cancer": exists Elements."Invasive cervical cancer" C where C.prevalenceInterval() overlaps "Measurement Period" +define "Invasive cervical cancer diagnosis in the last 12 months": + Elements."Invasive cervical cancer" C + where C.prevalenceInterval() starts before start of "Measurement Period" + and C.prevalenceInterval() starts after (start of "Measurement Period" - 12 months) + +define "Invasive cervical cancer outside the last 12 months": + Elements."Invasive cervical cancer" C + where C.prevalenceInterval() starts before (start of "Measurement Period" - 12 months) + or C.prevalenceInterval() starts after (start of "Measurement Period" - 24 months) + /* End of Invasive cervical cancer */ /* @@ -6400,7 +6405,7 @@ define "Other PRV.DE8": */ define "Date accessed HIV prevention intervention": - exists (Elements."Date accessed HIV prevention intervention" t where t included in "Measurement Period") + Elements."Date accessed HIV prevention intervention" t where t included in "Measurement Period" /* End of Date accessed HIV prevention intervention */ /* @@ -6457,17 +6462,7 @@ define "HIV-negative PRV.DE13 Observation": @activity: HIV.B6 Capture or update client history @description: Client does not know contact's HIV status */ -// TODO: Replace placeholder with relevant CQL logic -define "Unknown PRV.DE14": - exists "Unknown PRV.DE14 Condition" - or exists "Unknown PRV.DE14 Observation" -define "Unknown PRV.DE14 Condition": - Elements."Unknown PRV.DE14 Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Unknown PRV.DE14 Observation": - Elements."Unknown PRV.DE14 Observation" O - where O.effective.toInterval() during "Measurement Period" + /* End of Unknown PRV.DE14 */ /* @@ -6680,8 +6675,8 @@ define "Viral load test result SRV.DE13 Value": */ define "Visit date SRV.DE15": - exists(Elements."Visit date SRV.DE15" E - where start of E.period.toInterval() during "Measurement Period") + exists(Elements."Visit date SRV.DE15" p + where start of p during "Measurement Period") /* End of Visit date SRV.DE15 */ /* diff --git a/input/cql/cql-options.json b/input/cql/cql-options.json new file mode 100644 index 00000000000..9a8f51e050f --- /dev/null +++ b/input/cql/cql-options.json @@ -0,0 +1,19 @@ +{ + "options":[ + "EnableAnnotations", + "EnableLocators", + "DisableListDemotion", + "DisableListPromotion" + ], + "formats":[ + "JSON" + ], + "validateUnits":true, + "verifyOnly":false, + "errorLevel":"Info", + "signatureLevel":"Overloads", + "compatibilityLevel":"1.5", + "analyzeDataRequirements":false, + "collapseDataRequirements":true + } + \ No newline at end of file diff --git a/input/fsh/examples/HivCervicalCancerScreening.fsh b/input/fsh/examples/HivCervicalCancerScreening.fsh new file mode 100644 index 00000000000..ae3120ec26b --- /dev/null +++ b/input/fsh/examples/HivCervicalCancerScreening.fsh @@ -0,0 +1,10 @@ +Instance: ExampleCervicalCancerScreening +InstanceOf: HivCervicalCancerScreening +Title: "Example Cervical Cancer Screening Procedure" +Description: "An example of a cervical cancer screening procedure." + +* status = #completed +* category = http://snomed.info/sct#103693007 "Diagnostic procedure" +* code = HIVConcepts#HIV.D.DE706 +* subject = Reference(Patient/ExampleHivPatient) +* effectiveDateTime = "2020-01-01T13:00:00Z" diff --git a/input/fsh/examples/HivElevatedRiskForAcquisition.fsh b/input/fsh/examples/HivElevatedRiskForAcquisition.fsh index c700f4a5e6b..9b9262a4451 100644 --- a/input/fsh/examples/HivElevatedRiskForAcquisition.fsh +++ b/input/fsh/examples/HivElevatedRiskForAcquisition.fsh @@ -5,5 +5,5 @@ Description: "This is an example of an Elevated HIV Risk Condition resource base * verificationStatus = #confirmed * code = HIVConcepts#HIV.B.DE225 -* subject = Reference(Patient/example-hiv-patient) +* subject = Reference(Patient/ExampleHivPatient) * onsetDateTime = "2023-01-11T10:00:00Z" \ No newline at end of file diff --git a/input/fsh/examples/HivHcvTest.fsh b/input/fsh/examples/HivHcvTest.fsh new file mode 100644 index 00000000000..17c20c33da9 --- /dev/null +++ b/input/fsh/examples/HivHcvTest.fsh @@ -0,0 +1,11 @@ +Instance: ExampleHcvTestObservation +InstanceOf: HivHcvTest +Title: "Example HCV Test Observation" +Description: "An example of an HCV test observation based on the HivHcvTest profile." +* status = #final +* code = HIVConcepts#HIV.D.DE170 "HCV test result" +* category = http://terminology.hl7.org/CodeSystem/observation-category#laboratory +* subject = Reference(Patient/ExampleHivPatient) +* effectiveDateTime = "2023-11-01T10:00:00Z" +* issued = "2023-11-02T15:00:00Z" +* valueCodeableConcept = HIVConcepts#HIV.D.DE170 diff --git a/input/fsh/examples/HivInvasiveCervicalCancerDiagnosis.fsh b/input/fsh/examples/HivInvasiveCervicalCancerDiagnosis.fsh new file mode 100644 index 00000000000..3df404ef000 --- /dev/null +++ b/input/fsh/examples/HivInvasiveCervicalCancerDiagnosis.fsh @@ -0,0 +1,11 @@ +Instance: ExampleHivInvasiveCervicalCancerDiagnosis +InstanceOf: HivInvasiveCervicalCancerDiagnosis +Title: "Example Invasive Cervical Cancer Diagnosis" +Description: "This is an example of an Invasive Cervical Cancer Diagnosis Condition resource based on the HivInvasiveCervicalCancerDiagnosis profile." +* meta.profile = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* code = HIVConcepts#HIV.D.DE711 "Invasive Cervical Cancer Diagnosis" +* subject = Reference(Patient/ExampleHivPatient) +* clinicalStatus = http://terminology.hl7.org/CodeSystem/condition-clinical#active +* verificationStatus = http://terminology.hl7.org/CodeSystem/condition-ver-status#confirmed +* onsetDateTime = "2023-10-01" diff --git a/input/fsh/examples/HivInvasiveCervicalCancerTreatment.fsh b/input/fsh/examples/HivInvasiveCervicalCancerTreatment.fsh new file mode 100644 index 00000000000..a6d023467ae --- /dev/null +++ b/input/fsh/examples/HivInvasiveCervicalCancerTreatment.fsh @@ -0,0 +1,10 @@ +Instance: ExampleHivInvasiveCervicalCancerTreatment +InstanceOf: HivInvasiveCervicalCancerTreatment +Title: "Example Invasive Cervical Cancer Treatment Procedure" +Description: "This is an example of an Invasive Cervical Cancer Treatment Procedure resource based on the HivInvasiveCervicalCancerTreatment profile." +* status = #completed +* code = HIVConcepts#HIV.D.DE734 +* subject = Reference(Patient/ExampleHivPatient) +* performer.actor = Reference(Practitioner/ExampleSurgeon) +* reasonReference = Reference(Condition/ExampleHivInvasiveCervicalCancerDiagnosis) +* performedDateTime = "2019-01-01T10:30:00Z" diff --git a/input/fsh/examples/HivKeyPopulation.fsh b/input/fsh/examples/HivKeyPopulation.fsh index b82b10b75b1..e16128e9ea0 100644 --- a/input/fsh/examples/HivKeyPopulation.fsh +++ b/input/fsh/examples/HivKeyPopulation.fsh @@ -6,6 +6,6 @@ Description: "This is an example of an HIV Key Population Observation resource b * status = #final * category = http://terminology.hl7.org/CodeSystem/observation-category#social-history * code = HIVConcepts#HIV.B.DE50 "Key Population Status" -* subject = Reference(Patient/HivPatient) +* subject = Reference(Patient/ExampleHivPatient) * effectiveDateTime = "2023-01-12T14:00:00Z" * valueCodeableConcept = HIVConcepts#HIV.B.DE52 "Men who have sex with men" diff --git a/input/fsh/examples/HivOnArt.fsh b/input/fsh/examples/HivOnArt.fsh index 538ed6fb459..c053a5227af 100644 --- a/input/fsh/examples/HivOnArt.fsh +++ b/input/fsh/examples/HivOnArt.fsh @@ -5,6 +5,6 @@ Description: "This is an example of an On ART Medication Statement resource base * status = #active * medicationCodeableConcept = HIVConcepts#HIV.D.DE91 -* subject = Reference(Patient/example-hiv-patient) +* subject = Reference(Patient/ExampleHivPatient) * effectiveDateTime = "2022-01-17T12:00:00Z" * reasonCode = HIVConcepts#HIV.D.DE38 diff --git a/input/fsh/examples/HivPatient.fsh b/input/fsh/examples/HivPatient.fsh index 93911766bf1..bc911a6f83f 100644 --- a/input/fsh/examples/HivPatient.fsh +++ b/input/fsh/examples/HivPatient.fsh @@ -1,4 +1,3 @@ Instance: ExampleHivPatient InstanceOf: HivPatient - -* id = "example-hiv-patient" \ No newline at end of file +* id = "ExampleHivPatient" diff --git a/input/fsh/examples/HivPepPrescriptions.fsh b/input/fsh/examples/HivPepPrescriptions.fsh index 5d23f2c7da9..c04d80a6d82 100644 --- a/input/fsh/examples/HivPepPrescriptions.fsh +++ b/input/fsh/examples/HivPepPrescriptions.fsh @@ -1,45 +1,43 @@ Instance: ExamplePreferredPepBackbonePrescription -InstanceOf: HivPreferredPepBackbonePrescription +InstanceOf: HivPepBackbonePreferredTreatment Title: "Example Preferred PEP Backbone Prescription" Description: "This is an example of a preferred PEP backbone prescription resource based on the PreferredPepBackbonePrescription profile." * status = #completed -* intent = #order * medicationCodeableConcept = HIVConcepts#HIV.C.DE92 "TDF + 3TC" -* subject = Reference(Patient/example-hiv-patient) -* authoredOn = "2023-01-12T14:00:00Z" +* subject = Reference(Patient/ExampleHivPatient) +* effectiveDateTime = "2023-01-12T14:00:00Z" Instance: ExampleAltPepBackbonePrescription -InstanceOf: HivAltPepBackbonePrescription +InstanceOf: HivPepBackboneAlternativeTreatment Title: "Example Alternative PEP Backbone Prescription" Description: "This is an example of an alternative PEP backbone prescription resource based on the AltPepBackbonePrescription profile." * status = #completed -* intent = #order * medicationCodeableConcept = HIVConcepts#HIV.C.DE96 "ABC + 3TC" -* subject = Reference(Patient/example-hiv-patient) -* authoredOn = "2023-01-11T14:00:00Z" +* subject = Reference(Patient/ExampleHivPatient) +* effectiveDateTime = "2023-01-11T14:00:00Z" Instance: ExamplePreferredThirdPepPrescription -InstanceOf: HivPreferredThirdPepPrescription +InstanceOf: HivPepThirdPreferredTreatment Title: "Example Preferred Third PEP Prescription" Description: "This is an example of a preferred third PEP prescription resource based on the PreferredThirdPepPrescription profile." * status = #completed -* intent = #order * medicationCodeableConcept = HIVConcepts#HIV.C.DE100 "DTG" -* subject = Reference(Patient/example-hiv-patient) -* authoredOn = "2023-01-14T14:00:00Z" +* subject = Reference(Patient/ExampleHivPatient) + +* effectiveDateTime = "2023-01-14T14:00:00Z" Instance: ExampleAltThirdPepPrescription -InstanceOf: HivAltThirdPepPrescription +InstanceOf: HivPepThirdAlternativeTreatment Title: "Example Alternative Third PEP Prescription" Description: "This is an example of an alternative Third PEP prescription resource based on the AltThirdPepPrescription profile." * status = #completed -* intent = #order * medicationCodeableConcept = HIVConcepts#HIV.C.DE103 "DRV/r" -* subject = Reference(Patient/example-hiv-patient) -* authoredOn = "2023-01-10T14:00:00Z" +* subject = Reference(Patient/ExampleHivPatient) + +* effectiveDateTime = "2023-01-10T14:00:00Z" diff --git a/input/fsh/examples/HivPrepPrescriptions.fsh b/input/fsh/examples/HivPrepPrescriptions.fsh index 0d1c3300ffa..a477fe42176 100644 --- a/input/fsh/examples/HivPrepPrescriptions.fsh +++ b/input/fsh/examples/HivPrepPrescriptions.fsh @@ -1,13 +1,12 @@ Instance: ExamplePrepProductPrescription -InstanceOf: HivPrepProductPrescription +InstanceOf: HivPrepTreatment Title: "Example PrEP Product Prescription" Description: "This is an example of a PREP Product Prescription resource based on the PrepProductPrescription profile." * status = #completed -* intent = #order * medicationCodeableConcept = HIVConcepts#HIV.C.DE81 -* subject = Reference(Patient/example-hiv-patient) -* authoredOn = "2023-01-05T10:00:00Z" +* subject = Reference(Patient/ExampleHivPatient) +* effectiveDateTime = "2023-01-05T10:00:00Z" Instance: ExampleCurrentPrepRegimenPrescription InstanceOf: HivCurrentPrepRegimenPrescription @@ -15,7 +14,7 @@ Title: "Example Current PrEP Regimen Prescription" Description: "This is an example of a current PrEP regimen prescription resource based on the CurrentPrepRegimen profile." * status = #completed -* intent = #order * medicationCodeableConcept = HIVConcepts#HIV.C.DE19 "TDF" -* subject = Reference(Patient/example-hiv-patient) +* subject = Reference(Patient/ExampleHivPatient) +* intent = #order * authoredOn = "2023-01-06T10:00:00Z" diff --git a/input/fsh/examples/HivPreventionIntervention.fsh b/input/fsh/examples/HivPreventionIntervention.fsh new file mode 100644 index 00000000000..2707861ec2d --- /dev/null +++ b/input/fsh/examples/HivPreventionIntervention.fsh @@ -0,0 +1,9 @@ +Instance: ExampleHivPreventionIntervention +InstanceOf: HivPreventionIntervention +Title: "Example HIV Prevention Intervention Observation" +Description: "An example of an HIV Prevention Intervention observation resource based on the HivPreventionIntervention profile." +* status = #final +* code = HIVConcepts#HIV.PRV.DE2 "HIV Prevention Intervention" +* subject = Reference(Patient/ExampleHivPatient) +* effectiveDateTime = "2023-10-20T14:00:00Z" +* valueCodeableConcept = HIVConcepts#HIV.PRV.DE2 diff --git a/input/fsh/examples/HivStatusCondition.fsh b/input/fsh/examples/HivStatusCondition.fsh index 032ee278a29..10e39d848e1 100644 --- a/input/fsh/examples/HivStatusCondition.fsh +++ b/input/fsh/examples/HivStatusCondition.fsh @@ -6,5 +6,6 @@ Description: "This is an example of an HIV Positive Status Condition resource ba * clinicalStatus = #active * category = http://terminology.hl7.org/CodeSystem/condition-category#encounter-diagnosis * code = HIVConcepts#HIV.B.DE116 -* subject = Reference(Patient/example-hiv-patient) +* subject = Reference(Patient/ExampleHivPatient) + * onsetDateTime = "2023-01-15T08:30:00Z" \ No newline at end of file diff --git a/input/fsh/examples/HivTest.fsh b/input/fsh/examples/HivTest.fsh index ec3b4da06b1..ee3376cc5d7 100644 --- a/input/fsh/examples/HivTest.fsh +++ b/input/fsh/examples/HivTest.fsh @@ -1,12 +1,13 @@ -Instance: HivTest -InstanceOf: HivTest +Instance: ExampleHivTest +InstanceOf: HivHivTest Title: "Example HIV Test Observation for Positive Result" Description: "This is an example of an HIV Test Observation resource based on the HivTest profile for a positive test result." * status = #final * category = http://terminology.hl7.org/CodeSystem/observation-category#laboratory * code = HIVConcepts#HIV.B.DE81 "HIV Test" -* subject = Reference(Patient/example-hiv-patient) +* subject = Reference(Patient/ExampleHivPatient) + * effectiveDateTime = "2023-01-01T14:30:00Z" * issued = "2023-01-03T15:00:00Z" // Example issued time * valueCodeableConcept = HIVConcepts#HIV.B.DE112 "HIV-positive" \ No newline at end of file diff --git a/input/fsh/examples/HivVmmcProcedure.fsh b/input/fsh/examples/HivVmmcProcedure.fsh new file mode 100644 index 00000000000..41330cb14c8 --- /dev/null +++ b/input/fsh/examples/HivVmmcProcedure.fsh @@ -0,0 +1,8 @@ +Instance: HivVmmcProcedureExample +InstanceOf: HivVmmcProcedure +Title: "Example VMMC Procedure" +Description: "An example of a VMMC procedure based on the HivVmmcProcedure profile." +* status = #completed +* code = HIVConcepts#HIV.B.DE197 +* subject = Reference(Patient/ExampleHivPatient) +* performedDateTime = "2023-01-07T10:00:00Z" \ No newline at end of file diff --git a/input/fsh/profiles/HivPrepActive.fsh b/input/fsh/profiles/HIvTreatmentMedicationStatement.fsh similarity index 54% rename from input/fsh/profiles/HivPrepActive.fsh rename to input/fsh/profiles/HIvTreatmentMedicationStatement.fsh index f5d5c51a2f9..7e9f3e9105b 100644 --- a/input/fsh/profiles/HivPrepActive.fsh +++ b/input/fsh/profiles/HIvTreatmentMedicationStatement.fsh @@ -1,11 +1,8 @@ -Profile: HivPrepActive +Profile: HivTreatmentMedicationStatement Parent: MedicationStatement -Description: "A medication statement describing a patient on active PrEP" +Description: "Core profile for HIV IG Treatment Medication Statments" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^experimental = true -* ^title = "HIV Prep Active" -* reasonCode = HIVConcepts#HIV.C.DE76 -* medicationCodeableConcept from HIV.C.DE80 (required) - +* ^title = "HIV Treatment Medication Statement" diff --git a/input/fsh/profiles/HivAltPepBackbonePrescription.fsh b/input/fsh/profiles/HivAltPepBackbonePrescription.fsh index fa03a5a172a..4055e72aab8 100644 --- a/input/fsh/profiles/HivAltPepBackbonePrescription.fsh +++ b/input/fsh/profiles/HivAltPepBackbonePrescription.fsh @@ -5,7 +5,6 @@ Description: "A profile for MedicationRequest representing an alternative PEP ba * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^experimental = true * ^title = "Alternative PEP Backbone Prescription" -* intent = #order * medication[x] only CodeableConcept * medicationCodeableConcept from HIV.C.DE95 (required) diff --git a/input/fsh/profiles/HivAltThirdPepPrescription.fsh b/input/fsh/profiles/HivAltThirdPepPrescription.fsh index 7c1460d0d08..01990ebf55f 100644 --- a/input/fsh/profiles/HivAltThirdPepPrescription.fsh +++ b/input/fsh/profiles/HivAltThirdPepPrescription.fsh @@ -5,7 +5,6 @@ Description: "A profile for MedicationRequest representing an alternative Third * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^experimental = true * ^title = "Alternative Third PEP Prescription" -* intent = #order * medication[x] only CodeableConcept * medicationCodeableConcept from HIV.C.DE101 (required) diff --git a/input/fsh/profiles/HivAntiRetroviralEpisode.fsh b/input/fsh/profiles/HivAntiRetroviralEpisode.fsh new file mode 100644 index 00000000000..32c9d03f5b5 --- /dev/null +++ b/input/fsh/profiles/HivAntiRetroviralEpisode.fsh @@ -0,0 +1,8 @@ +Profile: HivAntiRetroviralEpisode +Parent: EpisodeOfCare +Description: "ART Episode of Care" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "ART Episode of Care" +* type = HIVConcepts#HIV.H.DE47 diff --git a/input/fsh/profiles/HivAntiRetroviralTreatment.fsh b/input/fsh/profiles/HivAntiRetroviralTreatment.fsh new file mode 100644 index 00000000000..e966b20f6ae --- /dev/null +++ b/input/fsh/profiles/HivAntiRetroviralTreatment.fsh @@ -0,0 +1,8 @@ +Profile: HivAntiRetroviralTreatment +Parent: MedicationStatement +Description: "ART Regimen" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "Art Regimen" +* medicationCodeableConcept from HIV.D.DE90 \ No newline at end of file diff --git a/input/fsh/profiles/HivCervicalCancerScreening.fsh b/input/fsh/profiles/HivCervicalCancerScreening.fsh new file mode 100644 index 00000000000..2d7dada1c9f --- /dev/null +++ b/input/fsh/profiles/HivCervicalCancerScreening.fsh @@ -0,0 +1,11 @@ +Profile: HivCervicalCancerScreening +Parent: Observation +Title: "Cervical Cancer Screening" +Description: "Profile for documenting cervical cancer screening." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "Cervical Cancer Screening" +* code from HIV.D.DE658 +* value[x] only CodeableConcept +* valueCodeableConcept from HIV.D.DE706 (required) diff --git a/input/fsh/profiles/HivCondition.fsh b/input/fsh/profiles/HivCondition.fsh new file mode 100644 index 00000000000..aa1045b7688 --- /dev/null +++ b/input/fsh/profiles/HivCondition.fsh @@ -0,0 +1,8 @@ +Profile: HivCondition +Parent: Condition +Description: "Core profile for HIV IG Conditions" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "HIV Condition" + diff --git a/input/fsh/profiles/HivCurrentPrepRegimenPrescription.fsh b/input/fsh/profiles/HivCurrentPrepRegimenPrescription.fsh index 8354d933d25..774ad20fa9f 100644 --- a/input/fsh/profiles/HivCurrentPrepRegimenPrescription.fsh +++ b/input/fsh/profiles/HivCurrentPrepRegimenPrescription.fsh @@ -5,6 +5,5 @@ Description: "A profile for MedicationRequest representing a prescription of a c * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^experimental = true * ^title = "Current PrEP Regimen Prescription" -* intent = #order * medication[x] only CodeableConcept * medicationCodeableConcept from HIV.C.DE17 (required) diff --git a/input/fsh/profiles/HivElevatedHivAcquisitionRiskCondition.fsh b/input/fsh/profiles/HivElevatedHivAcquisitionRiskCondition.fsh new file mode 100644 index 00000000000..5ff61810ea3 --- /dev/null +++ b/input/fsh/profiles/HivElevatedHivAcquisitionRiskCondition.fsh @@ -0,0 +1,8 @@ +Profile: HivElevatedHivAcquisitionRiskCondition +Parent: HivCondition +Description: "A profile for a condition representing an elevated risk for HIV acquisition." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "Elevated HIV Acquisition Risk Condition" + diff --git a/input/fsh/profiles/HivGonorrhoeaTest.fsh b/input/fsh/profiles/HivGonorrhoeaTest.fsh new file mode 100644 index 00000000000..b787534ec2a --- /dev/null +++ b/input/fsh/profiles/HivGonorrhoeaTest.fsh @@ -0,0 +1,7 @@ +Profile: HivGonorhoeaTest +Parent: HivLabTestObservation +Description: "A DAK-specific Gonnorhoea test observation with possible results" +* ^title = "Gonorrhoea Test" +* code = HIVConcepts#HIV.B.DE256 +* valueCodeableConcept from HIV.D.DE808 (required) +* category from HIV.B.DE276 (required) diff --git a/input/fsh/profiles/HivGonorrhoeaTreatment.fsh b/input/fsh/profiles/HivGonorrhoeaTreatment.fsh new file mode 100644 index 00000000000..0cfb7b2ef1a --- /dev/null +++ b/input/fsh/profiles/HivGonorrhoeaTreatment.fsh @@ -0,0 +1,9 @@ +Profile: HivGonorrhoeaTreatment +Parent: MedicationStatement +Description: "Gonorrhoea Treatment" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "Gonorrhoea Treatment" +// TODO: figure out code +* medicationCodeableConcept = HIVConcepts#HIV.D.DE812 \ No newline at end of file diff --git a/input/fsh/profiles/HivHBsAgTest.fsh b/input/fsh/profiles/HivHBsAgTest.fsh new file mode 100644 index 00000000000..beda50940d9 --- /dev/null +++ b/input/fsh/profiles/HivHBsAgTest.fsh @@ -0,0 +1,9 @@ +Profile: HivHBsAgTest +Parent: HivLabTestObservation +Description: "A DAK-specific Hepatitis B virus test observation with possible results" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "HBsAg Test" +* code = HIVConcepts#HIV.D.DE162 "HBsAg test result" +* valueCodeableConcept from HIV.D.DE162 (required) diff --git a/input/fsh/profiles/HivHcvTest.fsh b/input/fsh/profiles/HivHcvTest.fsh new file mode 100644 index 00000000000..cddfc312dd5 --- /dev/null +++ b/input/fsh/profiles/HivHcvTest.fsh @@ -0,0 +1,6 @@ +Profile: HivHcvTest +Parent: HivLabTestObservation +Description: "A DAK-specific Hepatitis C test observation with possible results" +* ^title = "HCV Test" +* code = HIVConcepts#HIV.D.DE170 "HCV test result" +* valueCodeableConcept from HIV.D.DE170 (required) diff --git a/input/fsh/profiles/HivHcvTreatment.fsh b/input/fsh/profiles/HivHcvTreatment.fsh new file mode 100644 index 00000000000..1b497a2043b --- /dev/null +++ b/input/fsh/profiles/HivHcvTreatment.fsh @@ -0,0 +1,8 @@ +Profile: HivHcvTreatment +Parent: MedicationStatement +Description: "HCV Treatment Regimen" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "HCV Treatment" +* medicationCodeableConcept from HIV.D.DE182 (required) diff --git a/input/fsh/profiles/HivHcvViralLoadTest.fsh b/input/fsh/profiles/HivHcvViralLoadTest.fsh new file mode 100644 index 00000000000..486f59f4a14 --- /dev/null +++ b/input/fsh/profiles/HivHcvViralLoadTest.fsh @@ -0,0 +1,6 @@ +Profile: HivHcvViralLoadTest +Parent: HivLabTestObservation +Description: "A DAK-specific HCV Viral Load observation with possible results" +* ^title = "HCV Viral Load Test" +* code = HIVConcepts#HIV.D.DE179 "HCV test result" +* valueCodeableConcept from HIV.D.DE179 (required) diff --git a/input/fsh/profiles/HivHivTest.fsh b/input/fsh/profiles/HivHivTest.fsh new file mode 100644 index 00000000000..dd305309412 --- /dev/null +++ b/input/fsh/profiles/HivHivTest.fsh @@ -0,0 +1,7 @@ +Profile: HivHivTest +Parent: HivLabTestObservation +Description: "An DAK-specific HIV test observation with possible results" +* ^title = "HIV Test" +* code = HIVConcepts#HIV.B.DE81 +* valueCodeableConcept from HIV.B.DE111 (required) + diff --git a/input/fsh/profiles/HivHtsVisit.fsh b/input/fsh/profiles/HivHtsVisit.fsh new file mode 100644 index 00000000000..2f2a1223e99 --- /dev/null +++ b/input/fsh/profiles/HivHtsVisit.fsh @@ -0,0 +1,9 @@ +Profile: HivHtsVisit +Parent: Encounter +Description: "Encounter for HIV testing services visit" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "HTS Visit" + +//* type.conding contains ConceptsCustom."HTS Visit".code \ No newline at end of file diff --git a/input/fsh/profiles/HivInvasiveCervicalCancerDiagnosis.fsh b/input/fsh/profiles/HivInvasiveCervicalCancerDiagnosis.fsh new file mode 100644 index 00000000000..17f2864c7bd --- /dev/null +++ b/input/fsh/profiles/HivInvasiveCervicalCancerDiagnosis.fsh @@ -0,0 +1,8 @@ +Profile: HivInvasiveCervicalCancerDiagnosis +Parent: Condition +Description: "Invasive cervical cancer diagnosis" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "Invasive Cervical Cancer Diagnosis" +* code from HIV.D.DE709 \ No newline at end of file diff --git a/input/fsh/profiles/HivInvasiveCervicalCancerTreatment.fsh b/input/fsh/profiles/HivInvasiveCervicalCancerTreatment.fsh new file mode 100644 index 00000000000..86c8d86a5c3 --- /dev/null +++ b/input/fsh/profiles/HivInvasiveCervicalCancerTreatment.fsh @@ -0,0 +1,8 @@ +Profile: HivInvasiveCervicalCancerTreatment +Parent: Procedure +Description: "Invasive cervical cancer treatment" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "Invasive Cervical Cancer Treatment" +* code from HIV.D.DE731 (required) diff --git a/input/fsh/profiles/HivTest.fsh b/input/fsh/profiles/HivLabTestObservation.fsh similarity index 78% rename from input/fsh/profiles/HivTest.fsh rename to input/fsh/profiles/HivLabTestObservation.fsh index 331e72d54ea..2ff0141de2e 100644 --- a/input/fsh/profiles/HivTest.fsh +++ b/input/fsh/profiles/HivLabTestObservation.fsh @@ -1,17 +1,13 @@ -Profile: HivTest +Profile: HivLabTestObservation Parent: Observation -Description: "An DAK-specific HIV test observation with possible results" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^experimental = true -* ^title = "HIV Test" -* code = HIVConcepts#HIV.B.DE81 * category = http://terminology.hl7.org/CodeSystem/observation-category#laboratory -* value[x] only CodeableConcept -* valueCodeableConcept from HIV.B.DE111 (required) * effective[x] ^short = "Time at which test performed" * effective[x] only dateTime or instant * effective[x] ^definition = "The point in time at which the test was performed" * issued ^short = "Time at which test results returned" * issued ^definition = "The point in time at which the test results were returned to the patient or provider" - +* value[x] only CodeableConcept +* basedOn MS diff --git a/input/fsh/profiles/HivLabTestServiceRequest.fsh b/input/fsh/profiles/HivLabTestServiceRequest.fsh new file mode 100644 index 00000000000..da5459dd193 --- /dev/null +++ b/input/fsh/profiles/HivLabTestServiceRequest.fsh @@ -0,0 +1,8 @@ +Profile: HivLabTestServiceRequest +Parent: ServiceRequest +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* reasonCode 1..1 MS +* code 1..1 MS +* status from http://hl7.org/fhir/ValueSet/request-status (required) diff --git a/input/fsh/profiles/HivLabTestSpecimen.fsh b/input/fsh/profiles/HivLabTestSpecimen.fsh new file mode 100644 index 00000000000..d71f222aa9c --- /dev/null +++ b/input/fsh/profiles/HivLabTestSpecimen.fsh @@ -0,0 +1,6 @@ +Profile: HivLabTestSpecimen +Parent: Specimen +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "HIV Lab Test Specimen" diff --git a/input/fsh/profiles/HivPepBackboneAlternativeTreatment.fsh b/input/fsh/profiles/HivPepBackboneAlternativeTreatment.fsh new file mode 100644 index 00000000000..d6433ba803f --- /dev/null +++ b/input/fsh/profiles/HivPepBackboneAlternativeTreatment.fsh @@ -0,0 +1,10 @@ + +Profile: HivPepBackboneAlternativeTreatment +Parent: HivTreatmentMedicationStatement +Description: "A profile for MedicationRequest representing a preferred PEP backbone prescription." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "Preferred PEP Backbone Prescription" +* medication[x] only CodeableConcept +* medicationCodeableConcept from HIV.C.DE95 (required) \ No newline at end of file diff --git a/input/fsh/profiles/HivPreferredPepBackbonePrescription.fsh b/input/fsh/profiles/HivPepBackbonePreferredTreatment.fsh similarity index 75% rename from input/fsh/profiles/HivPreferredPepBackbonePrescription.fsh rename to input/fsh/profiles/HivPepBackbonePreferredTreatment.fsh index 458efb19d2d..6f5855368dc 100644 --- a/input/fsh/profiles/HivPreferredPepBackbonePrescription.fsh +++ b/input/fsh/profiles/HivPepBackbonePreferredTreatment.fsh @@ -1,11 +1,10 @@ -Profile: HivPreferredPepBackbonePrescription -Parent: MedicationRequest +Profile: HivPepBackbonePreferredTreatment +Parent: HivTreatmentMedicationStatement Description: "A profile for MedicationRequest representing a preferred PEP backbone prescription." * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^experimental = true -* ^title = "Preferred PEP Backbone Prescription" -* intent = #order +* ^title = "Preferred PEP Backbone Treatment" * medication[x] only CodeableConcept * medicationCodeableConcept from HIV.C.DE91 (required) \ No newline at end of file diff --git a/input/fsh/profiles/HivPepThirdAlternativeTreatment.fsh b/input/fsh/profiles/HivPepThirdAlternativeTreatment.fsh new file mode 100644 index 00000000000..e689d87be24 --- /dev/null +++ b/input/fsh/profiles/HivPepThirdAlternativeTreatment.fsh @@ -0,0 +1,10 @@ +Profile: HivPepThirdAlternativeTreatment +Parent: HivTreatmentMedicationStatement +Description: "A profile for MedicationRequest representing the alternative third PEP drug choice prescription." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "Alternative Third PEP Treatment" +* medication[x] only CodeableConcept +* medicationCodeableConcept from HIV.C.DE101 (required) + diff --git a/input/fsh/profiles/HivPreferredThirdPepPrescription.fsh b/input/fsh/profiles/HivPreferredThirdPepTreatment.fsh similarity index 76% rename from input/fsh/profiles/HivPreferredThirdPepPrescription.fsh rename to input/fsh/profiles/HivPreferredThirdPepTreatment.fsh index c18496209d5..83fb7283c04 100644 --- a/input/fsh/profiles/HivPreferredThirdPepPrescription.fsh +++ b/input/fsh/profiles/HivPreferredThirdPepTreatment.fsh @@ -1,11 +1,10 @@ -Profile: HivPreferredThirdPepPrescription -Parent: MedicationRequest +Profile: HivPepThirdPreferredTreatment +Parent: HivTreatmentMedicationStatement Description: "A profile for MedicationRequest representing the preferred third PEP drug choice prescription." * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^experimental = true -* ^title = "Preferred Third PEP Prescription" -* intent = #order +* ^title = "Preferred Third PEP Treatment" * medication[x] only CodeableConcept * medicationCodeableConcept from HIV.C.DE99 (required) diff --git a/input/fsh/profiles/HivPrepProductPrescription.fsh b/input/fsh/profiles/HivPrepTreament.fsh similarity index 81% rename from input/fsh/profiles/HivPrepProductPrescription.fsh rename to input/fsh/profiles/HivPrepTreament.fsh index 023046c7be3..7e66408bdc2 100644 --- a/input/fsh/profiles/HivPrepProductPrescription.fsh +++ b/input/fsh/profiles/HivPrepTreament.fsh @@ -1,10 +1,10 @@ -Profile: HivPrepProductPrescription -Parent: MedicationRequest +Profile: HivPrepTreatment +Parent: HivTreatmentMedicationStatement Description: "A profile for MedicationRequest representing a prescription of a PrEP product." * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^experimental = true * ^title = "PrEP Product Prescription" -* intent = #order * medication[x] only CodeableConcept * medicationCodeableConcept from HIV.C.DE80 (required) +* reasonCode = HIVConcepts#HIV.C.DE76 diff --git a/input/fsh/profiles/HivPreventionIntervention.fsh b/input/fsh/profiles/HivPreventionIntervention.fsh new file mode 100644 index 00000000000..28e6ad0979a --- /dev/null +++ b/input/fsh/profiles/HivPreventionIntervention.fsh @@ -0,0 +1,11 @@ +Profile: HivPreventionIntervention +Parent: Observation +Description: "HIV prevention intervention" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "HIV Prevention Intervention" +* code = HIVConcepts#HIV.PRV.DE2 "HIV Prevention Intervention" +* value[x] only CodeableConcept +* valueCodeableConcept from HIV.PRV.DE2 (required) +* effective[x] 1..1 diff --git a/input/fsh/profiles/HivScreeningObservation.fsh b/input/fsh/profiles/HivScreeningObservation.fsh new file mode 100644 index 00000000000..e69de29bb2d diff --git a/input/fsh/profiles/HivStiServices.fsh b/input/fsh/profiles/HivStiServices.fsh new file mode 100644 index 00000000000..442004c7052 --- /dev/null +++ b/input/fsh/profiles/HivStiServices.fsh @@ -0,0 +1,8 @@ +Profile: HivStiServices +Parent: Procedure +Description: "STI Services" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "STI Services" + diff --git a/input/fsh/profiles/HivTreatmentProcedure.fsh b/input/fsh/profiles/HivTreatmentProcedure.fsh new file mode 100644 index 00000000000..be50545771e --- /dev/null +++ b/input/fsh/profiles/HivTreatmentProcedure.fsh @@ -0,0 +1,8 @@ +Profile: HivTreatmentProcedure +Parent: Procedure +Description: "Core profile for HIV IG Treatment Procedures" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "HIV Treatment Procedure" + diff --git a/input/fsh/profiles/HivVmmcAdverseEvent.fsh b/input/fsh/profiles/HivVmmcAdverseEvent.fsh new file mode 100644 index 00000000000..39fe0b5e32a --- /dev/null +++ b/input/fsh/profiles/HivVmmcAdverseEvent.fsh @@ -0,0 +1,8 @@ +Profile: HivVmmcAdverseEvent +Parent: AdverseEvent +Description: "An adverse event related to voluntary medical male circumcision" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* actuality = #actual +* suspectEntity 1..* MS +* suspectEntity.instance only Reference(HivVmmcProcedure) \ No newline at end of file diff --git a/input/fsh/profiles/HivVmmcProcedure.fsh b/input/fsh/profiles/HivVmmcProcedure.fsh new file mode 100644 index 00000000000..07f0425af3d --- /dev/null +++ b/input/fsh/profiles/HivVmmcProcedure.fsh @@ -0,0 +1,9 @@ +Profile: HivVmmcProcedure +Parent: Procedure +Description: "Voluntary Medical Male Circumcision (VMMC) procedure" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "Voluntary Medical Male Circumcision (VMMC) Procedure" +* code = HIVConcepts#HIV.B.DE197 +* performed[x] 1..1 MS diff --git a/input/fsh/valuesets/HIV.D.DE789.fsh b/input/fsh/valuesets/HIV.D.DE789.fsh index 7fb045da2c8..61736ca84b5 100644 --- a/input/fsh/valuesets/HIV.D.DE789.fsh +++ b/input/fsh/valuesets/HIV.D.DE789.fsh @@ -1,6 +1,6 @@ ValueSet: HIV.D.DE789 Title: "STI tested for ValueSet" -Description: "Value set of sTI for which the client was tested" +Description: "Value set of STI for which the client was tested" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" * ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" diff --git a/sushi-config.yaml b/sushi-config.yaml index e4cf71ec232..40f378dd874 100644 --- a/sushi-config.yaml +++ b/sushi-config.yaml @@ -32,8 +32,8 @@ dependencies: hl7.fhir.uv.cql: 1.0.0 hl7.fhir.uv.crmi: 1.0.0 hl7.fhir.uv.sdc: 3.0.0 - hl7.fhir.uv.cpg: current - hl7.fhir.us.cqfmeasures: current + hl7.fhir.uv.cpg: 2.0.0 + hl7.fhir.us.cqfmeasures: 5.0.0 fhir.cqf.common: 4.0.1 pages: diff --git a/todo.md b/todo.md new file mode 100644 index 00000000000..a7a9468c28b --- /dev/null +++ b/todo.md @@ -0,0 +1,65 @@ +#IND27: + - Two On Art concepts + - determine how detailed the ART Treatment Profile needs to be in terms of types of treatments + - Figure out MS vs EOC profiling + - The many regimens and details that can be attributed to ART need to be carefully profiled + +#IND70: + - * HIV.A.DE3: Visit date | The date and time of the client's visit vs. * HIV.SRV.DE15: Visit date | The date and time of the client's visit: I think we should use HIV.A since it's registration + +#IND71: + - Add details to "HTS Visit Encounter" + - Fix HtsVisit profile and review with Patric + +#IND72: + - Numerator seems to be able to be larger than denominator + - Why does the denominator date need to be on the same date as HIV prev intervention? + - Should we filter by type of test as in the definition? +- +#IND74: + - HIV.D.DE808 vs. HIV.B.DE256 +#IND75: + - HIV.B.DE260 vs.HIV.D.DE812 + - No concept exist for Gonorrhoea Treatment + +#IND90: + - HIV.G.DE18 vs. HIV.D.DE162 + +#IND91: + - Determine if we need to create profile for HIV.G.DE43 vs HIV.D.DE170 + +#IND92: + - Check numerator and denominator logic + - Check how HcvTreatment is encoded (procedure vs. medication statement) + +Other notes: +- NO Code exists for Gonnorhea Treatment +- VMMC code does not exist: SNOMED? VMMC date () + * HIV.B.DE197 (VMMC performed) + * HIV.B.DE198 (VMMC Date) + * HIV.PRV.DE7 (input option) + * HIV.C.DE133 (referral) + +## PrEP Treatment +PrEP treatment: there are a couple valuesets for regimens, medications, etc. that need to be modeled. + We shouldn't have all these medications statements like activePrEP and PrEP prescription, since it seems to + have the same data. However, there are multiple valuesets: + * PrEP product prescribed Choices + * "PrEP for HIV prevention" + * "Current PrEP regimen Choices" + * PrEP Dosing type + * PrEP regimen prescribed + +## PeP Treatment +Another multiple number of valuesets + * Preferred PEP backbone regimen + * Alternative PEP backbone regimen + * Preferred third PEP drug + * Alternative third PEP drug + +Can we just have a single profile for a MS that has any of these choices? + +## Visit Date +We need to profile visit date and mark it as a specific type of encounter? + +## Medication Request vs. Medication Statement: Guidelines? \ No newline at end of file