Skip to content

[docs] Procedure for 3.1 - #120

Open
billjohnc wants to merge 7 commits into
mainfrom
docs/procedure-c3d6
Open

billjohnc wants to merge 7 commits into
mainfrom
docs/procedure-c3d6

Conversation

@billjohnc

@billjohnc billjohnc commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds user documentation for Care's Procedure module to docs version 3.1: the record of procedures that were done on a patient, or not done, or stopped. The PR has one concept page, four flow pages and one reference page. Each flow has a narrated, subtitled video and step screenshots.

All pages are new; no existing page is replaced. Procedure exists only on develop (Care 3.1). It is absent from the 3.0 branches of care and care_fe, so nothing is written to version-3.0.

Pages

  • Concept: versioned_docs/version-3.1/concepts/clinical/procedure.mdx
  • Reference: versioned_docs/version-3.1/references/clinical/procedure.mdx
  • Flows, in versioned_docs/version-3.1/flows/clinical/procedure/. They appear in the sidebar under Flows › Clinical › Procedure, after Condition:
    1. Record a procedure
    2. Update a procedure
    3. Mark a procedure as entered in error
    4. View a patient's procedures

Media for these pages is in static/media/clinical/procedure/: 4 videos with posters and captions, and 22 step screenshots.

The pages keep Procedure apart from Service Request and Activity Definition. A procedure records something done; ordering a procedure is a service request, and nothing in Care turns a service request into a procedure.

Verified against

  • care at ddfd840dbe314b4e53d2a719d2138324d970634b (develop, 23 Nov 2026)
  • care_fe at 5e02f9aa4f690e08375da310511e14606985f788 (develop, 26 Nov 2026)

How the pages were verified

  • From code. Every statement in the pages rests on a recorded fact, each with the file, the lines and a quote. The facts break down as follows:

    • 198 backend facts
    • 200 frontend facts
    • 69 + 26 facts added for the reference page
    • 52 facts added while the pages were written and reviewed

    A script checked every quote against its lines at the pinned commits.

  • At runtime. The flows were recorded on a local Care backend at the care commit above, with a frontend built from the care_fe commit above. The data is fictional only. 16 facts come from what the screen or the API showed, among them:

    • Staff refused at save.
    • A closed encounter refused at save.
    • Statuses and future dates refused.
    • The C shortcut.
    • The list call lacking the encounter and the recorder.
    • The panel refreshing after a save.
  • Permissions. The permission tables trace the whole path to each action, not only the final permission. That path includes opening the encounter page, which also loads the patient and has its own rule. Two rules were also checked by calling the API:

    • A user with only the Staff role can list a patient's procedures but is refused when saving one.
    • Saving into a Completed encounter is refused even for a Doctor in the facility's root organization.
  • Review. Each page was reviewed by a reader who had not written it, against the facts, the templates and .github/references/review-checklist.md. The findings were fixed and the pages checked again.

Where the pages differ from the house style on purpose

  • Language. Simplified Technical English rules apply to steps, prerequisites and tables. Explanations use plain, consistent English instead.
  • Versions. The pages are in 3.1 only, because the module does not exist in 3.0. The conventions file says the versions are kept identical; that cannot hold here.
  • Permissions. Each table lists every permission on the path to the action, with where it must be held and which default roles hold it.
  • Flow titles. Titles use sentence case without "How to", as every existing 3.1 flow and the flow skill's naming rule do. The flow template still says "How to".
  • Concept page. The concept keeps a Permissions section, which care-concept-doc requires and the template lacks.
  • Media markup. Each video has a captions <track>, and screenshots sit after their steps. The build passes for every language with this markup.

Narration

  • What the voice says. Each video is narrated, one line per step. Each line says the step and a sentence or two of context taken from that page. The subtitles show the words spoken.
  • How it was made. The speech is AI-generated with ElevenLabs (model eleven_v4).
  • Whose voices. Two cloned voices take turns flow by flow, in sidebar order:
    • Bill-eng, cloned from Bill's voice, reads flows 1 and 3.
    • Gauri-eng, cloned from Gauri's voice, reads flows 2 and 4.
  • Timing. Where a line is longer than its step on screen, the video holds a settled frame until the voice finishes. The subtitles are timed to match.

Left out, and open questions

  • Open: is Entered in Error final? The form locks a procedure marked as entered in error and offers no way back. The backend accepts changing it back to Completed, because it has no status rules. The pages describe the form as it is. The product team has not said whether this is intended.
  • Go to Encounter and Reported by. These are left out of the pages. The procedure list call returns neither the encounter nor the recorder, so on Past Procedures "Go to Encounter" builds a link to /encounter/undefined, and "Reported by" never shows (see the issues below).
  • Small screens. The phone layout of the Procedure form (drawers and cards) is read from code only and is not documented.
  • A facility's own forms. A facility can add a "Procedures" question to its own encounter forms. The pages cover the built-in Procedure form only, because saving through a facility form was not traced end to end.
  • Clearing a picked date. Not documented; how to clear a picked date was not settled.
  • Superusers. The permission checks let a superuser through; the pages leave that out and describe the roles product users have.

Suspected product issues (not filed)

  1. Past Procedures: Go to Encounter and Reported by. The list uses ProcedureReadSpec, which has no encounter or created_by. ProcedureTable builds the link and the recorder from those fields. Confirmed at runtime: list responses lack both, while opening one procedure returns them.
  2. Controls shown without the write permission. The Procedures quick action, the panel's Edit pencil and the form appear on clinical-data read alone. A user with only the Staff role fills the form and is refused at save.
  3. Command dialog. "Add Procedure" in the command dialog checks only that the encounter is open, not the clinical-data read the quick action requires.
  4. Closed encounters. A save on a Completed, Cancelled, Discontinued or Entered in error encounter returns "You do not have permission to update encounter". This is the same message as a missing permission. The form page itself also opens for a closed encounter when its URL is pasted.
  5. No status rules. Any status can be set from any status, including back from Entered in error. Status reason and outcome are not tied to the status.
  6. Remove Procedure keeps the status reason. Choosing Entered in Error in the Status list clears it; Remove Procedure does not.
  7. Label mismatch. The recorder is labelled "Reported by" on wide screens and "Recorded by" on phones.
  8. Value set lookup on save. The backend checks codes against the first value set with the slug, which may not be the facility's copy that the search used.

What the skill learned (separate commit)

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 11:59
Concept, reference and four flows (record, update, mark as entered in
error, view) for Care's Procedure module, verified against care ddfd840
and care_fe 5e02f9a. Each flow has a narrated, subtitled video and step
screenshots. 3.1 only: the module is not on the 3.0 branches.

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

- permissions.md: screens inside a record also load the parent record,
  whose read has its own rule (the encounter page loads the patient).
- media.md: wait for the owner session's .recording.lock when sharing its
  environment; value-set option names can carry the matched synonym; type
  into a popover's own input.

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: 82fbaf3
Status: ✅  Deploy successful!
Preview URL: https://a767f0bb.coredocs.pages.dev
Branch Preview URL: https://docs-procedure-c3d6.coredocs.pages.dev

View logs

billjohnc and others added 4 commits November 29, 2026 00:31
Position 13 is also taken by the Referral concept in #111, and 14 by
the Immunization concept in #123. The concepts sidebar is
autogenerated, so pages with the same position have no set order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A report template reads only the fields that Care declares for it, and
no report context has procedures: the encounter context offers
symptoms, diagnoses, allergies, diagnostic reports, form responses,
prescriptions and service requests (care
emr/reports/context_builder/data_points/encounter.py:348-392; no
procedure module in data_points/). The sandbox blocks anything else
(reports/renderer/template_engine.py:23-57). Procedure answers do not
come in through form responses either, because the form leaves
structured answers out of the response (care_fe
serializeQuestionResults.ts:60-65). Pinned care ddfd840,
care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pages listed Admin as a default facility role and said it was the
facility role, not the role-organization one. The code says the
opposite. The permission definitions name an Admin role for facilities
(care security/permissions/encounter.py:24-29,
security/permissions/patient.py:43-62), but roles are stored by name
and the role-organization Admin is synced last, so the only role named
Admin has the ROLE_ORG context (security/roles/role.py:57-67,
management/commands/sync_permissions_roles.py:37-45). The facility role
pickers ask only for FACILITY roles (care_fe RoleSelect.tsx used with
RoleContext.FACILITY in LinkFacilityUserSheet.tsx:207,
EditFacilityUserRoleSheet.tsx:177, LinkUserToDepartmentSheet.tsx:131;
care security/api/viewsets/roles.py:10-15), so no one is offered Admin
in a facility. Each explanation now uses the shared wording from #117.
Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each narrated video now plays from the Open Healthcare Network YouTube
channel (playlist "Care 3.1 documentation"), with its subtitles on
YouTube. The .mp4, .vtt and poster files are removed from this branch.

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