Closed f-odhiambo closed 2 years ago
Bug in the demo app : Seems like there are some libraries that are not syncing anymore and closing the app to terminate before launch
Bug reported here https://github.com/DBCG/CqlEvaluatorSampleApp/issues/1#issue-909546106
Updated the libs and now working fine
The app is able to evaluate CQL expressions written in text/cql
.
The sample app demonstrates the ability to load a FHIR Library and Value Sets thats are later used to evaluate the Libraries parameter output against a Patient Resource as an input parameter.
As of the time of this post, neither $measure_evaluate
nor $apply
operations are capable with the version of this app.
It should be possible to integrate the library as it is to the fhir-core application but for some major concerns with the duration. It takes a long time to run a single evaluation operation on Actual Devices.
CQL-Ruler Library is capable of evaluating PlanDefinition $apply and MesureReport $evaluate-measure. Evaluation on Android Platform was not possible but was possible on the server side
Ie the first task under integration needs more definition, before we begin on it, but the others are unblocked
How we will evaluate Measure(s) to get MeasureReport(s)
- should any of the work we do towards this issue go upstream into the CQL libs?
How and what parts of this will go into the “engine” section and what into the “chw anc” app section?
- and are there other custom pieces not in either of those?
@f-odhiambo can you please answer this one?
How we will evaluate Measure(s) to get MeasureReport(s)
- should any of the work we do towards this issue go upstream into the CQL libs?
How and what parts of this will go into the “engine” section and what into the “chw anc” app section?
- and are there other custom pieces not in either of those?
@f-odhiambo can you please answer this one?
as far as I can answer, currently it will be independent of both covax and chw application
Ie the first task under integration needs more definition, before we begin on it, but the others are unblocked
yes have a call with @f-odhiambo regarding this, and currently we decided to proceed with cql as a separate application than fhir core
There can be two approaches to integrate CQL evaluator application into Fhir Core:
Sounds like we need to go w/(2) since the value of integration is being able to call this functionality within FHIR Core
I also do not think we should include any of the UI components. My understanding is that the goal of the integration is so we can implement #404 and #405, not have a CQL demo
Ie the first task under integration needs more definition, before we begin on it, but the others are unblocked
yes have a call with @f-odhiambo regarding this, and currently we decided to proceed with cql as a separate application than fhir core
Sounds good, @ekigamba can you join this as well? After the meeting please post the plan here so I can take a look, I'm happy to join as well, but definitely proceed w/out me and I can catch up, I don't want to slow you down!
Ie the first task under integration needs more definition, before we begin on it, but the others are unblocked
yes have a call with @f-odhiambo regarding this, and currently we decided to proceed with cql as a separate application than fhir core
@pld if we are going with second approach, then this is now no longer valid as cql would be a module instead of an application
True, we can rewrite the title and description of the issue to match this.
My assumption is that there's code in this app that's useful for #404 and #405, maybe it'd be more useful to work on one of those issues directly and treat this as a sub-issue of those to pull in common CQL functionality.
@f-odhiambo am I missing something here?
Ie the first task under integration needs more definition, before we begin on it, but the others are unblocked
yes have a call with @f-odhiambo regarding this, and currently we decided to proceed with cql as a separate application than fhir core
Sounds good, @ekigamba can you join this as well? After the meeting please post the plan here so I can take a look, I'm happy to join as well, but definitely proceed w/out me and I can catch up, I don't want to slow you down!
Sure @pld
True, we can rewrite the title and description of the issue to match this.
My assumption is that there's code in this app that's useful for #404 and #405, maybe it'd be more useful to work on one of those issues directly and treat this as a sub-issue of those to pull in common CQL functionality.
@f-odhiambo am I missing something here?
@pld We will need to extend the work Ronald was working on for the search use cases to achieve this. Search will need to be extended to work for either name (First name, Last Name, Family name), IDs (UUID, Logical ID, Identifiers) and resources (Encounters, Observations, Practitioners etc) for issues #404 & #405
For this piece of work, I think we are looking at the base code, resources to achieve measure reporting by using the Parameter bundle resource it generates, and later to be consumed by HAPI for $measure_evalute and generate a measure report
Sounds like we need to go w/(2) since the value of integration is being able to call this functionality within FHIR Core
I also do not think we should include any of the UI components. My understanding is that the goal of the integration is so we can implement #404 and #405, not have a CQL demo
@pld for the mADX work we need to achieve the following
Thus UI component for this is required
So we skip moving from Evaluation page directly to map the floe above
To clarify, I meant the UI of this specific demo app is not required.
To achieve that we can use the ANC app NOT a separate CQL specific demo app.
Copy that. All Clear
So based on @pld comments that we don't need the UI of the demo application, the approach finalized with @f-odhiambo and @ekigamba is as follows:
We will not import the cql demo application as a module into fhir core, instead we will copy some of the code and dependencies directly from reference application to fhir core and then use it to achieve our use cases within fhir core directly
Update:
Branch Name Pushed: feature/integrate-cql-evaluation-application
@f-odhiambo
awesome work! is it ready for a PR yet?
awesome work! is it ready for a PR yet?
yes almost
Update
@kimigxfoxy Kindly take note that #414 is now complete and that this codebase will need to go under report but accessed via the ANC module
New structure
/anc
- anything ANC specific will build CHW app for LMH and mADX
/eir
- anything EIR specific will build Covax app
/engine
|--- /register
|--- /report
|--- /task
|--- /search
Explanation This implementation is part of the mADX project that aims at generating measure reports for set predefined indicators. The set of patients are primarily ANC clients, the set of observations and details taken are collected in the course of different ANC encounters. The measures for reporting are tracked against a set of several observations collected over time and tracked for various ANC Indicators.
Thus, patients will be accessed via the ANC app and then those being tracked for measure reporting can be selected and evaluate operation run against the patient resource together with with the referenced resources i.e. Library resource with CQL expressions and the value set bundles etc.
Acceptance Criteria
feature/integrate-cql-evaluation-application
patient-mom-with-anaemia
)and add the address given that the current app filters/syncs patients by location i.e. Nairobi
"address": [ {
"city": "Nairobi",
"country": "Kenya"
} ]
patient-mom-with-anaemia
. NB. This should only be for this target sample patient and not the rest of the other patients. To be update later to work dynamically @kimigxfoxy The sample app has since been updated with some new changes and the ability to generate measure reports check it out https://github.com/DBCG/CqlEvaluatorSampleApp We may need to upgrade part of the previous work done Also there us a new very loaded bundle here
Some additional notes
Understanding the Library logic vs the measure logic
The Library has the actual CQL embedded, while the Measure is a higher-level construct that gives the elements of the CQL meaning within the context of a quality measure. Figure 3-1 at the link here illustrates the relationship: https://build.fhir.org/ig/HL7/cqf-measures/measure-conformance.html#population-criteria
The Parameters resources is the return type defined for the $evaluate operation for Libraries. It roughly corresponds to key-value pairs for the CQL expressions that are embedded: http://build.fhir.org/ig/HL7/cqf-recommendations/OperationDefinition-cpg-library-evaluate.html What you do with the Parameters resources is context-dependent. In the case of a Measure, the values in the Parameters would map to population criteria. In the context of clinical decision support, it might map to a CDS-hooks card. If you were building a questionnaire app you might show the results to a user. In other words, it's a relatively low-level operation that can be reused under the covers in many different ways. It might be something that's not exposed at all within the Android SDK, depending on the specific requirements. In the demo app, we merely needed it as a first step towards Measure evaluation.
Some updates
- [x] On select, Patient mom on the ANC Client list, go to the patient profile
- [x] Populate details on Patient Moms profile i.e Name, Age, Patient ID from Patient FHIR resource
- [x] You can add a label and button just under the CarePlan section
- [ ] On click evaluate, go to evaluation screen you could use a white background similar to app theme and not dark background
@kimigxfoxy shared ANC details xml with you. Please check slack.
@f-odhiambo I am waiting for this PR to be approved https://github.com/opensrp/fhircore/pull/515 so that I can pull develop and merge to my branch and the button from there. @RaaziaTarique Thanks
@f-odhiambo Test patient with anemia https://fhir.labs.smartregister.org/fhir/Patient/1744/$everything. (We will substitute the ID with the patient loaded) Value set for patient with anemia: https://fhir.labs.smartregister.org/fhir/ValueSet?_id=1750,1751 Library ANCRecommendationA2,FHIRHelpers: https://fhir.labs.smartregister.org/fhir/Library?_id=1752,1753
Part of the integration to ANC for this POC missing @kimigxfoxy to integrate into a new PR - Access the evaluation from an ANC patient profile page
cc @kimigxfoxy
This is a simple app that creates a cql-evaluator and runs the WHO ANC Recommendation A2 content. It was created using Android Studio. Link to repo
Checks
Sample Screenshots
Integration
After this we proceed to