Clinics: refinement of session page and addition of cancellation#259
Merged
Clinics: refinement of session page and addition of cancellation#259
Conversation
Previously, when editing an existing clinic, the addition of a new vaccination period left its vaccinator count uninitialised, which caused an inability to calculate the total number of appointments, littering the UI with NaN in places.
This is only the start, but I'm pausing this to tackle a bigger architectural issue that's been slowing me down.
The way that vaccination periods are stored has been changed in PR #255, and the code to ensure periods get a default vaccinator count is now in Session.addVaccinationPeriod()
Moved the vaccination period summary info to Session.formatted to allow this, and updated previous uses of getVaccinationPeriodsSummary (in utils) to use formatted()
This work is incomplete, as I've not yet learnt everything I need to know about dependent records (such as patient sessions). There'll be other records I need to tidy up / delete
Thanks to Melissa.
Note that this is labelled as the *available* appointment times, but the code's not yet there to check availability, so for now it's just listing all appointments as available.
Make the session page for clinics look as it would immediately after clinic creation. This is for the sake of ongoing UR sessions; it'll be made dynamic later once bookings are made real.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed most of the 'tally'-style panels on the clinic's Appointments tab, added more clinic-relevant details to the "Session details" card, and added a card showing the distribution of appointment availability across the hours over which the clinic runs. Or at least, it will show that once it's gathering the values from actual bookings.