inou/api/prompts/vital.md

106 lines
3.1 KiB
Markdown

# Vital Prompt
Extract vital sign measurements.
User said: "{{INPUT}}"
Language: {{LANGUAGE}}
IMPORTANT: Respond with ONLY the JSON object. No explanations, no markdown fences, no text before or after.
```json
{
"question": "tracking question in {{LANGUAGE}}",
"type": "vital_type",
"input_type": "form",
"schedule": [{"days": [...], "time": "HH:MM"}],
"input_config": {"fields": [...]},
"entry": {"value": "...", "data": {...}}
}
```
## Schedule format
- `days`: array of "mon", "tue", "wed", "thu", "fri", "sat", "sun"
- `time`: 24h format "08:00", "12:00", "18:00" etc.
- Daily = all 7 days: ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]
- "once" or one-time measurement = null (no schedule, no recurring prompt)
## Vital types and units
| Type | Fields | Units |
|------|--------|-------|
| weight | weight | kg, lbs |
| blood_pressure | systolic, diastolic | mmHg |
| heart_rate | bpm | bpm |
| temperature | temp | °C, °F |
| blood_glucose | glucose | mg/dL, mmol/L |
| oxygen_saturation | spo2 | % |
| sleep | hours | hours |
| steps | steps | steps |
## Rules
- entry.data must be a JSON OBJECT, not a string
- Only include fields that have values from user input
## Examples
Input: "I weigh 80kg"
```json
{
"question": "What is your weight today?",
"type": "weight",
"input_type": "form",
"schedule": [{"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "time": "08:00"}],
"input_config": {"fields": [{"key": "weight", "type": "number", "label": "Weight", "unit": "kg"}]},
"entry": {"value": "80 kg", "data": {"weight": 80, "unit": "kg"}}
}
```
Input: "blood pressure 120/80"
```json
{
"question": "What is your blood pressure?",
"type": "blood_pressure",
"input_type": "form",
"schedule": [{"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "time": "08:00"}],
"input_config": {"fields": [
{"key": "systolic", "type": "number", "label": "Systolic", "unit": "mmHg"},
{"key": "diastolic", "type": "number", "label": "Diastolic", "unit": "mmHg"}
]},
"entry": {"value": "120/80 mmHg", "data": {"systolic": 120, "diastolic": 80, "unit": "mmHg"}}
}
```
Input: "slept 7 hours last night"
```json
{
"question": "How many hours did you sleep?",
"type": "sleep",
"input_type": "form",
"schedule": [{"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "time": "08:00"}],
"input_config": {"fields": [
{"key": "hours", "type": "number", "label": "Hours", "unit": "hrs", "step": 0.5},
{"key": "quality", "type": "scale", "label": "Quality (0-5)"}
]},
"entry": {"value": "7 hours sleep", "data": {"hours": 7}}
}
```
Input: "check BP morning and evening"
```json
{
"question": "What is your blood pressure?",
"type": "blood_pressure",
"input_type": "form",
"schedule": [
{"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "time": "08:00"},
{"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "time": "20:00"}
],
"input_config": {"fields": [
{"key": "systolic", "type": "number", "label": "Systolic", "unit": "mmHg"},
{"key": "diastolic", "type": "number", "label": "Diastolic", "unit": "mmHg"}
]}
}
```