- New optional
rolefield on stream definitions. v1 value:context. Arole: contextstream exists purely as a descendant-streamId marker for the D3 context-via-substream mechanic (seedocumentation/TREATMENT-PROCEDURE.md); no itemDef is registered there and consumers should treat it as metadata, not as a data-bearing bucket. treatment-fertilityandprocedure-fertilitytaggedrole: context. Implicit default for all other streams is "data" (no declaration required).- Field flows through
dist/streamsTree.jsonandpack.jsonunchanged —src/streams.jsparses YAML and re-emits the stream node verbatim; no schema/validation update needed.
- Non-breaking: existing consumers that don't know about
roleignore unknown fields. - This is the foundation slice. Runtime helpers (
hds-lib-js#isContext()), forms-engine rendering, and webapp/dashboard visual treatment are tracked separately under Plan 53 Phase B.
treatment/basicandtreatment/coded-v1eventType payload schemas no longer carryperiod: { start, end }. The treatment span is now expressed via Pryv's native event fields:event.time= treatment start,event.duration= span in seconds (omitted for ongoing / unbounded). Descriptions updated.procedure/basicandprocedure/coded-v1eventType payload schemas no longer carryperformed: { date }. Procedure timestamp usesevent.timenatively; procedures are point-in-time (noevent.duration).treatment-basicandtreatment-codeditems declareduration: { mandatory: false, canBeNull: true, maxSeconds: 315360000 }(10-year cap) — matching the convention used byfertility-cycles-start,fertility-cycles-fertile-window,fertility-pregnancy. Procedure items intentionally omit thedurationblock since they're point-in-time.
- Non-breaking change:
periodandperformedwere both optional and never required by clients; existing events that contain them still validate (JSON-schema defaults toadditionalProperties: true). New writers should target the Pryv-native fields instead. - Trigger: the
datasource-searchcompanion-fields renderer in hds-forms-js auto-generated plain-text Start / End inputs from the previousperiod.{start,end}payload schema. User vetoed shipping those text-only inputs; canonical Pryv mapping (event.time+event.duration) is the right place. Form-engine duration UI is a separate future plan; Plan 46 forms today omitevent.duration(= point-in-time / Flavour A).
documentation/TREATMENT-PROCEDURE.md— canonical reference for the new subdomains, the basic+coded item pair, the procedure findings array, and the context-via-substream resolution mechanic (D3) with a worked STORMM IVF intake example, the cross-tree context naming convention, and FHIR / SNOMED / LOINC cross-walk.documentation/TAGS.md— deferred-design reference for the futuretags/root:tags/hds/*controlled vocabulary +tags/user/*custom namespace, neverstreamIds[0]. Captures rationale, use cases, and integration points so a follow-up plan can pick it up without revisiting the design.
- Two new top-level streams in
definitions/streams/:treatment.yaml(treatmentparent +treatment-fertilitycontext child) andprocedure.yaml(procedureparent +procedure-fertilitycontext child). - Four new itemDefs in
definitions/items/:treatment-basic,treatment-coded(both registered attreatment);procedure-basic,procedure-coded(both registered atprocedure). Mirrors the existingmedication-intake-basic/medication-intake-codedpair pattern; the basic+coded duo is the v1 surface for both subdomains, with no per-domain named-leaf items. - Four new eventTypes in
definitions/eventTypes/eventTypes-hds.json:treatment/basic,treatment/coded-v1,procedure/basic,procedure/coded-v1. Treatment payloads carryname/regimen.{label,codes}, optionalcount(Flavour A), optionalperiod.{start,end}(Flavour B). Procedure payloads carryname/procedure.{label,codes}, optionalperformed.date, optionalcount, an open-vocabularyfindings[]array, andnotes. - Two new datasource declarations in
definitions/datasources/:treatments.yamlandprocedures.yamlexposingdatasets://treatmentanddatasets://procedurefor the coded variants. Datasets-service implementations land in Slice 2. - Helpers in
src/streams.js:getAncestorsById(id)returns the chain[id, parent, …, root];isDescendantOf(candidate, ancestor)validates context membership. findItemForEvent(eventType, streamId)insrc/items.js— implements the context-via-substream resolution rule (D3): direct(streamId, eventType)match first; on miss, walk parents until the closest ancestor with a registered itemDef matches.
- Same closest-ancestor walk-up algorithm as
hds-lib-jsPlan 45 (resolveStream.tsclientData lookup) andHDSModelAuthorizations(parent-covers-child de-dup) — D3 is the third application of the same principle, applied at the data-model itemDef layer. streamIdschema stays singular. Multi-streamId tagging is reserved for the futuretags/root (deferred per Plan 46 §2.9, documentation only).
- New app-stream declaration
webapp-settingsindefinitions/appStreams.yaml(suffix: webapp-settings,eventType: settings/hds-react-timeline). Resolves under any client app'sappStreamId(e.g. for hds-webapp:app-client-dr-form-webapp-settings). Holds one event per feature, distinguished byeventType(e.g.settings/hds-react-timeline); single recurring event per type, updated in place. Display categorysystem.
- Two new event types in
definitions/eventTypes/eventTypes-hds.jsonfor the system-stream feature:message/system-alert— operator → user notification carrying{ level: 'info'|'warning'|'critical', title, body, ackRequired?, ackId? }. Used on the account-levelapp-system-outstream.message/system-ack— user → operator acknowledgement carrying{ ackId, ackedAt, userNote? }, paired with its originating alert byackId. Used onapp-system-in.
- Two new app-stream declarations in
definitions/appStreams.yaml:system-out(eventTypemessage/system-alert) andsystem-in(eventTypemessage/system-ack). These describe the account-level system-stream pair provisioned once by the user's HDS-aware client app. - New
documentation/CUSTOM-FIELDS-AND-SYSTEM.mdcovering the data-model perspective: which eventTypes are reused for custom fields (none new —note/txt,note/html,activity/plain,date/iso-8601,count/generic), the two newmessage/*impls for system streams, and pointers to the runtime mechanics inhds-lib-js. - Tests in
tests/customFieldsAndSystem.test.jscovering the new eventTypes, appStream declarations, and pack.json registration.
- No new eventTypes for custom fields. Templates'
customFields[]declarations carry their typing inline on each stream'sclientData.hdsCustomField[<eventType>], reusing the existing storage-shape eventTypes. The runtime parent-chain validator walk lives inhds-lib-js(Plan 45 Phase 3). - No
data-model/src/items.jschanges. That file is a build-time loader for canonical item definitions; runtime validation againstclientData.hds*declarations is ahds-lib-jsconcern.
deprecated: { type: 'boolean' }(optional) recognised insrc/schemas/items.js. Round-trips throughpack.json.- Contract documented in
AGENTS.md§ "deprecated: trueon items": flag means item is kept (existing events keep validating + rendering) but not used for new data points. Consumer apps MUST filter deprecated items out of discovery / picker UIs (form builders, item picker sheets, data-model browser); the resolution layer (itemsDefs.forKey/forEvent) MUST still return deprecated items so readers can render existing events.
body-vulva-mucus-inspect-count(count/generic,repeatable: once) — companion item in thebody-vulva-mucus-inspectstream that captures the daily count of cervical-fluid self-observations. Creighton FertilityCare protocol mandates this count alongside the most-fertile observation of the day; reusable across any future Creighton/FertilityCare/Billings importer or app.deprecated: trueflag added to three items (body-vulva-mucus-stretch,body-vulva-wetness-feeling,fertility-cycles-charted-count) — flag-only at this stage; formal contract (schema validation,pack.jsonsurfacing, consumer-app handling) tracked under plan 48 phase 6.
wellbeing-self-rated-healthslider gainsdisplay.suffix: { en: "/100", fr: "/100" }so the EQ VAS readout, ARIAaria-valuetext, and the diary list (viaeventToShortText) all show"73 /100"instead of just"73"or the raw"0.73". Storage unchanged (raw 0..1 ratio/proportion).
- Item descriptions trimmed to short, patient-facing text (no spec/scale/instrument leakage). Affects
wellbeing-self-rated-health,wellbeing-mental-distress*,function-mobility,function-self-care,function-usual-activities,symptom-pain-severity,body-vulva-cervix-position,body-vulva-menstrual-cup,fertility-cycles-average-length,fertility-cycles-average-period,profile-avatar. Full clinical/spec context retained indocumentation/and per-itemreferences:blocks.
- New
function/top-level stream with childrenfunction-mobility,function-self-care,function-usual-activities(ICF Activities & Participation —d450,d510/d540,d630/d845/d920). - New items on the canonical 5-level severity scale (
ratio/proportionwith hooks0.0 / 0.25 / 0.5 / 0.75 / 1.0):function-mobility,function-self-care,function-usual-activities— EQ-5D-5L D1–D3, WHODAS, SF-36 PF, PROMIS Physical Function, Barthel, Katz.symptom-pain-severity(new child under existingsymptom-pain) — overall pain intensity (VRS-5 / NRS / PROMIS Pain Intensity / SF-36 BP compatible).wellbeing-mental-distress(combined),wellbeing-mental-distress-anxiety,wellbeing-mental-distress-depression— covers EQ-5D-5L D5 (combined), K6/K10, WHO-5 inverse, plus splitting PROs GAD/PHQ/HADS/DASS-21/PROMIS.
wellbeing-self-rated-health— EQ VAS / SF-36 GH / PROMIS Global01 / SF-1 / NHIS-MEPS SRH. Uses newtype: sliderwithdisplay.multiplier: 100(raw 0..1 storage, 0..100 shown).- New
type: sliderfield type on the item schema — numeric input withmin,max,step, optionalslider.{orientation, labels, display{multiplier, precision, suffix}}. Enables VAS-style inputs and any bounded-range slider UI, separating storage (raw value) from display (multiplier/precision/suffix). Validator accepts slider for any numeric eventType. documentation/DESIGN-NOTES.md— new "Scale hook placement" subsection:ratio/*hooks must match semantic anchors of competing scales (ICF, EQ-5D, PROMIS, HealthKit), not even distribution. Canonical placements for 5-level, 4-level (subset), 3-level, 11-level severity families.documentation/FUNCTION.md— companion doc for the newfunction-*domain covering ICF alignment, WHODAS/EQ-5D/PROMIS/SF-36/Katz/Barthel mappings, and design decisions.AGENTS.md(repo root) — primer for future agents covering architectural principles, the scale-hook rule, reuse-first examples, anti-patterns, file orientation, and cross-system reference library.
documentation/SYMPTOMS.mdseverity-mapping table: Apple HealthKit 4-level placement updated from0.0 / 0.33 / 0.66 / 1.0(even distribution) to0.0 / 0.25 / 0.5 / 1.0(subset of the 5-level canonical scale). Not a breaking change — the severity extension was never implemented. Round-trip analysis in plan 44 research notes.documentation/SYMPTOMS.mddecision #2 split into "transient mood tags" (→wellbeing-mood, unchanged) vs "validated distress-severity ratings" (→ the newwellbeing-mental-distress*items). Hybrid sources (Mira'ssymptoms.Anxietywith optionallevel) map to the severity items.
- Body temperature stream (
body-temperature) andbody-temperature-basalitem (temperature/c) — basal body temperature for fertility charting. body-vulva-menstrual-cupitem underbody-vulvastream (ratio/proportion, light/moderate/heavy fill levels).- Cognitive symptom stream (
symptom-cognitive) andsymptom-cognitive-focus-difficultyitem — difficulty concentrating (SNOMED CT 76039006). symptom-pain-muscleitem under existingsymptom-painstream — muscle / joint pain.fertility-cycles-average-lengthandfertility-cycles-average-perioditems (time/d,repeatable: once) — profile-level cycle/period length metrics.
All new items added in support of the FEMM bridge (plan 33).
- Convertible eventType schemas (
mood/5d-vectors,vulva-mucus-inspect/9d-vector): content now uses{ vectors, source? }wrapper with documented source provenance block medication-intake-basicv3:doseUnitchanged to select (9 options: tablet, drop, puff, mg, μg, ml, etc.),routechanged to select (13 options: oral, sublingual, topical, IV, IM, SC, etc.). All labels localized (en + fr).
- Converter engine definitions for cervical-fluid (11 methods, 9 dimensions) and mood (2 methods, 5 dimensions)
- Build pipeline for
dist/converters/output (pack.json, per-item index.json and pack-latest.json) - New eventType
vulva-mucus-inspect/9d-vectorfor 9D vector observations convertibleitem type support in schema validation
body-vulva-mucus-inspectitemDef: typeconvertiblewith converter-engine blockwellbeing-mooditemDef: typeconvertiblewith converter-engine block- Deprecated
vulva-mucus-inspect/v0eventType
- Physical activity stream, items, and cross-system documentation
- Postpartum and miscarriage bleeding items under body-vulva-bleeding
- Expanded symptom model with clinical categories
- Nutrition stream
- Cervical position cross-system research documentation
- Cervical position and mood composite items with
canBeNullsupport - Wellbeing stream with sex-drive item
- Profile-avatar and profile-display-name definitions
- Skin items (body-skin-*) and mood/skin research docs
- Symptom stream hierarchy and items for Mira daily log symptoms
ratio/proportionevent typetest-result/scaleevent type, fertility test items (OPK, pregnancy)protectedoption for fertility-sexual-activity (Mira bridge)- Settings definitions to data model
- Unit conversion compilation to build pipeline
- Reminder configs to item definitions
medication/prescription-v1event type with frequency/times-period
- Redesigned
medication/basicevent type - Updated bleeding model
- Renamed setting event types to kebab-case for Pryv API compatibility
- Migrated repeatable values to ISO 8601 format
- Bumped Node engine to
>=24
- Fixed profile-avatar: use variations instead of
picture/*wildcard - Fixed
localizeFieldsrecursing into displayFields - Removed note field from
medication/coded-v1intake
- Data source medication intake definitions
- Better medication model
- Migrated linting to ESLint 9 + neostandard
- Adopted HDS style system: palette class, Google Fonts
- Event type definitions packaged for consumption
- Urine hormones to index
- Fertility items (hormones, cycles)
- Updated variations schema
- Medication model (step 1)
- Item references from streams
- Stream listing HTML page
- Select possible values display
- Live birth to pregnancy model
- Bleeding and wetness/wiping items
- Form schema task
- Initial release
- YAML-based health data model definitions
- Stream hierarchy with items
- JSON schema generation
- Test suite for model validation
- Documentation site with CNAME
- Body weight translations