Skip to content

[docs] Scheduling for 3.1 - #119

Draft
billjohnc wants to merge 13 commits into
mainfrom
claude/scheduling-module-3-1-update-98466b
Draft

billjohnc wants to merge 13 commits into
mainfrom
claude/scheduling-module-3-1-update-98466b

Conversation

@billjohnc

@billjohnc billjohnc commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Updates the Scheduling module for Care 3.1 to match the 3.1 code: schedule templates, schedule exceptions and appointments. Token pages are not touched here; they are in #102.

Pages (version 3.1 only)

Concepts, replaced: Schedule & Availability (concepts/scheduling/schedule), Schedule Exception (concepts/scheduling/exception), Appointment Booking (concepts/scheduling/booking).

Schedule & Availability flows: replaced: Create a schedule template, View a schedule, Edit a schedule template, Delete a schedule template. New: Add or remove a session in a schedule template, Set the charges for a schedule.

Schedule Exception flows, replaced: Add a schedule exception, View schedule exceptions, Remove a schedule exception.

Appointments flows, new (new sidebar group and folder flows/scheduling/appointment/): Book an appointment for a patient, Find and open appointments, Print a list of appointments, Check in a patient for an appointment, Start a consultation from an appointment, Mark an appointment as fulfilled, Mark an appointment as no-show, Cancel an appointment, Reschedule an appointment, Add or change an appointment's tags, Print an appointment.

Patient section, updated: View a patient's appointments and tokens: the appointments part only; the token part is unchanged (owned by #102).

The published pages were far behind the code: they sent readers to a "scheduling section" that no longer exists, used separate Valid From / Valid Till fields (now one Valid Period range), set weekdays per session (now once per template), offered session types the UI no longer creates, put Delete on the template card (it is in the edit sheet), and had no pages for booking or handling appointments.

Verified against

  • care ddfd840dbe314b4e53d2a719d2138324d970634b (develop, 23 Nov 2026)
  • care_fe abf39459484735a57a5139d5c66438ec8b490ad1 (develop, 30 Nov 2026)

The pages were written against care_fe 5e02f9a (26 Nov 2026) and re-checked on 30 Nov against the later changes; none touches these pages. Since then they also describe Scan QR on the appointment bar of an encounter, Scan on the Appointments page, and the token number that the appointment bar shows in place of View Appointment. The cancel and reschedule videos and screenshots now show the token step, with new screenshots for it. They were re-recorded on 30 Nov 2026 at care ddfd840 and care_fe abf394594, on the shared local stack ez-meds-7449 (City General Hospital, invented people), because the stack of the first recordings no longer runs. Following billjohnc's rules of 30 Nov, patient names, contact details, IDs and QR codes are blurred while recording, and the narration reads each step as a sentence, without step numbers.

How it was verified

  • Code. Every statement rests on a fact read in the pinned code, recorded with file, lines and the exact quote (about 1,060 facts; every quote re-checked against the pin by script). Two reviewers who did not write the drafts checked each sentence against its fact; their findings were fixed.
  • Recording. All 21 flows were recorded on a local stack started from the pinned commits (fixture data and an invented cast only). Steps that did not match the screen were corrected in the page before recording again; four pages changed this way.
  • Permissions. Each flow's Permissions table covers the whole path to the action (reaching the page, loading it, the control, the save), with display names, where each permission must be held for a practitioner, a location or a healthcare service, and the default roles. The API calls each recording made were compared with the tables; no call was refused. One path was confirmed by execution: a Facility Admin who belongs only to the Administration organization was refused (403) when creating a template for a healthcare service managed by General Medicine, while a Doctor in General Medicine could create, edit and delete there.

Differences from the house style, on purpose

  • Language. Simplified Technical English rules apply to steps, prerequisites, warnings and tables; overviews and concept sections use plain, consistent English.
  • Versions. Pages are written for 3.1 only; 3.0 was not verified and is not changed.
  • Permissions. Flow tables list every permission on the path, not only the final one. The concept template has no Permissions section and the checklist forbids slugs, so each concept carries "Who can work with ..." as a sub-section under Key Attributes.
  • Media. Each of the 21 flows has a video with a subtitle track and step screenshots at full resolution, as in [docs] Token management for 3.1 #102: 196 files, about 86 MB (screenshots 52 MB, videos 34 MB).
  • Narration. Each video has a spoken track: one line per step, the step plus a sentence or two of context taken from the page, and subtitles that show the spoken words. The voices are AI-generated with ElevenLabs (model eleven_v4), cloned from two team members, Bill and Gauri. They take turns flow by flow in sidebar order: Gauri reads the 1st, 3rd, 5th and every other flow, Bill the rest. Where a line takes longer than its step on screen, the video holds a frame until the voice finishes, and the subtitles are timed to match.

Left out

  • Open and Closed session types: the backend still stores them, but the 3.1 screens cannot create them.
  • Patient self-booking: one paragraph in the concepts (what "Make the template public" does); no patient-side flow.
  • The token part of "View a patient's appointments and tokens" (in [docs] Token management for 3.1 #102).
  • Behaviour that depends on deployment settings is described as such where the code shows a setting; the screenshots show the repository defaults.

Product issues found (nothing filed)

Already tracked upstream:

Certain, not yet reported:

  • care: the backend accepts a schedule exception whose start time is after its end time.
  • care: the encounter error "Encounter already has an associated booking" names the wrong record (it is the booking that already has an encounter).
  • care_fe: Remove on a schedule exception is shown to users who cannot change schedules (for example the Administrator role); the backend refuses it.
  • care_fe: "View all appointments" on Patient Home opens an empty tab for users who can list but not update appointments.
  • care_fe: Auto-fill slot duration can produce fractional minutes (60 minutes / 7 slots = 8.57), which the backend refuses.
  • care_fe: Patients per Slot in the edit sheet's new-session form is marked required but not validated (see the closed care_fe#13305).
  • care_fe: hard-coded English strings on the schedule template and exception sheets.
  • care_fe: the delete-session icon button has no accessible name.
  • care_fe: deleting a schedule template shows "Not Found" right after "Template has been deleted" (the sheet refetches the deleted template).

Likely: an appointment update can reopen a cancelled or rescheduled booking without taking its slot back; the Appointments page shows "No appointments found" instead of a permission message; the board starts with the signed-in user as practitioner and stays empty without a message for staff who have no schedule; text typed in an abandoned cancel or no-show dialog can be saved as the note by Mark as entered in error; Schedule Appointment on patient search is shown to users who cannot book.

Skill

Moved to the consolidated Ezhuthachan skill update, #141. This PR no longer changes .claude/skills/.

🤖 Generated with Claude Code

billjohnc and others added 2 commits November 28, 2026 10:49
Rewrite the Schedule, Schedule Exception and Appointment Booking concepts and
the schedule and exception flows against care ddfd840 and care_fe 5e02f9a, add
flows for sessions and schedule charges, add an Appointments group of 11 flows,
and update the appointments part of View a patient's appointments. Each flow
has a narrated video with subtitles and step screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…peaks

The recording kit hides the TanStack devtools buttons a care_fe dev server
adds. The narration stitcher limits peaks at -2 dB and pads the picture to
the sound's length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Deploying coredocs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7338ff1
Status: ✅  Deploy successful!
Preview URL: https://984904eb.coredocs.pages.dev
Branch Preview URL: https://claude-scheduling-module-3-1.coredocs.pages.dev

View logs

billjohnc and others added 6 commits November 29, 2026 00:33
PR 113 (Patient) and this PR both rewrote
flows/clinical/patient/view-patient-appointments.mdx and added the same seven
media paths with different images, so the two cannot both merge. PR 113 owns
the page; its version now carries the points that were only here. This
restores main's version of the page and removes the 11 media files this PR
added for it (view-patient-appointments-1..8.png, .mp4, .poster.png, .vtt).
No other page in this PR uses them, and links to the page keep working
because main has it.

This version also had errors that are not carried over: the token text (the
list shows up to 50 tokens of the patient at this facility for one date,
PatientTokensList.tsx:48-57) and two permission names that do not exist
("Can list token on Object", care token.py:47-48; "Can Create encounter",
encounter.py:34). Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The facility role pickers never offer Admin. Roles are synced by name, and the
only role row named Admin ends up with the role-organization context
(care sync_permissions_roles.py:37-45, role.py:57-67,81-93); facility pickers
ask for roles with the facility context (LinkFacilityUserSheet.tsx:207,
EditFacilityUserRoleSheet.tsx:177, LinkUserToDepartmentSheet.tsx:131;
care roles.py:10-15). The default role lists now leave Admin out, and the two
charge definition permissions name only Facility Admin
(charge_item_definition.py:18-21,39-42). Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t's charge

The pages said only that you cannot change an appointment's charge items on
Appointment Details. The page also shows Create Invoice whenever the
appointment has a billable charge item (AppointmentDetail.tsx:615-623,
ChargeItemsSection.tsx:103-128), and the sheet lists that appointment's
billable charge items (useInvoiceChargeItems.ts:36-56). Booking creates the
charge item from the template's consultation charge as billable (care
availability.py:185-202, apply_charge_item_definition.py:92), so the button
shows by default. find-appointments and the schedule concept now say so and
link main's Create an invoice flow. Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Booking runs every action configuration for Appointments in the same
transaction as the booking, with no error handling, so an action that raises
an error rolls the booking back (care availability.py:349-361,
action_base.py:29-44, action_evaluator/base.py:108-115). These configurations
are set up for the whole instance, not by a facility (action.py:43-53,
models/action.py:70-73). book-appointment now says so after the refusal list.
Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd how to cancel it

Cancelling, entering in error or rescheduling an appointment never touches its
token (care booking.py:188-206 cancel_appointment_handler; reschedule at
239-253 creates the new appointment without a token, availability.py:132-160).
The old token stays Created in its queue, where the next-token call can pick it
(token_queue.py:230-236). Since care_fe #17292, Appointment Details lets staff
cancel the token from its card: a three-dot menu with Cancel Token, shown only
with Can Create on Token and only for an active token
(AppointmentTokenCard.tsx:70-74,123-153, AppointmentDetail.tsx:340-349;
token.py:34-46). The backend checks that permission in the same places as the
booking permissions (care authorization/token.py:35-52,98-133). After a cancel,
Generate Token does not come back (AppointmentDetail.tsx:340,
booking.py:302-303). cancel-appointment and reschedule-appointment gain the
steps, find-appointments and the booking concept the note, all linking main's
Cancel a token flow. Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Appointment Details print adds the patient's filled additional fields
(extension context appointment_print) as rows right after the Patient row,
before the phone number (care_fe AppointmentPrint.tsx:91-94,
appointmentPrintData.ts:102-116; empty values are dropped in
usePatientExtensionData.ts:33-43). Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
billjohnc and others added 3 commits November 30, 2026 16:26
care_fe abf394594 (pin; AppointmentEncounterHeader.tsx, PatientIDScanDialog.tsx, AppointmentPrint.tsx)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Appointment

care_fe abf394594 (pin; AppointmentEncounterHeader.tsx:536-573)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
care_fe abf394594 (pin; AppointmentsPage.tsx:463-472, PatientIdentifierFilter.tsx:469-475,487-490,506-517)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
billjohnc and others added 2 commits November 30, 2026 20:53
care_fe 7720a8c0b (#17292)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant