Skip to content

Define manual health measurement validation contract - #240

Open
OliviaH05 wants to merge 2 commits into
oss-slu:mainfrom
OliviaH05:feature/issue-172-health-metric-validation
Open

OliviaH05 wants to merge 2 commits into
oss-slu:mainfrom
OliviaH05:feature/issue-172-health-metric-validation

Conversation

@OliviaH05

@OliviaH05 OliviaH05 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary:
Creates a safe contract for manual health measurements by defining supported metrics, accepted units, and validation rules. This is intentionally contract-only and does not yet provide measurement persistence, API endpoints, or user-facing forms.

Changes Made:

  • Added documentation for supported health metrics, units, ranges, and decimal precision.
  • Added backend validation for numeric measurements, blood pressure, dates, symptoms, and notes.
  • Added matching frontend validation rules.
  • Ensured frontend and backend metric ranges agree.
  • Documented ownership and health consent requirements.
  • Documented localization and accessibility requirements.
  • Defined expected success, empty, validation failure, request failure, unauthorized, and consent-required states.

Closes #172

@mudabs mudabs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Olivia, for defining the manual health measurement contract and adding matching backend and frontend validation tests.

Please address these items before approval:

  1. Rebase the branch onto current main and rerun the full CI suite.
  2. Replace hardcoded English frontend validation messages with stable error keys or codes so consuming screens can localize them.
  3. Add a parity test or shared contract source to prevent backend and frontend metric rules from drifting.
  4. Confirm in the PR that this is intentionally contract-only and does not yet provide measurement persistence, API endpoints, or user-facing forms.

@OliviaH05
OliviaH05 force-pushed the feature/issue-172-health-metric-validation branch from 706f680 to 6a8da7d Compare November 13, 2026 18:47
@sonarqubecloud

Copy link
Copy Markdown

@OliviaH05
OliviaH05 requested a review from mudabs November 13, 2026 18:49
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.

[Small Rock] Define supported health metrics, units, and validation ranges

2 participants