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
O3-2396: Appointments: Refine logic for whether a patient is checked … #1111
Conversation
Size Change: -45.8 kB (-1%) Total Size: 3.23 MB
ℹ️ View Unchanged
|
see my comments here: https://openmrs.atlassian.net/browse/O3-2963 ... we can have broader discussions about making this change there. |
const hasActiveVisitToday = visits?.some((visit) => visit?.patient?.uuid === patientUuid && visit?.startDatetime); | ||
const hasCheckedOutToday = visits?.some( | ||
(visit) => visit?.patient?.uuid === patientUuid && visit?.startDatetime && visit?.stopDatetime, | ||
); |
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.
As we discovered when looking at this today, this change can't be made in isolation of the changes to the checkout functionality, which currently will end the active visit. Always ending the active visit makes sense when your checkout logic is based on the presence of an active visit. But once you change the check-out logic to be independent of the visit status, you'll need to check that the visit is not already ended and/or prompt if the user wants to also close the visit, when you issue the modal dialog and perform the operation.
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.
Yeah, I likely want to tweak this.
Ack, I have to modify my commit message to include "BREAKING".... |
Converting this to a draft, we don't want to merge this in until we properly are able to switch appointment actions via the default paths |
…in or not
Requirements
Summary
Screenshots
Related Issue
Other