Symptom Scorer Skill
Rule-based clinical triage engine that evaluates free-text symptom descriptions against a library of red-flag and yellow-flag patterns, fever thresholds, duration escalation rules, pain scores, and age-specific risk weights.
Scoring Axes
- Red-flag keywords — life-threatening signs (chest pain, stroke, severe allergy) → +60 per flag
- Yellow-flag keywords — urgent but non-emergency signs → +20 per flag
- Fever temperature — parsed from free text (38°C → +8 … ≥40°C → +40)
- Symptom duration — >3 days +10, >7 days +20, >2 weeks +30, >1 month +40
- Pain scale (NRS 0–10) — mild +8, moderate +15, severe +30
- Age modifiers — <3, >75 years → +15; <12, >65 years → +8
Final score is capped at 100.
Required Inputs
symptoms_text— raw symptom description from the user (Chinese or English)
Optional Inputs
pain_scale— 0–10 NRS self-reported pain scoreduration_days— symptom duration in days (auto-parsed from text if omitted)age— patient age for risk weighting
Triage Thresholds
| Score | Colour | Action |
|---|---|---|
| ≥70 or critical flag | 🔴 RED | Call 120 immediately |
| 35–69 | 🟡 YELLOW | See doctor within 4–8 hours |
| 0–34 | 🟢 GREEN | Watchful waiting 1–3 days |
Agent Instructions
- Always display
triage_labelandrecommended_actionprominently - List every item in
triggered_flags— these explain the urgency to the user - Show
disclaimerbelow the assessment - If RED: lead with the emergency call-to-action before any other text