Expand description
S4b (host) — turn a person’s WellFair records into an AnatomyViewReport for the Anatomy Qapp.
Reads the person’s condition / medication / diet journal entries, normalizes each to a
[RecordRef] (extracting the human label from the entry’s summary JSON projection), maps them to
factors through the anatomy knowledge base, and returns a lens-shaped view plus the lens-independent
per-system burden (which colours the 3D body in S5) and an honest account of what did not map.
The host knowledge base is: the bundled condition→system reference (embedded via include_str!
so conditions map regardless of the runtime file layout — offline, no fetch) plus the
illustrative seed for food / herb / tea (pending Timothy’s curated corpus). The disclosure field
says exactly that, so the UI never passes seed data off as authoritative.
Structs§
- Anatomy
View Report - The full report the host returns for one lens.
- Organ
Percept - One organ mesh’s resolved paint: which body system it belongs to, and the σ-derived dual-modality
SystemPercept(colour + pitch) for that system’s current burden. This is what the renderer uses to colour (and can sonify) each organ of the 3D body. - Overlay
Percept - A distributed-overlay system’s paint (ECS / ENS / glymphatic) — a system with no standalone organ mesh, rendered as a highlight over its host structures. Carries the same σ percept as any system plus the host-system hints for where to place the overlay (empty = a whole-body cue).
- System
Percept - The dual-modality percept for one body system (S5.1 colour-by-load). The accumulated burden is
encoded once to σ — a position on the shared EMF spectrum — and σ then drives both the visual
spectrum (
rgba) and the sonic spectrum (frequency_hz) via the engine’s parity oracles. So an organ under strain is redder and lower-pitched: the 3D body can be seen and heard from one source of truth, rather than a hand-picked swatch that would discard the audio path. - Unmapped
Record - A record that carried no knowledge mapping — surfaced honestly, never silently dropped.
- Wellbeing
Scorecard Report - The accumulative, traceable score-card + the investigable hypotheses it surfaces — the reading a
person can act on. Companion to
AnatomyViewReport; forum-internum,Sanctuary-class selfhood content (the storage/consent layer must honour that).
Functions§
- build_
report - Build a report from already-normalized record refs and a lens, at a physiological state. The state modulator is applied to the per-system burdens so the colour-by-load reflects the person’s current life stage (e.g. a nephrotoxic med is a bigger ask on the kidneys in the third trimester).
- build_
report_ from_ journal - One-shot: journal entries → report for a lens, at a physiological state.
- build_
scorecard_ report - Compute the score-card with the seed weight model — the suggested starting interpretation, used when the person has not (yet) authored their own. The physiological state is passed through so the card reads the person at their current life stage.
- build_
scorecard_ report_ from_ journal - One-shot with the seed (suggested) weights.
- build_
scorecard_ report_ from_ journal_ with_ weights - One-shot: journal entries → score-card report, with the person’s own weight model and declared state.
- build_
scorecard_ report_ with_ weights - Compute the score-card + investigable-hypotheses surface from records, using the person’s own weight
model — their authorship of how their body is read, not a lens the software imposes. The seed model is
only a starting suggestion the person can edit or replace (see
build_scorecard_report). - host_
knowledge_ base - Build the host knowledge base: bundled conditions + the illustrative seed.
- parse_
lens - Parse a lens string (
"clinician"→ clinician; anything else → the safe person default). - record_
refs_ from_ journal - Normalize condition / medication / diet journal entries into [
RecordRef]s (ceased medications are skipped — they are not a current factor).