Skip to content

[docs] Diagnostic Report for 3.1 - #121

Draft
rithviknishad wants to merge 9 commits into
mainfrom
claude/diagnostic-report-update-6c11e7
Draft

rithviknishad wants to merge 9 commits into
mainfrom
claude/diagnostic-report-update-6c11e7

Conversation

@rithviknishad

@rithviknishad rithviknishad commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What this changes

Brings the Diagnostic Report pages for Care 3.1 in line with the 3.1 code. Version 3.0 is left as it is.

Page Change
Concept: Diagnostic Report Updated. Adds the Preliminary-to-Final lifecycle, approval, several reports per service request, the specimen rule, and a permissions section that says where each permission must be held
Flow: Enter diagnostic report results Rewritten at the same address. The old page described fields that do not exist (Category, Code, Unit, Interpretation, a status picker). Creating the report is now its first step
Flow: Review and approve diagnostic report results New. Review Test Results → Approve Results → Confirm, which makes a report Final
Flow: View a diagnostic report Updated: permissions (the tab needs clinical-data access), labels, the filter, the observation history, and other ways in
Flow: Print a diagnostic report Updated: the entry points, the preview's own Print button, printing all approved reports of a request, and what the printout contains
Reference: Diagnostic Report Updated: 3 wrong claims fixed. Adds endpoints, filters, upsert_observations, authorization per action, and files
Flow: Update a diagnostic report Removed. The edit screen it described does not exist in 3.1; a report is changed only on the service request page before approval, which "Enter diagnostic report results" covers. Nothing else linked to it. The site has no redirect plugin, so the old address returns "Page not found", as with earlier retired pages (decided by the product team)

The 3.1 flow sidebar now lists the flows in this order: enter, review and approve, view, print.

Verified against

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

Every statement was checked against that code. 762 facts with file, lines and quote back the pages, and a reviewer who had not seen the drafts read each page against them. The four flows were recorded on a disposable local Care stack running those same commits, with no real patient data. The API calls each recording made were compared with the traced permission path: no call failed, and every predicted gate fired. Permission paths were not proved by removing one permission at a time.

Media

  • One narrated, subtitled video per flow, plus step screenshots, in static/media/clinical/diagnostic-report/ (36 files).
  • Narration is AI-generated with ElevenLabs (model eleven_v4) in two cloned voices, taking turns flow by flow in sidebar order: Bill-eng, cloned from Bill (enter, view), and Gauri-eng, cloned from Gauri (review and approve, print). Each step's line is the step plus a sentence or two of context from the page, and the subtitles show what the voice says. Where a line is longer than its step, the video holds a frame and the subtitles are timed to match.
  • The patient in "Enter diagnostic report results" and "Review and approve diagnostic report results" has two facility patient tags. Without them the Service Request page header wraps the patient's name onto two lines.
  • Not shown on screen: attaching files in "Enter diagnostic report results" (step 6), because the recording stack has no file storage; and the browser's print dialog, which a recording cannot capture.

Differences from the house style, on purpose

  • Language. Simplified Technical English rules apply to steps, prerequisites and tables; overviews and concept sections use plain, consistent English.
  • Versions. Written to 3.1 only, the version whose code was verified. The 3.0 pages are untouched.
  • Permissions. Each flow's table covers the whole path a user needs to reach the action (opening the encounter or service request, loading the lists), not only the final permission. "Admin" is the facility/government-organization role; two default roles share that name.
  • Flow titles. The H1s are the page titles ("Enter diagnostic report results"), as in every existing flow, not "How to …" as the flow template shows.
  • Concept. It keeps a Permissions section and short sections on review and approval, specimens, and several reports per request, like the sibling 3.1 concepts, though the concept template has no such sections.
  • Troubleshooting. Flows end with an "If something goes wrong" table, built only from messages the code shows.

Left out because it could not be verified

  • What the location's Service Requests page shows when only the location read is refused ("Can List Facility Locations"). This needs a run.
  • How a user reaches the facility itself. This is a neighbour path, stated as a prerequisite.

All product-team questions for this module were answered in the session.

Product issues found (none filed)

Clear defects. The team chose not to file D1 and D2 now:

  • D1 (care_fe): with more than 14 reports, the encounter tab's activity-definition filter can show "No Diagnostic Reports Found" while matching reports exist further down.
  • D2 (care_fe): the empty message says "for this encounter, try clearing the search filter", even in clinical history and when no filter is set.
  • D32 (care_fe): the patient identifier "Use" options (usual, official, temp, secondary, old) have no translation keys.

Notes, which may be intended:

  • An approved (Final) report still accepts updates through the API (D3), while the screen says approval cannot be undone.
  • The report page offers Archive and Rename for a Final report's files (D4).
  • Create Report, Save Results and Approve Results show to users who cannot use them. Staff sees them and the save is refused (D5).
  • The encounter and clinical-history lists follow clinical-data access, not "Can Read Diagnostic Report" (D6).
  • A service request shows report summaries to users who cannot open a report (D7).
  • The backend does not enforce the screens' rules: request state, specimen collection, closed encounter (D8).
  • Others: D9–D31 are in the session report, including PATCH behaving like PUT (D28) and every report being filed as Laboratory (D22).

The skill learned

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

🤖 Generated with Claude Code

Open Healthcare Network and others added 2 commits November 28, 2026 16:30
Concept, reference and flows checked against care ddfd840 and
care_fe 5e02f9a (develop). Rewrites "Enter diagnostic report results",
adds "Review and approve diagnostic report results", removes
"Update a diagnostic report" (its edit screen does not exist in 3.1),
and adds narrated, subtitled videos and step screenshots for the
four flows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lessons from the Diagnostic Report session: setup helpers get the cast
and the memory rules about names and addresses; check whether cast
patients are already taken on a shared stack; never rewrite the shared
personas.md; do not let npx fetch tools that are not installed; record
anyway when the terminology-server check is refused.

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: ff30350
Status: ✅  Deploy successful!
Preview URL: https://a1662b0d.coredocs.pages.dev
Branch Preview URL: https://claude-diagnostic-report-upd.coredocs.pages.dev

View logs

Open Healthcare Network and others added 2 commits November 28, 2026 17:54
The patient header on the Service Request page wrapped "Thomas / Varghese"
onto two lines. The patient now carries two facility patient tags, which keep
the name on one line. Both flows are re-recorded, with the same narration,
and their posters and step screenshots are replaced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without tags, Care 3.1's patient header wraps the patient's name onto two
lines; one tag still wraps, two keep it on one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
billjohnc and others added 2 commits November 29, 2026 00:29
Approve Results sends only the status, the stored category, code and note,
and the conclusion of the review card, with no result values
(care_fe useDiagnosticReportReview.ts:110-111,129-139). The entry card
keeps its edits in page state only (useDiagnosticReportDraft.ts:24-31) and
the page has no unsaved-changes guard. After approval the entry card is
gone (diagnosticReportCreation.ts:51-53, DiagnosticReportItem.tsx:58) and
the backend refuses result writes on a final report (care
diagnostic_report.py:148-151). So unsaved values and an unsaved entry-card
conclusion are lost without a warning. Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save Results resends every result that has a value, also results saved
earlier: the draft starts from the saved observations with their ids
(care_fe useDiagnosticReportDraft.ts:30, diagnosticReportObservationUtils.ts:32-61)
and each one that passes shouldSaveObservation (:145-157) gets
effective_datetime = now (:175). The backend writes it on update
(care diagnostic_report.py:170-179, observation/spec.py:131-133,
resources/base.py:92-99). Empty results are not sent. This also corrects
"changed only the conclusion": the Diagnostic report saved successfully
message shows only when no result is sent (useDiagnosticReportSave.ts:72-79,
128-135), and the reference row said results are sent only when changed.
Pinned care ddfd840, care_fe 5e02f9a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
billjohnc added a commit that referenced this pull request Nov 28, 2026
PR #121 rewrites enter-diagnostic-report-results.mdx and deletes
update-a-diagnostic-report.mdx. Both PRs editing the same pages would
conflict, and the coordinator chose #121's pages. This restores main's
versions of the two pages, so this PR no longer touches them. The
save-before-approve and re-stamp points that this PR made there are now
in #121. The links from this PR's own pages go to
enter-diagnostic-report-results.mdx and view-a-diagnostic-report.mdx,
which exist on main and stay in #121.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
billjohnc added a commit that referenced this pull request Nov 28, 2026
PR #121 deletes update-a-diagnostic-report.mdx and moves the update
steps into enter-diagnostic-report-results.mdx, which this list already
links on the line above. Pointing the link there would list the same page
twice, so the line goes. After #121 merges, its new page "Review and
approve diagnostic report results" can be added here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The facility role pickers never offer Admin. The role sync keeps one
role per name, and the role-organization Admin comes after the facility
Admin, so the only role named Admin ends with the role-organization
context (care sync_permissions_roles.py:37-45, roles/role.py:57-67,83-95,
models/role.py:33-38). The facility pickers ask only for facility roles
(care_fe LinkFacilityUserSheet.tsx:207, EditFacilityUserRoleSheet.tsx:177,
LinkUserToDepartmentSheet.tsx:131, PatientUsers.tsx:164; care
api/viewsets/roles.py:10-15). Every list touched names ADMIN_ROLE in care
security/permissions/*.py, and the rest of each list is unchanged. The
explanations that called Admin a facility or government organization
role now say why the lists leave it out, and "these four roles" becomes
three. 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>
billjohnc added a commit that referenced this pull request Nov 30, 2026
… PRs.

The cleanup check found four lessons the open PRs named that this update had
not kept: record anyway when the tool refuses the terminology-server check
(#121), a database-renamed user's profile returns 404 (#111), a role held only
in the facility's root organization does not reach department checks (#116),
and REACT_CARE_URL_MAP must be valid JSON (#108). The code facts go in the
dated list of seeding traps.

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.

2 participants