Skip to content

[docs] Billing settings and print templates for 3.1 - #133

Draft
billjohnc wants to merge 2 commits into
mainfrom
claude/docs-billing-setup-print-3-1-cbc6a4
Draft

billjohnc wants to merge 2 commits into
mainfrom
claude/docs-billing-setup-print-3-1-cbc6a4

Conversation

@billjohnc

@billjohnc billjohnc commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds Care 3.1 pages for two facility settings areas that no page on main or in any open PR covers: Settings → Billing (discounts and invoice numbering) and Settings → Print Templates. Every statement was checked against the 3.1 code; three behaviours were confirmed by probes on a running Care built from the same commits.

What is added (version 3.1 only, new files only)

Billing settings (concepts/billing/, flows/billing/billing-settings/)

  • Concept: Billing settings — discount codes, discount components, discount configuration, the invoice number expression, and the read-only tax codes, tax components and informational codes that the deployment sets.
  • Flows: Set the discount configuration · Create a discount code · Edit or delete a discount code · Create a discount component · Edit or delete a discount component · Set the invoice number expression.

Print templates (concepts/platform/, flows/platform/print-template/)

  • Concept: Print template — the default template, document templates and the standard layout; the 15 documents in four groups and which printout each row changes; what a template cannot change; images by web address; how it differs from report templates.
  • Flows: Set up the default print template · Customize the print template of a document · Reset or remove a print template.

Sidebar (versioned_sidebars/version-3.1-sidebars.json): two new categories only — Billing Settings first under Flows → Billing, and Print Template under Flows → Platform, between Tag and Report Template. No existing entry is changed.

No file of #109 or any other open PR is edited.

Placement (chosen while the requester was away; please review)

  • Billing settings in Billing, with one concept for the whole Settings → Billing area rather than a separate Discount concept: the screen groups them and the facility stores them as one billing configuration. Tax and informational codes are read-only in 3.1, so they get a section in the concept and no flow.
  • Print Templates in Platform, beside report templates: one setting changes printouts in billing, appointments, clinical and pharmacy & inventory, so it is cross-cutting; Platform already holds report templates, the feature readers are most likely to confuse it with, and the two concepts now point at each other. Facility settings pages under flows/facility/ belong to another open docs effort (Users & profile).

Links to and from #109 Billing

This PR links only to pages that exist on main and that #109 rewrites: concepts/billing/charge-item.mdx, concepts/billing/invoice.mdx, flows/billing/invoice/create-invoice.mdx, flows/billing/invoice/edit-invoice.mdx, flows/billing/charge-item/edit-charge-item.mdx. The links keep working after #109 merges (same paths).

#109 should link back (exact places below): the invoice concept's Number row → Set the invoice number expression; the charge item concept's discount configuration sentence → Billing settings; "only the discounts that are set up for the facility" in Edit a charge item and Change the items of a draft invoice → Create a discount component; Print invoices, Print a payment receipt and Print charge items → Print template.

Links other open PRs should add to these pages
  • [docs] Billing for 3.1: verified against the 3.1 code, with screenshots and videos #109: concepts/billing/invoice.mdx Number row → ../../flows/billing/billing-settings/set-invoice-number-expression.mdx; concepts/billing/charge-item.mdx discount configuration sentence → ./billing-settings.mdx#discount-configuration; flows/billing/charge-item/edit-charge-item.mdx and flows/billing/invoice/edit-invoice-items.mdx discount note → ../billing-settings/create-discount-component.mdx; print-invoice.mdx, print-payment-receipt.mdx, print-charge-items.mdx → ../../../concepts/platform/print-template.mdx.
  • [docs] Definitions & Terminology for 3.1 #112: concepts/definitions/charge-item-definition.mdx Discounts and Taxes → ../billing/billing-settings.mdx#discount-codes-and-components, #discount-configuration, #taxes-and-informational-codes; create-charge-item-definition.mdx and set-category-taxes-and-discounts.mdx prerequisite "has discount components" → ../../billing/billing-settings/create-discount-component.mdx.
  • [docs] Diagnostic Report for 3.1 #121: flows/clinical/diagnostic-report/print-a-diagnostic-report.mdx → ../../../concepts/platform/print-template.mdx.
  • [docs] Purchase Delivery flows for 3.1 #122: flows/supply/purchase-delivery/view-purchase-delivery.mdx → ../../../concepts/platform/print-template.mdx.
  • [docs] Scheduling for 3.1 #119: print-appointment.mdx and print-appointment-list.mdx → ../../../concepts/platform/print-template.mdx; the Create Invoice mention → ../../billing/invoice/create-invoice.mdx and ../../billing/billing-settings/set-invoice-number-expression.mdx.

Verified against

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

From code: about 500 facts with file, lines and quotes, and a permission path from sign-in to save for each flow.
At runtime (a local stack at those commits, invented data only): probes as a Facility Admin confirmed (1) a facility that never saved a discount configuration cannot save discount codes, (2) which invoice number expressions the check accepts, and (3) that the only print template of a facility cannot be removed.
Reviews: every page had a separate review against the facts by a reviewer who did not write it; all findings were applied or recorded.
Media: every flow has a video under Overview and a screenshot after each step (9 videos, 45 screenshots at full resolution, about 28 MB under static/media/billing/billing-settings/ and static/media/platform/print-template/). Each flow was recorded as a Facility Admin on that stack; every recording's API calls match the traced permission path, with no refused call. City General Hospital's settings were put back as they were after recording.

Intentional differences from the house style

  • Language: Simplified Technical English rules apply to instructions (steps, prerequisites, notes, field tables). Explanations use plain, consistent English.
  • Versions: verified only against 3.1, so the pages go only to 3.1.
  • Permissions: each table covers the whole path, including where the permission must be held (the facility's root organization, which Care names Administration, or the facility's geographic organization) and what a reader sees without it. The default role "Admin" is left out of role lists: the facility role picker never offers it.
  • Titles: flow titles follow the existing site ("Create a discount code"), not the template's "How to …". Concept titles are in sentence case, as the checklist asks.
  • Concepts: they keep a Permissions section, as the existing concepts do, and use ### sub-sections for the parts that need explaining. The resource name is not bolded in the Definition, because bold is used only for on-screen labels and there is no FHIR resource to link.
  • Known product behaviour in the pages: three notes tell readers how to get past verified product issues: save the discount configuration first; 0 in Maximum Applicable Discounts removes every discount; resetting or removing the only print template does not remove it. They are also listed below.
  • Media markup: each video carries a <track> with subtitles, and screenshots are placed after the step they show.
  • Narration: the voice reads a short line per step (the step plus one short sentence from the page), and the subtitles show what it says. The voices are AI-generated with ElevenLabs (model eleven_v4): cloned voices of Gauri and Bill, alternating by video in sidebar order. Where a line is longer than its step, the video holds a settled frame and the subtitles are timed to match. Nobody has listened to these yet; please check for mispronounced labels.

Product issues found (not filed)

Confirmed at runtime:

  1. A facility that never saved a discount configuration cannot save discount codes or components. The sheets send back the stored, empty configuration and the backend refuses it ("Field required"). Workaround in the pages: save Discount Configuration first.
  2. Removing or resetting the only print template does nothing, though Care shows "Print templates updated successfully". The empty list is skipped by the backend's update, which ignores values equal to the field default.
  3. An invoice number expression without the leading f is accepted and never filled in: every invoice gets the literal text, for example INV-{invoice_count}.

From code:
4. Maximum Applicable Discounts: the help text says "to a single invoice"; the backend applies it to each charge item, and only to charge items created from a charge item definition. The form starts at 0 when nothing is saved, and 0 removes every discount.
5. Billing settings show every button to every facility member; the backend refuses users without "Can Update on Facility", with "You do not have permission to create Facilities" even for an update.
6. Print Templates is shown only to holders in the facility's root organization; the backend also accepts the geographic organization.
7. A discount component without a discount code cannot be picked in charge item definitions or invoice edits, although the form says "Leave empty if no code is required".
8. Discount code help text says users can enter the code to apply a discount; no screen does that.
9. The 100-item limits for codes and components stop at 99.
10. Once saved, an invoice number expression cannot be cleared in the UI (Save is disabled while empty).
11. The create and edit discount sheets close before the save finishes; a refused save loses the input.
12. "Either amount or factor is required" is attached to a path the form does not show (medium confidence).
13. Renaming a discount code does not update the copy inside its components (low).
14. Billing settings and print templates resend whole lists from a cached facility record; two administrators can overwrite each other (medium).
15. Print templates: a watermark saves with empty text and prints nothing; logo settings are kept but unused while a header image is set; Medication Administration ignores Portrait and uses 6 mm margins when blank although the editor says 10 mm; image sizes accept 0 and negatives.
16. Cosmetic: page title "Discount Monetary Components" vs sidebar "Discount Components"; icon-only row actions without accessible names; "₹" hard-coded.
17. Pre-existing: the default role "Admin" holds "Can Update on Facility" but cannot be given in a facility.

Open questions (for the requester)

  1. Are the page list and the placement above what you want?
  2. What are discount codes for? The help text says users can enter them; no screen does. The pages describe what the code does.
  3. Maximum Applicable Discounts: per invoice (help text) or per charge item (backend)? The pages follow the backend.
  4. Should Staff change billing settings and print templates? By default Staff holds "Can Update on Facility".
  5. Should geographic administrators manage print templates, as the backend allows but the screen does not?
  6. Keep the three notes about known product issues in the pages, or keep the pages free of known bugs?

🤖 Generated with Claude Code

Billing settings (Settings > Billing): a concept page and six flows for the
discount configuration, discount codes, discount components and the invoice
number expression; tax and informational codes are described as read-only.
Print Templates (Settings > Print Templates): a concept page in Platform,
beside report templates, and three flows.

Verified against care ddfd840 and care_fe 5e02f9a (develop). Version 3.1 only.

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: 44d487f
Status: ✅  Deploy successful!
Preview URL: https://a8695f21.coredocs.pages.dev
Branch Preview URL: https://claude-docs-billing-setup-pr.coredocs.pages.dev

View logs

…plate flows

Nine flows get a video under Overview and a screenshot after each step
(45 screenshots at full resolution). Recorded as a Facility Admin on a local
stack at care ddfd840 / care_fe 5e02f9a with invented data. Videos are
narrated with AI voices (ElevenLabs eleven_v4, cloned voices of Gauri and
Bill, alternating by flow) and subtitled; frames are held where a line is
longer than its step.

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