Comprehensive blood glucose monitoring and diabetes management to help control blood sugar and prevent complications.
Core Flow
User Input -> Identify Operation Type -> Extract Parameter Info -> Check Completeness -> [Need Supplement] Ask User
|
[Information Complete]
|
Generate JSON -> Save Data -> Output Confirmation
Step 1: Parse User Input
Operation Type Recognition
Input Keywords
Operation Type
Description
record, glucose, bg
glucose_record
相关技能
Log blood glucose
hba1c, a1c
hba1c_record
Log HbA1c
trend
trend_analysis
View glucose trend
tir
tir_analysis
View Time in Range
hypo, hypoglycemia
hypo_event
Log hypoglycemia event
screening, complication
complication_screening
Complication screening
target
target_view
View glucose targets
achievement
achievement_view
View achievement status
medication
medication_management
Medication management
Glucose Type Keywords
Input Keywords
Type Value
Target Range
fasting
fasting
4.4-7.0
postprandial, 2h
postprandial_2h
<10.0
bedtime
bedtime
6.0-9.0
random
random
-
Hypoglycemia Symptom Keywords
Input Keywords
Symptom
sweating
sweating
palpitations
palpitations
tremor
tremor
hunger
hunger
confusion
confusion
dizziness
dizziness
Complication Screening Types
Input Keywords
Screening Type
retina, 眼底, 视网膜
retinopathy
kidney, 肾脏, 肾
nephropathy
nerve, 神经, 神经病变
neuropathy
foot, 足, 足部
foot_complication
Retinopathy Severity
Input Keywords
Severity
none
none
mild
mild
moderate
moderate
severe
severe
proliferative
proliferative
Nephropathy Status
Input Keywords
Status
normal
normal
microalbuminuria
microalbuminuria
macroalbuminuria
macroalbuminuria
Step 2: Check Information Completeness
Glucose Record Required:
Glucose value
Glucose type (fasting/postprandial_2h/bedtime/random)
Update corresponding sections based on operation type
Update statistics
Write back to file
Execution Instructions
1. Identify operation type (record/hba1c/trend/tir/hypo/screening/target/achievement/medication)
2. Extract parameter information
3. Check required field completeness
4. If missing, ask user to supplement
5. Generate JSON compliant with schema.json
6. Save to data/diabetes-tracker.json
7. Output confirmation and medical recommendations
Example Interactions
Example 1: Record Fasting Glucose
User: record fasting 6.5
AI: Blood glucose measurement recorded
Time: 2025-06-20 07:00
Type: Fasting blood glucose
Value: 6.5 mmol/L
Status: Within target range (4.4-7.0)
Recommendation: Continue maintaining good blood glucose control
Example 2: Record Hypoglycemia Event
User: hypo 3.4 sweating
AI: Hypoglycemia event recorded
Time: 2025-06-18 15:30
Blood glucose: 3.4 mmol/L
Severity: Level 1 (mild)
Symptoms: Sweating, Palpitations
Hypoglycemia Management Recommendations:
━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Immediately take 15g fast-acting glucose
- 3-5 glucose tablets
- 150ml juice or sugary drink
2. Re-check after 15 minutes
3. If still below 3.9 mmol/L, repeat step 1
4. After glucose normalizes, if >1 hour until next meal, eat small amount of long-acting carbohydrate
Example 3: Record HbA1c
User: hba1c 6.8
AI: HbA1c test result recorded
Value: 6.8%
Target: <7.0%
Status: On target
Change from last: -0.3% (improved)
Recommendation: Test HbA1c every 3 months
Example 4: View Achievement Status
User: achievement
AI: Blood Glucose Achievement Report
━━━━━━━━━━━━━━━━━━━━━━━━━━
HbA1c: 6.8% (target <7.0%) ✓ On target
Past 7 days glucose:
- Fasting: Average 6.2 mmol/L (achievement rate 85.7%)
- Post-meal 2h: Average 8.5 mmol/L (achievement rate 71.4%)
- Bedtime: Average 7.1 mmol/L (achievement rate 100%)
TIR: 72% (target >70%) ✓ On target
Hypoglycemia events: 1 (level 1)
Control Evaluation: Good blood glucose control, continue