mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
docs: document the wellness-summary report section and correct the computed-scores note
This commit is contained in:
1 parent
f170198a83
commit
ecf93317dd
2 files changed
+23
-4
No files matched your search
@@ -44,6 +44,25 @@ PDF in a new tab without preserving the filename or fails the blob save).
|
||||
`500` if rendering fails.
|
||||
- Audit action: `doctor-report.pdf.generate`.
|
||||
|
||||
## Wellness summary (derived scores)
|
||||
|
||||
Since v1.10.0 the report carries a **Wellness summary** section below the
|
||||
clinical content, holding the server-derived wellness scores (Recovery,
|
||||
Stress, Strain) and the other derived metrics where present. It is kept
|
||||
deliberately separate from the clinical vitals table:
|
||||
|
||||
- Each entry is labelled **descriptive, not a clinical assessment**, and the
|
||||
scores never enter the vitals table or the clinical aggregations.
|
||||
- The Stress score is shown as an HRV-derived proxy, not a sensor-measured
|
||||
stress value.
|
||||
- In the FHIR export the same scores are emitted as `survey`-category
|
||||
`Observation`s (text-only `code`, no fabricated LOINC) with a per-Observation
|
||||
non-clinical note — so a downstream system never mistakes them for a vital
|
||||
sign or a diagnosis.
|
||||
|
||||
Each derived metric states its inputs, method, and the cited standard it is
|
||||
grounded in (the same provenance the in-app explainer shows).
|
||||
|
||||
## Implementation notes
|
||||
|
||||
- `src/lib/doctor-report-pdf-core.ts` contains the isomorphic renderer.
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
--
|
||||
-- 2. Three new `measurement_type` values — the server-derived wellness
|
||||
-- scores `RECOVERY_SCORE`, `STRESS_SCORE`, `STRAIN_SCORE` (0–100, unit
|
||||
-- `score`). Only RECOVERY_SCORE is computed in v1.10.0; STRESS_SCORE +
|
||||
-- STRAIN_SCORE are defined now so the later engines that compute them
|
||||
-- need no schema change. These are NOT clinical vitals — they never
|
||||
-- appear in the doctor-report PDF.
|
||||
-- `score`), each minted nightly by its own engine. These are NOT
|
||||
-- clinical vitals: they stay out of the clinical vitals table and
|
||||
-- surface only in a clearly-labelled, descriptive-not-clinical wellness
|
||||
-- summary (and as FHIR `survey`-category observations).
|
||||
--
|
||||
-- Idempotent guards (`IF NOT EXISTS`) make reruns safe. Forward-only.
|
||||
--
|
||||
|
||||
Reference in new issue
Block a user