Health Profile
Read, update, and reset structured questionnaire answers.
What is the health profile?
About 50 questions across 9 sections covering medical history, lifestyle, diet, family history, prescriptions, and more. Stored as a flat map of question ID → answer.
Sections
| Acronym | Section |
|---|---|
| HWP | Health & Wellness Profile |
| WEALH | Wellness Goals & Assessments |
| DMH | Detailed Medical History |
| DA | Diets & Allergies |
| FHSS | Family Health & Safety Screening |
| WHT | Wearables & Health Tracking |
| BS | Body Snapshot |
| PRSUP | Prescriptions & Supplements |
| FHIS | Family History |
1. Discover the schema first
betterness health-profile schema # all sections
betterness health-profile schema --section HWP # one section
Returns question IDs, types (BOOLEAN, ARRAY_STRING, BOOLEAN_KEY_VALUE_LIST, …), and example values. Always check this before updating — types must match.
2. Read
betterness health-profile get # full profile (flat map)
betterness health-profile get-section --section HWP # single section
betterness health-profile summary # human-readable
3. Update
betterness health-profile update --data '{"HWP_HAB_do_you_smoke_cigarettes_or_use_tobacco_products": false}'
PATCH semantics — only the fields you provide are changed. The JSON value type must match the schema's type:
# Boolean
'{"HWP_HAB_do_you_smoke_cigarettes_or_use_tobacco_products": false}'
# Array of strings
'{"DA_do_you_currently_follow_any_of_the_following_diets": ["Vegan", "Gluten-Free"]}'
# Boolean + key-value list (e.g. medications)
'{"PRSUP_do_you_take_any_prescription_medications": {"boolean": true, "keyValueList": [{"name": "Metformin", "value": "500mg"}]}}'
4. Reset a section (destructive)
betterness health-profile reset-section --section DA --dry-run
betterness health-profile reset-section --section DA
Clears every answer in the section. Use --dry-run first to verify scope.
Common errors
| Error | Cause |
|---|---|
invalidFields array in response | Unknown question ID — verify with schema |
| Type mismatch | Value shape doesn't match schema — re-read the schema's example field |

