First click-through of the parents' clinic booking journey#223
Merged
First click-through of the parents' clinic booking journey#223
Conversation
Collaborator
|
Once you’re happy with the clinic booking flow, you can pop a link to it on the prototype homepage. |
paulrobertlloyd
requested changes
Mar 25, 2026
Collaborator
paulrobertlloyd
left a comment
There was a problem hiding this comment.
Looking good! Just a few nit-picky details to resolve then this is good to merge!
Each booking, which will have a unique booking reference number, has one or more appointments. This corresponds to one or more children being booked into a clinic by the same parent and in the same booking flow. Models are not yet hooked up to anything.
Various aspects of the appointments could still be improved (e.g. choice of programmes), but some of it is limited by the lack of clinic session details in the models (e.g. start and end times, slot lengths, etc.)
Squash this commit. As it stands, data file generation fails with a circular reference. This is because I made the mistake of composing the objects I was creating in a hierarchy rather than using IDs as foreign keys. I'll fix that in the next commit.
In short, npm run create-data now runs without encountering infinite loops. Replaced aggregation of actual model objects with use of object IDs and getters to return the actual objects. Also in this commit, have improved the logic for matching children's ages to the clinic's programme(s) and choosing non-surprising parental relationships (albeit without attempting to make siblings have the same last name).
This means swapping individual checkbox values for a Boolean or taking _checked out of arrays where there are multiple checkboxes - in both the booking and appointment models.
…nic booking Prior to this, the health questions presented were: - a hard-coded set of questions - shown for only one appointment - not attributed to a specific child
…le multiple vaccines
…next child Changes in this commit include: - confirmation button text of "Continue to next child" when entering the final detail of the previous child - change of title to mention "your next child" when entering chiuld details for 2nd and subsequent children Also got rid of some old, unused entries in en.js.
Apostrophes, curly quotes and em dashes in the clinic booking strings.
Start page and final confirmation page have XL-sized main headings, so the subheadings are accordingly L-sized. Elsewhere, it's L-size at the top level.
The heading text and the caption vary based on number of children and the number of the current child. The previous code worked fine locally, but initially had both of those values still set to zero on Heroku resulting in being asked for the "next child" on the first time through. As I couldn't quickly work out why the values weren't making it through (logging showed they always were coming through, on localhost), I've changed the logic slightly to avoid obviously wrong text in the page title.
Prior to this, values being set on response.locals in readForm (where the values were taken from the models on the wizard context) weren't coming through until one page later than expected. At least, not on heroku; it was fine on localhost. It seems the session data wasn't being fully flushed to the store on heroku before the next HTTP GET came through, so now I'm not performing the redirect until the session data has been fully saved.
Specifically, if we can't find any clinic sessions whose session presets match the clinic booking we've created, don't try to make any appointments in that booking (as the appointments would need a suitable session ID to hook up to).
Co-authored-by: Paul Robert Lloyd <me+git@paulrobertlloyd.com>
* Fix generateClinicAppointment * Move the check answers page before the health questions. * Fix dob decoration in clinic booking * Allow use of a previously entered address in clinic booking This commit also introduces the Child object (without a context) on the ClinicAppointment object, replacing the unmatchedXxxx properties. --------- Co-authored-by: Paul Robert Lloyd <me+git@paulrobertlloyd.com>
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
Also fix errors from suggested changes commited in PR #223
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.
Parents' booking journey is in the
/book-into-a-clinicroute. Other, earlier routes/clinic-bookingand/clinic-appointmentwill likely be dropped in favour of that but are kept for reference for now.Note: various aspects are currently hard-coded, including:
Some of these things are part-coded, but need debugging.
Next steps planned:
getAppointmentQuestionPaths(booking_uuid, data.wizard)