Skip to content

[docs] Specimen for 3.1 - #138

Open
billjohnc wants to merge 3 commits into
mainfrom
claude/specimen-3-1-update-eb5253
Open

billjohnc wants to merge 3 commits into
mainfrom
claude/specimen-3-1-update-eb5253

Conversation

@billjohnc

Copy link
Copy Markdown
Contributor

Summary

Updates the Specimen documentation for docs version 3.1 to match the Care 3.1 code. A specimen is the sample collected from a patient for a service request, created from a specimen definition, with its own specimen ID (QR code), status, collection details and processing steps. This PR rewrites the concept, the flows and the reference, merges "View specimen history" into "Discard a specimen", and adds "Find a specimen by its QR code". Each flow has a narrated, subtitled video and step screenshots.

Version 3.0 is not touched.

Pages

  • Concept: versioned_docs/version-3.1/concepts/clinical/specimen.mdx (replaced; title is now "Specimen", without the "Clinical - " prefix, as in the other module PRs)
  • Reference: versioned_docs/version-3.1/references/clinical/specimen.mdx (updated)
  • Flows in versioned_docs/version-3.1/flows/clinical/specimen/, in sidebar order (Flows › Clinical › Specimen):
    1. Collect a specimen (replaced; now ends with printing labels)
    2. Process a specimen (replaced; adds editing a recorded step)
    3. Discard a specimen (replaced; ends with finding the discarded specimen in Specimen History)
    4. Find a specimen by its QR code (new)
  • view-specimen-history.mdx is deleted and its sidebar line replaced by the new flow. Only the Specimen pages linked to it; no open PR links to it.

Media is in static/media/clinical/specimen/: 4 videos, each with a poster and subtitles, plus 27 step screenshots at full resolution (2880 by 1800).

What changed for readers

  • Who can do it. The old tables listed one permission. The new tables list every permission on the path, where each must be held, and the default roles. Collecting, processing and discarding need "Can Create Specimen on Facility" in the encounter's departments, or in a department of one of the request's locations. Opening the service request page needs "Can Read Service Request" and "Can Read Activity Definition". "Can Read Specimen" is needed only for the QR lookup and for sharing a specimen in a referral; Specimen History does not need it.
  • Getting there. From the facility, a lab's requests open from Services › the laboratory service › View Requests; the location switcher exists only inside a location. On wide screens See Details is in the row of the request.
  • Labels and steps. Corrected button names (Generate QR, Mark as collected), added Collection Method, the quantity unit and when quantity is required, the whole-number rule for Fasting Duration, and the Print QR Codes panel.
  • Lifecycle. A draft is created when you select Collect Specimen or Print All QR Codes, so labels can be printed before the sample is drawn. After a discard the requirement shows Collect Specimen again for a replacement. No screen returns a discarded specimen to Available.
  • Processing. Once a diagnostic report exists, new steps cannot be added; recorded steps can still be edited.
  • Specimen type comes from HL7 table 0487, not SNOMED CT as the old page said.
  • Reference. Removed the procedure field and the list endpoint that do not exist; added creation through the service request (create_specimen_from_definition), the authorization rule and where it is held, the global accession lookup, and that accession identifiers are not unique.

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 rests on a recorded fact with file, lines and quote. A second check opened every permission, role and label fact at the pins; it struck one fact (who needs "Can Read Specimen" for referrals) and corrected five.
  • At runtime. The four flows were recorded on a local Care stack running exactly the commits above, with invented data only, as a Facility Admin. The recordings corrected the way in (Services › View Requests), See Details in the table row, and showed that "Searching..." is never displayed in the scan dialog.
  • Permissions. The recordings' API logs showed no 403. The service request page also loads accounts and charge items; every default role holds those permissions.
  • Review. Each page was reviewed by a reader who did not write it, against the facts, the templates and .github/references/review-checklist.md. The findings were fixed.

Differences from the house style, on purpose

  • Language. Simplified Technical English rules apply to steps, prerequisites and tables. Explanations use plain, consistent English.
  • Versions. 3.1 only, verified against the commits above; 3.0 is unchanged.
  • Permissions. Tables list every permission on the path to the action, with where it is held and the default roles, and say that installations can have other roles.
  • Concept page. Keeps "How it connects" and a three-column Permissions section, which care-concept-doc asks for and the template lacks.
  • Media markup. Each video has a subtitles <track>, and screenshots follow their steps. The build passes for every language.

Narration

  • What the voice says. One line per step: the step and a sentence of context from that page (Discard: the step and one short sentence, to keep held frames short). The subtitles show the words spoken.
  • How it was made. AI-generated with ElevenLabs, model eleven_v4.
  • Whose voices. Two cloned voices take turns flow by flow in sidebar order:
    • Gauri-eng, cloned from Gauri's voice: Collect a specimen, and Discard a specimen.
    • Bill-eng, cloned from Bill's voice: Process a specimen, and Find a specimen by its QR code.
  • Timing. Where a line is longer than its step on screen, the video holds a settled frame until the voice finishes, and the subtitles are timed to match.

Left out, and notes for other pages

  • Condition and Received at. A specimen can hold both, but no screen records them, so the concept leaves them out; the reference keeps the fields.
  • Service Request PR ([docs] Service Request for 3.1 #128). Its location page names Scan the QR code in one sentence. Neither PR links to the other's new page; whichever merges second can add the link to "Find a specimen by its QR code".
  • Starting from the encounter. The flows give it one sentence and link to "View service requests"; that gate belongs to the Service Request pages.
  • Collection Date & Time shows UTC in the screenshots and videos (issue 2 below). The pages do not describe the field's time.

Suspected product issues (not filed)

  1. Specimen actions are shown without the permission. Anyone who can open the service request sees Collect Specimen, Mark as collected, Discard and processing; the save is then refused.
  2. Collection Date & Time shows UTC and shifts the saved time after an edit (SpecimenForm.tsx:110,432-444); visible in the recordings.
  3. Request status is enforced only on screen. The backend creates and updates specimens on a request in any status; Print All QR Codes creates drafts on On Hold, Ended, Revoked or Entered in Error requests.
  4. A discarded specimen can be set back to Available through the API.
  5. Accession identifiers are not unique, and the lookup searches every facility. Two specimens with one ID make the lookup fail with "Specimen not found".
  6. The lookup's own "not found" message is unreachable (get_object_or_404 answers first).
  7. Untranslated strings. Unsatisfactory has no locale key; the discard reasons, the print panel's statuses and the processing and discard messages are English text in code, and the success messages show the specimen's internal ID.
  8. Specimens are readable without "Can Read Specimen": the service request response embeds them, checked only by "Can Read Service Request".
  9. Editing a processing step records the editor as its performer.
  10. "Show patient details and specimen ID?" prints no patient details.
  11. A decimal Fasting Duration fails the save with no hint; the field accepts decimals.
  12. The collection note is not shown after collection (only in Specimen History or a referral).
  13. Specimen History's empty text says no specimens were recorded when there are collected ones.
  14. The "no processing after a report" rule is half applied: edits and the API stay open.
  15. "Failed to generate QR Code" flashes right after Collect Specimen, before the draft exists.

🤖 Generated with Claude Code

billjohnc and others added 2 commits November 29, 2026 14:43
Concept, reference and flows checked against care ddfd840 and care_fe 5e02f9a (develop).
Collect, process and discard rewritten; label printing is the last step of Collect.
View specimen history merged into Discard; new flow Find a specimen by its QR code.
Full permission paths, and screenshots recorded on a local stack at the same commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four flow videos with AI narration (ElevenLabs eleven_v4, voices Gauri-eng and Bill-eng)
and subtitles of the spoken words; frames are held where a line is longer than its step.

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

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

Copy link
Copy Markdown

Deploying coredocs with  Cloudflare Pages  Cloudflare Pages

Latest commit: be0922b
Status: ✅  Deploy successful!
Preview URL: https://91df94a7.coredocs.pages.dev
Branch Preview URL: https://claude-specimen-3-1-update-e.coredocs.pages.dev

View logs

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.

1 participant