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

Make the business logic associated with task status configurable. #361

Closed samkanga closed 2 years ago

samkanga commented 3 years ago

All structures in Reveal campaigns will be assigned a business status and associated color on the map. We need to reproduce this feature in the FHIR app.

Additionally, we need the business logic behind the task logic to be configurable. So, for example, "sprayed" or "not yet visited" do not need to be hardcoded into the app.

FOCUS INVESTIGATION (combination of task business status) Family registered + bednet distributed + atleast one blood screening - Green Family registered + no other task complete - Pink Family registered + bednet distributed - blue Family registered + blood screening - purple

This particular grouping would entail fetching task data related to a structure and family members from the app db

Good candidate for CQL - No timelines

rkodev commented 3 years ago

Alternative to CQL:

We can use MVEL to store configurable logic i.e functions and encode them in base64 to be stored as a JSON field. A FHIR Basic Resource can be used for representation as an FHIR resource.