#4401 updated to latest ImmunizationStatusRoutine logic and test data (#4402)

Co-authored-by: Anna <anna.lin@smilecdr.com>
This commit is contained in:
alackerbauer 2023-01-04 18:16:54 +01:00 committed by GitHub
parent b44334055a
commit 8d4514ce36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15355 additions and 908 deletions

View File

@ -35,8 +35,8 @@ public class CqlMeasureEvaluationR4ImmunizationTest extends BaseCqlR4Test {
//evaluates a Measure to produce one certain MeasureReport
protected MeasureReport evaluateMeasureByMeasure(String theMeasureId, String thePractitionerRef, String thePatientRef) {
return this.myMeasureOperationsProvider.evaluateMeasure(new IdType("Measure", theMeasureId), null, null, null, "subject", thePatientRef, null, thePractitionerRef, null, null, null, null, myRequestDetails);
String evaluationDate = "2022-09-16";
return this.myMeasureOperationsProvider.evaluateMeasure(new IdType("Measure", theMeasureId), evaluationDate, evaluationDate, null, "subject", thePatientRef, null, thePractitionerRef, null, null, null, null, myRequestDetails);
}
@Test
@ -49,15 +49,15 @@ public class CqlMeasureEvaluationR4ImmunizationTest extends BaseCqlR4Test {
loadBundle(MY_IMMUNIZATION_CQL_RESOURCES);
//when
MeasureReport reportBasic = evaluateMeasureByMeasure("ImmunizationStatus", null, null);
MeasureReport reportByPractitioner = evaluateMeasureByMeasure("ImmunizationStatus", "Practitioner/ImmunizationStatus-practitioner-3", null);
MeasureReport reportIndividualImmunized = evaluateMeasureByMeasure("ImmunizationStatus", null, "ImmunizationStatus-1-year-patient-1");
MeasureReport reportIndividualNotImmunized = evaluateMeasureByMeasure("ImmunizationStatus", null, "ImmunizationStatus-1-year-patient-2");
MeasureReport reportBasic = evaluateMeasureByMeasure("ImmunizationStatusRoutine", null, null);
MeasureReport reportByPractitioner = evaluateMeasureByMeasure("ImmunizationStatusRoutine", "Practitioner/ImmunizationStatus-practitioner-3", null);
MeasureReport reportIndividualImmunized = evaluateMeasureByMeasure("ImmunizationStatusRoutine", null, "ImmunizationStatus-1-year-patient-1");
MeasureReport reportIndividualNotImmunized = evaluateMeasureByMeasure("ImmunizationStatusRoutine", null, "ImmunizationStatus-1-year-patient-2");
//then
assertMeasureScore(reportBasic, 0.25);
assertMeasureScore(reportByPractitioner, 0.285714);
assertMeasureScore(reportIndividualImmunized, 1.0);
assertMeasureScore(reportIndividualNotImmunized, 0.0);
assertMeasureScore(reportBasic, 0.3442623); //21 out of 61 patients are fully immunized on 2022-09-16
assertMeasureScore(reportByPractitioner, 0.23077); //3 out of 13 patients are fully immunized on 2022-09-16
assertMeasureScore(reportIndividualImmunized, 1.0); // the patient is fully immunized on on 2022-09-16
assertMeasureScore(reportIndividualNotImmunized, 0.0); // the patient is not fully immunized on 2022-09-16
}
}