Skip to content

[docs] Patient for 3.1 - #113

Draft
rithviknishad wants to merge 7 commits into
mainfrom
docs/patient-7da6
Draft

rithviknishad wants to merge 7 commits into
mainfrom
docs/patient-7da6

Conversation

@rithviknishad

@rithviknishad rithviknishad commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

What this changes

Brings the Patient docs for 3.1 in line with the Care 3.1 code. The existing pages were published in August "verbatim from care_docs source" and had never been checked against code; nearly every one was materially wrong for 3.1 (wrong navigation, labels, permissions, tabs and steps).

Updated (3.1 only)

  • concepts/clinical/patient.mdx
  • references/clinical/patient.mdx
  • flows/clinical/patient/: search-patient, register-patient, view-patient-profile, update-patient-details, mark-patient-deceased, manage-patient-identifiers, manage-patient-tags, manage-patient-users, view-patient-appointments

New

  • flows/clinical/patient/open-patient-home.mdx: Patient Home, where search and registration both lead
  • flows/clinical/patient/view-organization-patients.mdx: a government organization's Patients tab
  • Sidebar: both added under Clinical > Patient, and the patient flows reordered to follow the task order

Media: every flow page has a narrated, subtitled video and step screenshots, under static/media/clinical/patient/. 11 videos (27 to 81 seconds, recorded as the roles each page names: front desk, doctor, nurse, facility admin), 66 step screenshots with alt text, 99 files, 36 MB. The cast is invented (from the shared personas file); phone numbers on screen are invented test values. Two cast patients carry two tags so the profile header keeps the name on one line (see PH1 below). Place names on screen (Kerala, Ernakulam, an address in Kaloor) and one PIN code on a token card come from Care's test fixtures and the recording data; they differ from the team's saved preference for fully invented places, and were kept by the session user's decision.

3.0 pages are untouched: the 3.0 code was not pinned, so nothing here is verified for 3.0.

Verified against

  • care develop @ ddfd840dbe314b4e53d2a719d2138324d970634b (2026-11-23)
  • care_fe develop @ 5e02f9aa4f690e08375da310511e14606985f788 (2026-11-26)

How it was verified

  • Code. About 1,600 facts, each citing file, lines and an exact quote at those commits; every quote was re-checked mechanically against the checkout. Every sentence on every page points to the facts it rests on (markers stripped on publish).
  • Runtime. A disposable local stack at the same commits (no real patient data). 33 probes settled what reading could not, as ordinary-role users (never the superuser). Three permission paths were confirmed by execution, removing one permission at a time: register a patient, update a patient's details, and the profile's tag-config gate.
  • Recordings. All 11 flows were recorded on that stack as the roles the pages name; every API call returned 2xx. Calls the static trace had missed were traced and added to the Permissions tables (open-patient-home, view-patient-profile, update-patient-details).
  • Review. Four independent reviewers checked every sentence against its facts, then a verifier confirmed all 33 must-fix findings were resolved.

Intended differences from the house style

  • Language. Simplified Technical English for steps, prerequisites and tables; plain, consistent English for explanations.
  • Versions. Written for 3.1 only, not mirrored to 3.0 (see above).
  • Permissions. Each table covers the whole path to the action (reaching the screen, page loads, pickers, save), with where each permission must be held and default roles. "Admin" is left out of default-role lists for facility and government-organization permissions: at this pin only one role named Admin exists, and no screen can give it there.
  • H1. Plain task headings (# Search for a patient), as all 192 flow pages on the 3.1 site do; care-flow-doc/SKILL.md contradicts itself on this.
  • Media. Each video has a captions track, and screenshots sit after the step they show. Both are new to the site; the build passes for every language.
  • Narration. The voice reads a short script per step (the step plus a sentence or two of context from the page) and the subtitles show what it says. AI-generated with ElevenLabs (eleven_v4), using cloned voices of Gauri and Bill (voices "Gauri-eng" and "Bill-eng"), taking turns flow by flow. Where a line is longer than its step, the video holds a settled frame and the subtitles are timed to match.

Left out, on purpose

  • Configuring a facility's patient identifiers. Facility admins can set them up, but no screen in 3.1 lets anyone enter a value on a patient; left out by product decision until that exists. The reference also leaves out the facility identifier-config write endpoints.
  • Deleting a patient (superuser only, soft delete).
  • The FHIR Patient claim in the old reference: core Care has no FHIR Patient resource at this pin.
  • Neighbour tasks seen on the patient pages (booking an appointment, referrals, resource requests) belong to their own modules.

Needs follow-up

  • Malayalam translations of the concept and reference pages (i18n/ml/.../concepts/clinical/patient.mdx, .../references/clinical/patient.mdx) still describe the old behaviour; they need re-translation.
  • Open question: a team's or responsibility's Patients tab is not filtered to that team; whether that is intended was not settled, so the page does not describe that list's contents.
  • Neighbour pages: 14 encounter and care-team pages say "Facility Administrator" and give Administrator a permission only Admin holds; condition/view-clinical-history and scheduling/token/create-token miss the patient-page start points.

Product defects found (not filed yet)

Certain defects, each with file and lines at the pinned commits; filed only with the product team's agreement:

  • F2 (care): Creating a patient with neither age nor date of birth returns a 500 instead of a validation error care/emr/resources/patient/spec.py:142-147
  • F5 (care): update_identifier rejects re-saving the patient's own unique identifier value, with a 500 server error (confirmed P26, E1850) care/emr/api/viewsets/patient.py:416-420
  • F7a (care): set_facility_identifier overwrites the default value with None care/emr/api/viewsets/encounter.py:401,414
  • F1 / FA-F15 / FB10 (care): Patient organization_cache stores the link-row id instead of the organization id (latent: nothing creates links) care/emr/models/patient.py:90-96
  • F11 (care): year_of_birth typed as a date in a spec care/emr/resources/patient/spec.py:214
  • FA-F2 (care_fe): Duplicate-patient dialog shows a random ID for each existing patient src/components/Facility/DuplicatePatientDialog.tsx:95
  • FA-F3 (care_fe): Duplicate-patient dialog shows the raw gender value, not its label src/components/Facility/DuplicatePatientDialog.tsx:98
  • FA-F8 (care_fe): Registration form shows a "nationality" message in the wrong place src/components/Patient/PatientRegistration.tsx:1077-1078
  • FB1 (care_fe): Patient Home link becomes /facility/undefined/... when the profile opens without a facility src/components/Patient/PatientProfile.tsx:170-183
  • F14 (care): Two default roles are named "Admin"; only one is stored (context ROLE_ORG only), so neither the facility nor the government-organization role picker offers Admin (confirmed P7, E1813, E1814) care/security/roles/role.py
  • P32 (care (frontend side: care_fe)): Recording a death through a form's Time of Death question clears the patient's PIN code: the form sends only the time of death, and an update without a PIN code sets it to empty (confirmed P32, E1858, E1859) care/emr/resources/patient/spec.py:192-193; care_fe src/components/QuestionnaireV2/structured/definitions/timeOfDeath.ts
  • UT1 (care_fe (cause in care)): The patient Users tab and Assign User panel show a User Type label that is always empty: the user API stopped returning user_type in care commit 738a040d5 (2026-03-18), but care_fe still renders it (confirmed live, E2101, E2102) care_fe src/components/Patient/PatientDetailsTab/PatientUsers.tsx:137-140, 280-281
  • PH1 (care_fe): On the patient profile, a patient with no identifiers and no tags has the name squeezed into a column one or two letters wide ("Sam / uel / Joh / n"); seen while recording (evidence media/out/r1-evidence/profile-header-name-wrap.png); with one identifier and no tags, a two-word name still breaks onto two lines ("David / Kumar"); the recordings give the cast patients two tags to avoid it. src/components/Patient/PatientHeader.tsx:197 (md:max-w-1/2)
  • FB4 (care_fe): Keyboard shortcut "h" (Go to Patient Home) has no target src/config/keyboardShortcuts.json:32-34
  • FB5 (care_fe): "View all appointments" leads to an Appointments tab that list-only users cannot see src/pages/Patient/home/PatientHomeTabs.tsx:40-46

Notes that are not certain defects (permission scope differences, a role-context check the backend does not make, a silent 403 on Patient Home's encounter list, a Remove dialog quirk, and others) are in the session report.

Ezhuthachan skill changes (separate commit)

  • media.md: claim ports and a Redis index before starting a stack (two sessions collided on 26 Nov); a stack another session reuses is not stopped at wrap-up; snapshot the cast from the shared personas file; set the fixture government organizations' level types and clear the fixture facility's phone before recording.
  • research.md: check every quote mechanically, give parallel researchers separate fact ranges, have subagents return findings as text, and read the recordings' API logs against each path (it found three missing Permissions rows here).
  • writing.md: the # How to vs plain H1 contradiction in care-flow-doc/SKILL.md; follow the site.

🤖 Generated with Claude Code

Open Healthcare Network and others added 2 commits November 28, 2026 00:37
Re-verify the Patient concept, reference and nine flows against care
ddfd840 and care_fe 5e02f9a, and add two flows: Open Patient Home and
View an organization's patients. Each flow page gets a narrated,
subtitled video and step screenshots. Pages are written for 3.1 only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claim ports and a Redis index before starting a stack, and never stop a
stack another session reuses. Snapshot the shared cast, fix the fixture
government organizations' level types and the facility phone before
recording. Check quotes mechanically, give researchers separate fact
ranges, read recordings' API logs against each path. Note the flow H1
contradiction, cap loud narration clips, and link per-flow recordings
for the narration scripts.

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

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

Copy link
Copy Markdown

Deploying coredocs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 18922b0
Status: ✅  Deploy successful!
Preview URL: https://ec3b02c8.coredocs.pages.dev
Branch Preview URL: https://docs-patient-7da6.coredocs.pages.dev

View logs

Open Healthcare Network and others added 4 commits November 28, 2026 17:55
The profile header squeezed the patient's name onto two lines in
update-patient-details and view-organization-patients. The cast patients
now carry two tags, which keep the name and age on one line. Narration
reuses the existing speech; videos, posters and screenshots replaced.

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

PR 113 and PR 119 both rewrote view-patient-appointments.mdx. This page stays
with PR 113, so the points that only PR 119 had are added here, each checked
in the code:
- The View all appointments number counts only today's appointments at the
  facility with an Upcoming status, and the link opens nothing when the
  Appointments tab is hidden (UpcomingAppointmentCard.tsx:41-54,66-74;
  PatientHome.tsx:141-146; PatientHomeTabs.tsx:38-46,82-86).
- The Bookings tab of the Book Appointment sheet lists the same appointments
  (BookAppointmentSheet.tsx:61-88).
- Opening an appointment needs Can list bookings on Object at its facility
  (care booking.py:138-145), and it opens on Appointment Details.
- A deployment setting can open any patient's profile, off by default
  (care patient.py:99-101, config.py:301-302).
PR 119's token text and its two permission names were wrong and are not
copied; this page already had the right token list (PatientTokensList.tsx:48-57).
Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Requests row said only that Create Request "starts a request". The button
opens the Create Request form for a resource request from the current facility,
with the patient linked and shown as Linked Patient; the user picks the
facility that provides the resource (ResourceRequests.tsx:50-60,
ResourceForm.tsx:71,104-110,186-199,257-279). Pinned care ddfd840, care_fe 5e02f9a.

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

The Clinical History row linked "View the clinical history", a page that
covers only symptoms and diagnoses. The clinical history page has eight tabs
(clinicalHistoryTabs.tsx:41-105), and the encounter workspace can change the
set (ClinicalHistoryWorkspace.tsx:44-47,85-130). The row now names the tabs and
the link text says what the linked page covers. 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>

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.

2 participants