Skip to content

Close a clinic workflow - #389

Open
rivalee wants to merge 19 commits into
mainfrom
close-clinic
Open

Close a clinic workflow#389
rivalee wants to merge 19 commits into
mainfrom
close-clinic

Conversation

@rivalee

@rivalee rivalee commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Card: Closing a clinic workflow

Changes to clinic list

  • Surfaces clinic names in the clinic list, eg clinic CH435
  • Adds a link to close clinic
  • Rename completed clinics to closed clinics

and

  • Adds new page for closing a clinic

Clinic list with clinic names

Screenshot 2026-08-05 at 15 45 05

Close clinic link

Screenshot 2026-08-05 at 15 45 46

Close clinic page

  • To close the clinic, all participants need an outcome recorded
  • Two main sections: needs an outcome and outcome recorded
  • Checked in, not screened and Did not check in can be actioned en masse or individually
  • In progress is more complicated and need the mammographer to finish the appointment
  • Changes to the list (eg marking participant status) happens inline and instantly without a success banner
  • On page refresh, the outcome recorded section is updated
manage-breas-close-clin-eeepfz herokuapp com_clinics_wtrl7jud_close

Validation message

It's not possible to close a clinic until all participant outcomes are recorded, and we should show a validation message

Screenshot 2026-08-05 at 15 55 22

Successfully closing a clinic

When the clinic is closed, the clinic moves from today to the closed list with a success banner

Screenshot 2026-08-05 at 15 53 55

@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 3, 2026 14:04 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 3, 2026 14:33 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 3, 2026 14:39 Inactive
@rivalee rivalee changed the title Add close clinic page Close a clinic workflow Aug 3, 2026
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 4, 2026 10:04 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 4, 2026 14:10 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 4, 2026 14:49 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 4, 2026 14:51 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 5, 2026 12:05 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 5, 2026 12:42 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 5, 2026 14:29 Inactive
@rivalee
rivalee marked this pull request as ready for review August 5, 2026 14:56
@rivalee
rivalee requested a review from edwardhorsford August 6, 2026 09:08
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 6, 2026 14:15 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 11, 2026 10:21 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 11, 2026 15:15 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 13, 2026 12:46 Inactive
- fix validation losing form answers, and modal onSuccess never firing
- collapse eight action routes into parameterised set-status routes
- share the attended-not-screened form fields between both flows
- replace inline page script with close-clinic.js using server-rendered
  row fragments, so rows update in place after actions and modal saves
- track close-flow resolved ids in session data; add updateClinic helper
- move table styles out of _compact.scss; revert ANS tag colour to orange
- seed some attended-not-screened appointments without details
- attended-not-screened fields become a context include, matching the
  repo's include convention
- reschedule step now closes the modal and updates the row in place,
  matching the no-reschedule path
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-close-clin-eeepfz August 14, 2026 14:27 Inactive
- fragment-actions.js: links and forms marked data-fragment-action are
  fetched, and the server's re-rendered data-fragment-id element is
  swapped in place; falls back to normal navigation without JS or on error
- priors dashboard: row extracted to a macro rendered by a fragment
  route; deletes the inline script that duplicated status vocab and forms
- clinic page check-in: row extracted to a macro; check-in route returns
  the re-rendered row and main.js swaps it instead of hand-patching tags
- close clinic page moved onto the same convention
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.

2 participants