Skip to content

Add Patient flow docs for 3.1 - #40

Merged
aravindm4 merged 4 commits into
mainfrom
docs/patient-flows
Aug 10, 2026
Merged

Add Patient flow docs for 3.1#40
aravindm4 merged 4 commits into
mainfrom
docs/patient-flows

Conversation

@aravindm4

Copy link
Copy Markdown
Member

What

Moves the newly authored Clinical / Patient documentation into the docs site (version 3.1).

  • Adds nine Patient flows, replacing the single create-patient flow:
    1. Search for a patient
    2. Register a patient
    3. View a patient's profile
    4. Update patient details
    5. Manage patient identifiers
    6. Manage patient tags
    7. Mark a patient as deceased
    8. Manage patient users
    9. View a patient's appointments and tokens
  • Updates the 3.1 Patient concept and reference docs.
  • Updates version-3.1 sidebar with the new flow ordering.
  • Repoints every create-patient link: intro, homepage quick links, HMIS and palliative playbooks, and the Malayalam translations.
  • Removes the stale Malayalam translation of the deleted create-patient flow.
  • Fixes devLocaleWarning to read i18n from @generated/i18n (it is not on siteConfig at runtime).

Verification

npm run build passes for both en and ml locales.

Replace the single create-patient flow with nine Patient flows covering
search, registration, profile, updates, identifiers, tags, deceased
status, users, and appointments. Update the 3.1 Patient concept and
reference, the sidebar, and every link that pointed at create-patient
(intro, homepage quick links, HMIS and palliative playbooks, and the
Malayalam translations).

Also fix devLocaleWarning to read i18n from @generated/i18n.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploying coredocs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4d8f40e
Status: ✅  Deploy successful!
Preview URL: https://6274a878.coredocs.pages.dev
Branch Preview URL: https://docs-patient-flows.coredocs.pages.dev

View logs

Aravind Mahadevan added 2 commits August 10, 2026 12:37
# Conflicts:
#	versioned_docs/version-3.1/concepts/clinical/patient.mdx
Nest flow docs by concept so each clinical concept owns a folder. Adds a
Patient category to the 3.1 sidebar and repoints every link to the new
/flows/clinical/patient/... routes.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

Reviewed the changed .mdx/sidebar files against the concept/flow/reference skills and shared conventions.

The nine new Patient flow docs (search-patient, register-patient, view-patient-profile, update-patient-details, manage-patient-identifiers, manage-patient-tags, mark-patient-deceased, manage-patient-users, view-patient-appointments) are strong: strictly user-facing, no code/API/payload leakage, correct ### N. <imperative> step structure, :::info Prerequisite blocks, field tables with plain-language display labels, and no stray { } or heading-id issues. The old create-patient.mdx (with its ## API equivalent section — a hard layer violation per the flow skill) was correctly removed rather than kept. The new sidebar items array is correctly populated with all nine flows in the Patient category, so the flows are not orphaned in version-3.1.

Four real issues found, flagged inline:

  1. Broken linksversioned_docs/version-3.1/intro.mdx (and the mirrored i18n/ml copy) link to ./flows/clinical/patient/register-patient without the .mdx extension. Per the conventions, extensionless links are reserved only for the translated docs (patient, create-patient); register-patient isn't translated, so this needs .mdx or it risks a broken/ambiguous resolution.
  2. FHIR narration — the new ## FHIR reference section in the concept doc narrates specific endpoints (GET /Patient, POST /Patient) instead of just linking the resource, which the concept-doc skill explicitly disallows.
  3. Dead commented-out content — a large block (blood group, patient tags, volunteer contact, profile sections) is wrapped in {/* ... */} and left in the shipped concept doc instead of being finished or deleted.
  4. Version drift — this PR only touches version-3.1. The shared conventions require version-3.0 and version-3.1 to stay byte-identical; the new flows, concept/reference rewrites, and sidebar restructuring were not mirrored into version-3.0, so the two versions now diverge (3.0 still has only the old create-patient flow).

No corruption (antml:/<invoke> leakage), no {#...} heading-id issues, and the HMIS/palliative playbook and homepage link updates are all consistent and correctly repointed. Could not independently verify the new permission names, blood-group enum values, or field labels (e.g. "Can Update a Patient's data") against ohcnetwork/care/care_fe source in this pass — worth a spot-check before merge if not already sourced from the locale file and permission definitions.> Generated by Docs Reviewer for #40 · auto · 117.9 AIC · ⌖ 2.46 AIC · ⊞ 10.5K

**Flows answer: _How do I…?_**

Step-by-step guides for tasks in Care — for example, [how to create a patient](./flows/clinical/create-patient). Flows describe the happy path in the product UI and API; they stay deployment-agnostic unless noted.
Step-by-step guides for tasks in Care — for example, [how to register a patient](./flows/clinical/patient/register-patient). Flows describe the happy path in the product UI and API; they stay deployment-agnostic unless noted.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken-link risk: ./flows/clinical/patient/register-patient is missing the .mdx extension. Per the shared conventions, extensionless links are reserved only for the translated docs (patient, create-patient); every other internal link keeps .mdx. register-patient is not translated, so this should be ./flows/clinical/patient/register-patient.mdx. Same issue on line 23 and line 46, and in the mirrored i18n/ml/.../intro.mdx.


You enter either a date of birth or an age, not both.

{/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire block (lines 34–72) is wrapped in an MDX comment ({/* ... */}) and left in the file as dead/commented-out content — it renders nothing on the site. Either restore it as real content (it looks like useful "Types/Classification" material per the concept-doc skill's page structure) or remove it entirely; leaving commented blocks in a shipped doc looks like leftover authoring scaffolding.

- Flow: [Create a patient](../../flows/clinical/create-patient)
- Playbook: [Outpatient registration](/deployments/hmis/playbooks/outpatient-registration) (HMIS)

## FHIR reference

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## FHIR reference narrates the mapping ("See your deployment's API base URL for GET /Patient and POST /Patient") instead of just linking the FHIR resource. Per the care-concept-doc skill, "Linking the FHIR resource page is good. Narrating the mapping is not." The FHIR link is already in the opening sentence — this section can be dropped or reduced to a one-line pointer without the endpoint narration.

"flows/clinical/patient/manage-patient-users",
"flows/clinical/patient/view-patient-appointments"
]
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR only updates the version-3.1 sidebar (and only version-3.1 docs/flows). Per the shared conventions, version-3.0 and version-3.1 are kept byte-identical — the new Patient flow files, the reworked concept/reference docs, and this sidebar restructuring should all be mirrored into versioned_docs/version-3.0/ and versioned_sidebars/version-3.0-sidebars.json as well. Right now version-3.0/flows/clinical/ still only has create-patient.mdx, and its sidebar still points at the old single flow, so the two versions have diverged.

Regenerate the Patient concept and the nine flows from the care_docs
markdown with publish.mjs, which now only handles frontmatter, link
rewriting and MDX safety. Section structure, headings and wording are
those of the authored source.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by Docs Reviewer for #40 · opus50 · 154.1 AIC · ⌖ 2.32 AIC · ⊞ 10.5K


Note: You enter either a date of birth or an age, not both.

{/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This large {/* ... */} block (lines 36-74) hides real content — Blood Group values, Patient Tags, Volunteer Contact, Profile Sections — from the rendered page. Commented-out drafts are leftover placeholders; either publish the sections or delete them. The same applies to the ## Configuration block at lines 93-100.

Questionnaire Updates. Your permissions control which of these tabs you see.
*/}

## Patient Identifiers

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## Patient Identifiers duplicates the identical paragraph still sitting inside the commented block at line 42. Keep one copy. Also add a blank line after the heading — the paragraph is glued to it.

- Reference: [Patient (technical)](../../references/clinical/patient)
- Flow: [Create a patient](../../flows/clinical/create-patient)
- Playbook: [Outpatient registration](/deployments/hmis/playbooks/outpatient-registration) (HMIS)
- Flow: [Search for a patient](../../flows/clinical/patient/search-patient.mdx)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ## Related list drops the reference link that was here before (- Reference: [Patient (technical)](../../references/clinical/patient)) and the HMIS playbook link. Concept↔reference cross-links are part of the concept page structure; please restore both.

- Reference: [Patient (technical)](../../references/clinical/patient)
- Flow: [Create a patient](../../flows/clinical/create-patient)
- Playbook: [Outpatient registration](/deployments/hmis/playbooks/outpatient-registration) (HMIS)
- Flow: [Search for a patient](../../flows/clinical/patient/search-patient.mdx)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These flow links use .mdx, but per the shared conventions the flow docs are only extensionless when translated. create-patient.mdx was translated under i18n/ml/; its nine replacements are not, so .mdx is correct here — just confirm npm run build passes for the ml locale, since the Malayalam concept page now links ../../flows/clinical/patient/register-patient extensionlessly to a doc that has no ml source file.


### 4. Verify

If date of birth validation is added to verify patient's identity. The page shows the message "Please enter the patient's year of birth to verify their identity."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a fragment and reads as a condition with no main clause. Suggested: "If your deployment configures date-of-birth verification, the page shows the message "Please enter the patient's year of birth to verify their identity."" (STE: one instruction per sentence, condition first).


Enter the identifiers that your facility configures, for example a national identity number.

Identifiers that are configured as auto generated gets generated once patient registration is completed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar and trailing space. Suggested: "Care generates the auto-generated identifiers after you complete the registration." Use the hyphenated "auto-generated" consistently — the identifiers flow already uses that form.


## Pre-requisites

- An administrator of a facility.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"An administrator of a facility." is not a prerequisite sentence about the reader's situation. Use the conventions' phrasing, e.g. "You are an administrator of the facility." (see the flow skill: write the user's situation).


1. Register the patient. See [Register a patient](./register-patient.mdx).
2. Enter a value for every required identifier.
4. Skip the identifiers that Care generates. You cannot enter these values.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The numbered list skips 3: it goes 1., 2., 4.. Renumber to 1, 2, 3.


### 4. View the patient's tokens

Token view on Patient's Home displays all the existing tokens for the patients

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step is descriptive, not an instruction, and has a trailing space and no full stop. Suggested: "Open the token view on Patient Home. Care shows the patient's existing queue tokens." (STE: steps are commands).


Patient Home offers quick actions for the patient. Your permissions control which
quick actions appear.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Expected Outcome claims tokens and appointments show "for all facilities or for one facility", but no step describes a facility filter. Please confirm this against care_fe or drop the qualifier — unverified UI behaviour should not go in a flow.

@aravindm4
aravindm4 merged commit 916557c into main Aug 10, 2026
7 checks passed
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