Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to validate the min/max for Date on a FHIR Questionnaire #1040

Closed
f-odhiambo opened this issue Jan 14, 2022 · 2 comments · Fixed by #1442 or #1631
Closed

Add ability to validate the min/max for Date on a FHIR Questionnaire #1040

f-odhiambo opened this issue Jan 14, 2022 · 2 comments · Fixed by #1442 or #1631
Assignees
Labels
effort:medium Medium effort - 3 to 5 days P2 Medium priority issue type:enhancement New feature or request

Comments

@f-odhiambo
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Add ability to limit the date input values to either the minimum or maximum date allowed for a given use case e.g.

  1. A task should not start before a certain date
  2. When adding DOB, the DOB should be less than the current day/today
  3. When scheduling you can validate when a given task should be done or assigned to a given practitioner

Describe the solution you'd like

  1. To be able to resolve expressions such as today() in the min-max value extension
  2. To use the min-max value extension in the actual date picker pop-up. at the moment the pop-up dialogue allows the user to put in any date and the error message only kicked in once the user has input a date.

Describe alternatives you've considered

  1. It would be much better if the date picker already doesn't allow the user to input a date outside the allowed range.

Additional context
A detailed use case is defined on this ticket opensrp/fhircore#845 on OpenSRP FHIR Core repo

Would you like to work on the issue?
@RaaziaTarique

@f-odhiambo f-odhiambo added the type:enhancement New feature or request label Jan 14, 2022
@RaaziaTarique
Copy link
Contributor

@f-odhiambo, yes I can work on this issue.

@f-odhiambo
Copy link
Collaborator Author

Updated from @aurangzaibumer

Had a technical discussion with @maimoonak

  1. if I get a direct value, will directly use it in calendar constraint
  2. if I get an extension inside an extension that is cqf-caluclated value then we have to process it through fhir path engine and get the desired result and apply it on calendar constraints.
  3. Was able to get the valueDate from the minValue and maxValue expression (as extensions) with values in the questionnaire (that have been applied on the calendar constraint of the date picker) now I have to do research on how it can be done through cqf-calculated value just like Maimoona suggested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment