Skip to content

Add Definition and Terminology docs for 3.1 - #89

Open
aravindm4 wants to merge 2 commits into
mainfrom
docs/definitions-modules
Open

Add Definition and Terminology docs for 3.1#89
aravindm4 wants to merge 2 commits into
mainfrom
docs/definitions-modules

Conversation

@aravindm4

Copy link
Copy Markdown
Member

What

Publishes the seven Definition and Terminology modules from care_docs into the docs site (version 3.1). 22 flows and 7 refreshed concepts.

Module Flows
Questionnaire create, add and edit questions, manage organizations, clone
Questionnaire Response Template create, apply, update or delete
Valueset create, build include and exclude rules, preview, update or retire
Observation Definition create, set up qualified ranges, update or retire
Specimen Definition create, update or retire
Activity Definition create, link requirements, update or retire, use to order a service
Charge Item Definition create, update or retire

Adds a Definitions category to the 3.1 flows sidebar with the seven modules nested under it. All seven concepts replace the existing pages under concepts/definitions/.

Frontmatter

Only Observation Definition had any frontmatter, and its domain read definition-and-terminology, which does not exist on the site — that would have created a new domain and orphaned the existing page. It is corrected to definitions, matching where all seven concepts already live.

The other six concepts and all twenty-two flows had no frontmatter, so domain, module, slug and sidebar_position were added. Concept positions follow the existing site order.

Flow titles were converted from "How to Create a Questionnaire" to "Create a questionnaire".

Concept titles

Two existing pages change title, since the authored title is published as written:

Was Now
Response Template Questionnaire Response Template
Value Set Valueset

Note for reviewers

All seven concepts are replaced, not extended. product-knowledge.mdx has no counterpart in care_docs and is untouched.

These modules link out to Clinical (Service Request, Specimen, Questionnaire Response) and Billing (Charge Item). All links resolve in the build.

Verification

Docusaurus build passes for both en and ml locales.

Publish the Questionnaire, Questionnaire Response Template, Valueset,
Observation Definition, Specimen Definition, Activity Definition and
Charge Item Definition modules from the care_docs sources. Refreshes the
seven definition concepts and adds twenty-two flows under a new
Definitions category in the 3.1 flows sidebar.
@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying coredocs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1810a0e
Status: ✅  Deploy successful!
Preview URL: https://0a096f5a.coredocs.pages.dev
Branch Preview URL: https://docs-definitions-modules.coredocs.pages.dev

View logs

Co-authored-by: aravindm4 <92707064+aravindm4@users.noreply.github.com>

@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.

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection results could not be parsed.

Review the workflow run logs for details.

Docs review — Definition and Terminology modules (3.1)

This is a large, unusually consistent change. The 22 flows all carry the flow template's sections in the template's order, the concepts all follow Definition → Key Attributes → Status → Related, and the language is clean STE — short sentences, active voice, one instruction per step. Slugs are kebab-case and the flow slugs are verb phrases. I found no corruption, no {#...} heading ids, no bare braces, and no code, endpoints or permission slugs leaking into the user-facing layers.

Verified against the Care source

I checked every permission display name used in the flow tables against care/security/permissions/. All of them are exact:

  • Can Create/Update Questionnaires, Can Create/Update Questionnaire Response Templates, Can Read Questionnaire Response Templates
  • Can Create Observation Definition on Facility, Can Create Specimen Definition on Facility, Can Read Specimen Definition
  • Can Create Charge Item Definition on Facility, Can Read Charge Item Definition
  • Can Create Activity Definition on Facility, Can Write Service Request on Facility

The manage-organizations flow citing Can Create/Update Questionnaires is also right — QuestionnaireViewSet.set_organizations calls can_write_questionnaire, not can_manage_questionnaire.

I resolved all 111 relative links against the tree as it will be after this PR. Every one resolves, including the cross-domain links out to Clinical and Billing. The flow sidebar is correctly updated: all 22 new flows appear in the Definitions category in version-3.1-sidebars.json, none is missing.

What I raised inline

  1. Mirroring (checklist 11) — the significant one. Everything lands in version-3.1 only. The conventions require 3.0 and 3.1 to stay byte-identical, so the flows tree, the seven concepts, and the 3.0 sidebar all need the same change.
  2. Sibling-relative links (12) — the concepts consistently write ../../concepts/definitions/x.mdx for a file in their own folder. It resolves, so the build is green, but the conventions call for ./x.mdx and ../<domain>/<slug>.mdx.
  3. An invented ## Access section (8) on questionnaire.mdx, with the same content appearing as ### Who can change a valueset and ### Who can see a template elsewhere. Not a template section, and not named consistently across the three.
  4. FHIR narration (7) — one leftover note stating that no FHIR R5 resource applies to the response template.

Could not verify

  • The UI labels, toast messages and button names in the flows ("Create Questionnaire", "Add Activity Definition", "Questionnaire created successfully!", "At least one organization must be selected"). These read as authentic and consistently cased, but I did not trace each one to care_fe public/locale/en.json. Worth a spot check before merge, particularly the exact toast wording in the Expected Outcome sections.
  • Whether the Description and Usage fields really are mandatory on the activity definition form — create-activity-definition.mdx marks both Required, which is unusual for free-text fields.

None of this is merge-blocking apart from the mirroring gap, which will leave the 3.0 version of the site without any of these pages.> Generated by Docs Reviewer for #89 · opus50 · 201.8 AIC · ⊞ 11K

A **questionnaire response template** is a saved set of medications and service requests. You apply the template when you fill a questionnaire. The template prevents the entry of the same orders for each patient. You can change every value that the template fills in.

A response template is a Care-specific authoring convenience, not a FHIR resource. The key thing to understand is that it is a recipe, not a record. Nothing in a template touches a patient until a clinician applies it and submits the resulting [questionnaire response](../clinical/questionnaire-response.mdx) — only then are real orders, requests, and observations created. Editing or deleting a template never changes responses already submitted from it.
Note: A questionnaire response template is a convenience feature of Care. No FHIR R5 resource applies to it.

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.

Checklist item 7 (FHIR): linking the FHIR page is good, narrating the mapping is not. Note: A questionnaire response template is a convenience feature of Care. No FHIR R5 resource applies to it. explains an absence of a mapping, which is exactly the kind of FHIR narration the rule removes. Delete the note — the reader does not need it.

| `can_read_questionnaire` | View questionnaire definitions, list them, and see the organizations a questionnaire is scoped to | Admin, Doctor, Nurse, Administrator, Staff, Facility Admin, Volunteer, Pharmacist, Admin (role org), Manager (role org), Member (role org) |
| `can_submit_patient_questionnaire` | Submit a questionnaire about a patient (no encounter) | Volunteer, Staff, Doctor, Nurse, Admin, Facility Admin, Administrator |
| `can_submit_encounter_questionnaire` | Submit a questionnaire against a patient encounter | Staff, Doctor, Nurse, Admin, Facility Admin |
## Access

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.

Checklist item 8 (template conformance): ## Access is not a section of the concept template, which is Definition -> Key Attributes -> (Status) -> Related. Two other concepts in this PR invent the same section under different names (### Who can change a valueset, ### Who can see a template), so the set is also inconsistent. Fold the access statement into Key Attributes or the Definition, or drop it — permission depth belongs in the reference doc.

- Flow: [Clone a questionnaire](../../flows/definitions/questionnaire/clone-questionnaire.mdx)
- Concept: [Questionnaire Response](../../concepts/clinical/questionnaire-response.mdx)
- Concept: [Questionnaire Response Template](../../concepts/definitions/questionnaire-response-template.mdx)
- Concept: [Valueset](../../concepts/definitions/valueset.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.

Checklist item 12 (links): links from a concept back into its own folder should be sibling-relative. ../../concepts/definitions/valueset.mdx walks up two levels and back down into the folder the file already lives in. Use ./valueset.mdx (and ../clinical/questionnaire-response.mdx for the cross-domain one) — the same pattern applies to every ../../concepts/... link added across the seven concept pages.

---

# Value Set
# Valueset

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.

Checklist item 14 (terminology): the title changes from "Value Set" to "Valueset", but references/definitions/valueset.mdx and several other pages still say "ValueSet". One term for one thing across every file in scope — either keep the existing spelling or update the reference doc and the other mentions in the same PR.

sidebar_position: 1
---

# Create a questionnaire

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.

Checklist item 11 (mirroring): the conventions say versioned_docs/version-3.0/ and version-3.1/ are kept byte-identical. This PR adds 22 flows and rewrites 7 concepts in 3.1 only, and updates versioned_sidebars/version-3.1-sidebars.json alone. Mirror the whole flows/definitions/ tree and the seven concept files into version-3.0, and add the same Definitions category to versioned_sidebars/version-3.0-sidebars.json.

- Concept: [Specimen Definition](../../concepts/definitions/specimen-definition.mdx)
- Concept: [Observation Definition](../../concepts/definitions/observation-definition.mdx)
- Concept: [Charge Item Definition](../../concepts/definitions/charge-item-definition.mdx)
- Concept: [Service Request](../../concepts/clinical/service-request.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.

Checklist item 12 (links): same sibling-relative issue as questionnaire.mdx. ../../concepts/clinical/service-request.mdx should be ../clinical/service-request.mdx, and the three ../../concepts/definitions/... links should be ./specimen-definition.mdx, ./observation-definition.mdx, ./charge-item-definition.mdx.

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