-
Notifications
You must be signed in to change notification settings - Fork 309
(feat) O3-3664: enhance visit form to handle deceased patients #2665
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
base: main
Are you sure you want to change the base?
(feat) O3-3664: enhance visit form to handle deceased patients #2665
Conversation
|
Seemed a bit too simple, but it somehow works. |
| } | ||
|
|
||
| export function useVisitFormSchemaAndDefaultValues(visitToEdit: Visit) { | ||
| export function useVisitFormSchemaAndDefaultValues(visitToEdit: Visit, config: { isDeceased: boolean }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| export function useVisitFormSchemaAndDefaultValues(visitToEdit: Visit, config: { isDeceased: boolean }) { | |
| export function useVisitFormSchemaAndDefaultValues(visitToEdit: Visit, options: { isDeceased: boolean }) { |
I think it makes sense to name this something other than config to disambiguate it from the config object returned by useConfig (e.g., options).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"options" is a way better name for that. Will change it to that ASAP
…from 'config' to 'options'
Requirements
Summary
This PR improves the visit form to correctly handle starting visits for deceased patients. Currently, the functionality introduced here disables the
newandongoingoptions of thevisit typeswitch. By default, all deceased patient visits will bepast visits.Screenshots
Related Issue
https://openmrs.atlassian.net/browse/O3-3364
Other