Symptom Checker Triage
Analyzes symptom descriptions and suggests triage levels (Emergency / Urgent / Outpatient) based on red flag identification. Provides rationale and recommended next steps. For AI-assisted decision support only.
Quick Check
CODEBLOCK0
Audit-Ready Commands
CODEBLOCK1
When to Use
- - Triage a patient symptom description to Emergency, Urgent, or Outpatient level
- Identify red flag symptoms in a clinical or research context
- Generate structured triage output for documentation or downstream processing
Workflow
- 1. Confirm the symptom description is provided as natural language text.
- Validate that the request is a symptom triage task; stop early if not.
- Run
scripts/main.py with the symptom string or use --interactive mode. - Return a structured result with triage level, red flags, rationale, and disclaimer.
- If execution fails or inputs are incomplete, switch to the Fallback Template below.
Fallback Template
If scripts/main.py fails or required fields are missing, respond with:
CODEBLOCK2
Stress-Case Output Checklist
For complex multi-constraint requests, always include these sections explicitly:
- - Assumptions: symptom keywords matched, confidence threshold applied
- Constraints: rule-based engine only; no differential diagnosis
- Risks: false positives and false negatives are possible; always defer to clinician
- Unresolved Items: ambiguous symptoms requiring clarification
CLI Usage
CODEBLOCK3
Output Format
CODEBLOCK4
Triage Levels
| Level | Description | Action |
|---|
| emergency | Life-threatening red flags present | Call emergency services or go to ED immediately |
| urgent |
Serious but not immediately fatal | Seek care within 2–4 hours |
| outpatient | Non-urgent | Schedule outpatient appointment |
Red Flag Categories
→ Full red flags reference: references/red_flags.md
Key categories: Cardiovascular, Respiratory, Neurological, Gastrointestinal, Trauma/Poisoning, Obstetric.
Disclaimer
Important: This tool provides AI-assisted triage suggestions only. It cannot replace professional medical diagnosis. If in doubt, seek medical care immediately. Call emergency services in life-threatening situations.
Input Validation
This skill accepts: natural language symptom descriptions in English or Chinese for triage level suggestion.
If the request does not involve symptom triage — for example, asking to diagnose a specific disease, prescribe medication, interpret lab results, or perform general medical Q&A — do not proceed. Instead respond:
"symptom-checker-triage is designed to suggest triage levels based on symptom red flags. Your request appears to be outside this scope. Please provide a symptom description, or use a more appropriate tool. This tool does not provide diagnoses or treatment recommendations."
Error Handling
- - If no symptom description is provided, request it explicitly.
- If the task goes outside documented scope (diagnosis, prescription), stop immediately.
- If
scripts/main.py fails, use the Fallback Template above. - Do not fabricate triage levels, red flag matches, or medical advice.
Output Requirements
Every final response must include:
- 1. Objective — what symptom set was triaged
- Inputs Received — symptom description used
- Assumptions — keyword matching applied, confidence threshold
- Triage Result — level, red flags identified, rationale
- Risks and Limits — AI-only, not a diagnosis, false positive/negative risk
- Next Checks — always recommend professional medical evaluation
Dependencies
- - Python 3.8+
- No third-party dependencies (rule-based engine, standard library only)
症状检查分诊
分析症状描述,并根据危险信号识别建议分诊级别(急诊/紧急/门诊)。提供理由和推荐后续步骤。仅用于AI辅助决策支持。
快速检查
bash
python -m py_compile scripts/main.py
审计就绪命令
bash
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py 胸痛、呼吸困难、持续30分钟
python scripts/main.py 头痛、发烧38.5度、呕吐 --verbose
使用场景
- - 将患者症状描述分诊至急诊、紧急或门诊级别
- 在临床或研究环境中识别危险信号症状
- 生成结构化分诊输出,用于文档记录或下游处理
工作流程
- 1. 确认症状描述以自然语言文本形式提供。
- 验证请求是否为症状分诊任务;如果不是则提前停止。
- 使用症状字符串运行scripts/main.py,或使用--interactive模式。
- 返回包含分诊级别、危险信号、理由和免责声明的结构化结果。
- 如果执行失败或输入不完整,切换到下面的备用模板。
备用模板
如果scripts/main.py执行失败或缺少必填字段,请回复:
备用报告
───────────────────────────────────────
目标 : <分诊目标>
可用输入 : <提供的症状描述>
缺失输入 : <准确列出缺失内容>
部分结果 : <任何可以安全做出的分诊评估>
受阻步骤 : <无法完成的内容及原因>
免责声明 : 此为AI辅助建议,请寻求专业医疗护理。
后续步骤 : <完成所需的最少信息>
───────────────────────────────────────
压力测试输出检查清单
对于复杂的多约束请求,务必明确包含以下部分:
- - 假设:症状关键词已匹配,置信度阈值已应用
- 约束:仅基于规则引擎;不提供鉴别诊断
- 风险:可能出现假阳性和假阴性;始终以临床医生意见为准
- 未解决事项:需要澄清的模糊症状
CLI使用
bash
直接输入症状
python scripts/main.py 胸痛,放射至左臂,出汗
交互模式
python scripts/main.py --interactive
详细输出
python scripts/main.py 头痛、发烧 --verbose
JSON输出
python scripts/main.py 腹痛,右下腹压痛 --json
输出格式
json
{
triage_level: emergency|urgent|outpatient,
confidence: 0.85,
red_flags: [胸痛, 呼吸困难],
reason: 胸痛伴呼吸困难可能提示心肌梗死或肺栓塞,
recommendation: 立即前往急诊科,
department: 急诊/心内科,
warning: 此为AI辅助建议,不能替代专业医疗诊断
}
分诊级别
| 级别 | 描述 | 行动 |
|---|
| 急诊 | 存在危及生命的危险信号 | 立即呼叫急救服务或前往急诊科 |
| 紧急 |
严重但不立即致命 | 2-4小时内就医 |
| 门诊 | 非紧急 | 预约门诊就诊 |
危险信号类别
→ 完整危险信号参考:references/red_flags.md
主要类别:心血管、呼吸系统、神经系统、消化系统、创伤/中毒、产科。
免责声明
重要提示:此工具仅提供AI辅助分诊建议。不能替代专业医疗诊断。如有疑问,请立即就医。在危及生命的情况下请呼叫急救服务。
输入验证
此技能接受:英文或中文的自然语言症状描述,用于分诊级别建议。
如果请求不涉及症状分诊——例如要求诊断特定疾病、开具处方、解读化验结果或进行一般性医疗问答——请勿继续。应回复:
symptom-checker-triage 旨在根据症状危险信号建议分诊级别。您的请求似乎超出此范围。请提供症状描述,或使用更合适的工具。此工具不提供诊断或治疗建议。
错误处理
- - 如果未提供症状描述,明确要求提供。
- 如果任务超出文档范围(诊断、处方),立即停止。
- 如果scripts/main.py执行失败,使用上述备用模板。
- 不得编造分诊级别、危险信号匹配或医疗建议。
输出要求
每个最终回复必须包含:
- 1. 目标——对哪组症状进行了分诊
- 接收的输入——使用的症状描述
- 假设——已应用关键词匹配、置信度阈值
- 分诊结果——级别、识别的危险信号、理由
- 风险与限制——仅AI辅助,非诊断,假阳性/假阴性风险
- 后续检查——始终建议进行专业医疗评估
依赖项
- - Python 3.8+
- 无第三方依赖(仅基于规则引擎,标准库)