opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
53 stars 41 forks source link

Measure Evaluate fails when generating reports for child indicators #3051

Closed ndegwamartin closed 6 months ago

ndegwamartin commented 7 months ago

Describe the bug On upgrading to the very latest updates on the FHIR SDK. On running the FHIROperator.evaluateMeasure(method we encounter an exception with the exception message ...model.Measure.hasLibrary()' on a null object reference(see screenshot).

On further investigation it points us to the evaluation of the method here https://github.com/cqframework/clinical-reasoning/blob/1d033f61140709d5fc1f3d4702ea9f1460647157/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/measure/r4/R4MeasureProcessor.java#L89 which when evaluated throws the exception Type org.hl7.fhir.r4.model.CanonicalType not present causing the measure to return as a null object

To Reproduce Steps to reproduce the behavior:

  1. Login to the app (one with Measure reporting e.g. ZEIR)
  2. Open left Navigation drawer
  3. Click on Child Indicators
  4. Select the month for which you want to generate Measure report for
  5. Select indicator you want to run

Expected behavior It should generate the Measure report successfully

Screenshots

Screenshot 2024-02-03 at 17 47 23

Here's a screenshot of the full stack trace after the evaluation of the aforementioned class method R4MeasureProcessor.java#L89 in debug mode.

Screenshot 2024-02-03 at 22 38 34

Smartphone (please complete the following information):

Additional context The issue was witnessed after the lib upgrades on the PR here https://github.com/opensrp/fhircore/pull/2825