Skip to content

Data Model

The HDS data model defines all health data items, their types, streams, and relationships.

  • Items — individual data points (body-weight, body-height, bleeding, medication, treatment, procedure, etc.)
  • Streams — hierarchical categories (body, fertility, medication, treatment, procedure, profile, …)
  • Event types — Pryv event type definitions with JSON schemas
  • Datasources — external data sources (medication, treatment, procedure databases)
  • number — numeric values with optional unit variations (kg/lb, m/ft)
  • select — single choice from options
  • checkbox — boolean (activity/plain events)
  • text — free text
  • date — date values
  • composite — nested object fields
  • datasource-search — search external datasources (medications, treatments, procedures)

Items registered at a parent stream (e.g. treatment-coded at treatment) can be reused under a descendant stream (treatment-fertility) by passing a context to the form section. forEvent() walks parent streams to resolve the original itemDef, keeping a single coded surface across multiple medical subdomains. See data-model/documentation/TREATMENT-PROCEDURE.md.

The compiled model is served at model.datasafe.dev.