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

Test variable evaluation via cqf expressions #3060

Closed ageryck closed 4 months ago

ageryck commented 6 months ago

Describe the feature request. Allow the SDC to evaluate variables passed with definite values to be evaluated via cqf expression. An example will be testing a minDate value of a static date provided to validate the datepicker widget.

Additional context Refer to these two tickets https://github.com/google/android-fhir/issues/2292 https://github.com/google/android-fhir/issues/1759

And the Implementing PR - https://github.com/google/android-fhir/pull/2326

Acceptance criteria

Implementation plan (For Engineers) The plan for implementing the solution e.g. via a description or a check list for the various ordered tasks that will need to be completed. _i.e. Describe how you intend to solve the problem

Demo

Image of when date min value is today - 6 days and max date is today Image of when min date is birthdate and max date is today Image of when max date is today five days beyond
minvaluedatepicker pdobmindate
maxdate_5days
brandyodhiambo commented 4 months ago

@ndegwamartin and @ageryck have tested the first two cases when the minimum date is set to the patient's birthdate and when it is set to a given date. the date picker restricts dates to be picked according to the values respectively you can see the images appended above.

ageryck commented 4 months ago

@brandy-kay the first screenshot looks okay however it is not visible on the second kindly confirm it is restricted based on the patient birthdate queried through an expression and equally limits the max value as set. If yes then you can proceed to add some documentation about this.

brandyodhiambo commented 4 months ago

sure @ageryck let me test it futher