Skip to main content
Glama
a207-followup-mcp

a207-followup-mcp

by ayeyouok

a207-followup-mcp(M4 · 随访系统)

儿童 CKD 随访系统 MCP。对应 PCP 契约 follow_up 输出位。Batch C 交付包(与 M9 报告配对)。

工具清单

工具

类型

权限

说明

schedule_followup

写

医生/营养师/编排层(MX 收口)

创建随访计划。频率按 KDIGO 2024 儿科推荐自动算(next_due_date)。plan_summary 全角色可见,note_to_clinician 仅临床可见

get_followup_records

读

全 caller

随访记录与计划时间线。随访计划摘要可见;原始医生备注(doctor_notes / note_to_clinician)仅医生/营养可见,家属/患儿被剔除

get_adherence_score

读/写

全 caller

依从性评分(M4 拥有依从性数据)。三域比率(0-1)→加权复合分(0-100),落库快照

get_pew_timeline

读

全 caller

PEW 时间线 facade(ADR-007):接受 M3 get_pew_history 输出并入统一时间线,存储归属 M3,零跨包 import。原名 get_pew_history,因与 M3 同名易混淆双跳已更名(P1-2),不保留旧名别名

Related MCP server: ckd-meal-plan-mcp

调用方身份(P0-1)

调用方身份不再是工具入参,由部署侧通过环境变量 A207_CALLER 注入(取值见 a207_policy.CALLERS), 模型无法自证身份;未注入时所有工具 fail-closed 抛 CallerUnknown。 放行集合统一取自 a207_policy(FOLLOWUP_WRITE_ALLOWED / FOLLOWUP_CLINICIAN),本包不再维护副本。

A207_CALLER=doctor_assistant python -m a207_followup_mcp.server

关键设计决策(详见 docs/decisions/ADR-008、ADR-009)

1. 随访频率(KDIGO 2024 儿科推荐)

recommend_followup_interval(ckd_stage, albuminuria_stage) 返回推荐间隔(天):

CKD 分期

基础间隔

依据

G1 / G2

180 天(1-2 次/年)

儿科共识 Rec17

G3a / G3b / G4

90 天(≥3-4 次/年)

儿科共识 Rec17 + NICE NG203

G5

60 天(>4 次/年)

儿科共识 Rec17

G5D

30 天(每月)

PRNT 2025 人体测量频率

白蛋白尿升级:A2 缩短 30 天、A3 缩短 60 天(下限 14 天)。

文献依据:

  • KDIGO 2024 CKD Guideline, Kidney Int 2024;105(4S):S117-S314(Francis et al. JAMA Pediatr 2024 儿科要点:儿童 CKD 至少每年评估 GFR+蛋白尿,高风险更频)

  • NICE NG203 Table 2(2021,2024 复核)

  • 儿科共识 Rec17(Scielo 初级保健儿科 2024,引 Furth 2018 / KDIGO 2012):G1-2→1-2 次/年,G3-4→≥3-4 次/年,G5→>4 次/年

  • PRNT 2025:CKD2-5 人体测量每 1-3 月,CKD5D 每月(Pediatr Nephrol 40:69-84)

2. 依从性评分公式(透明加权复合分)

composite = 100 × (w_diet·diet_ratio + w_med·med_ratio + w_visit·visit_ratio)
等级:≥80 好 / 50-79 中 / <50 差
  • diet_ratio:饮食日记完成率(来自 M3 日记 / M11 打卡)

  • med_ratio:用药按时率

  • visit_ratio:随访到场率

  • 默认等权(1/3 各),可经 weights 调整

文献依据:MMAS-8(8 项 Morisky)是 CKD 依从性测量最常用、经验证工具(Springer Med 系统综述 2024;0=高、1-2=中、3-8=低);儿科可用 CAAMQ。但儿科 CKD 尚无单一经验证的"营养+用药+就诊"复合评分(pubmed 24814533 综述:单一工具不充分,应多方法组合)。故本复合分为系统定义、待临床验证,等级阈值参照 MMAS-8 风格低/中/高带,非来自单一验证量表。

3. 随访记录数据结构(M4 自行设计)

// FollowUpRecord(追加式,add_followup_record)
{
  "record_id": "FR-Pxxxx-xxxxxxxx",
  "visit_date": "YYYY-MM-DD",
  "visit_type": "outpatient|phone|online|dialysis|nutrition_counsel",
  "ckd_stage": "G1..G5D",                 // 当次快照
  "indicators_snapshot": { ... },        // 体重/身高/Scr/eGFR/K/P/Hb 等(可见)
  "plan_summary": "随访计划摘要",          // 全角色可见
  "doctor_notes": "原始医生备注",          // 仅临床角色可见(家属/患儿剔除)
  "created_by": "doctor_assistant",
  "created_at": "ISO"
}
// FollowUpPlan(schedule_followup 产出)
{
  "plan_id": "FP-Pxxxx-xxxxxxxx",
  "cadence": { "interval_days": 90, "anchor_date": "...", "next_due_date": "...",
               "basis": "...", "citation": "..." },
  "visit_type": "...", "status": "active",
  "plan_summary": "...",                  // 全角色可见
  "note_to_clinician": "...",             // 仅临床角色可见
  "created_by": "...", "created_at": "..."
}

存储:data/followup_store.json,按 patient_id 分 records / plans / adherence 三段。

4. PEW 历史归属(ADR-007)

PEW 历史由 M3 拥有并落库(a207-nutrition-assessment-mcp-nfyy 的 record_pew_risk / get_pew_history)。M4 的 get_pew_history 仅作 facade——接受 M3 输出再并入统一随访时间线,零跨包 import。详见 docs/decisions/ADR-007.md。

验证

python -m py_compile src/a207_followup_mcp/*.py
python tests/test_tools.py   # 全部断言应全过

已知缺口(非阻断)

  • 随访计划暂无"逾期/提醒"外发能力,需 M10 通知 MCP 消费 next_due_date 触发提醒(见路线图 Batch D)。

  • 依从性三域比率由调用方提供(M3 日记 / M11 打卡 / 就诊记录),M4 不反向查询这些包(零跨包 import)。

Available Tools

4 tools
get_adherence_scoreA

计算并记录依从性评分(M4 拥有依从性数据)。diet/med/visit 三域比率(0-1) → 加权复合分(0-100)。

等级:≥80 好 / 50-79 中 / <50 差。默认等权(饮食/用药/就诊各 1/3,待临床验证)。

Inputs: med_ratio (required), diet_ratio (required), patient_id (required), visit_ratio (required), +1 more. Returns: object

get_followup_recordsA

读取随访记录与计划时间线(读,所有角色可读)。

临床角色(医生/营养/编排/风险)看完整记录(含原始医生备注);患者/家属角色仅见摘要——医生备注被剔除。

Inputs: caller (required), patient_id (required). Returns: object

get_pew_historyB

PEW 历史聚合 facade(ADR-007:存储归属 M3)。

接受 M3 get_pew_history 的输出(list of {date, score, level}),并入统一随访时间线。零跨包 import。

Inputs: patient_id (required), pew_history. Returns: object

schedule_followupA

创建随访计划(写,MX 收口:仅医生/营养师/编排层)。频率按 KDIGO 2024 儿科推荐自动计算。

ckd_stage=G1/G2/G3a/G3b/G4/G5/G5D;anchor_date=本次就诊日 YYYY-MM-DD;plan_summary 摘要所有角色可见; note_to_clinician 仅医生/营养可见。返回含 next_due_date 的计划。

Inputs: caller (required), ckd_stage (required), patient_id (required), anchor_date (required), +4 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool targets a distinct function: scheduling, reading records, computing adherence, and retrieving PEW history. There is slight potential confusion between get_followup_records and get_pew_history since both are reads related to the timeline, but the descriptions clarify their specific scopes.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (schedule_followup, get_followup_records, get_adherence_score, get_pew_history). The 'get_' prefix is uniformly used for read operations, with no mixed conventions or camelCase deviations.

    Tool Count5/5

    Four tools cover the core follow-up workflow—creating plans, reading records, scoring adherence, and aggregating PEW data. This is well-scoped for the server's purpose and falls within the ideal 3-15 range.

    Completeness3/5

    The server supports creating and reading follow-up plans/records but lacks update/delete operations for plans, which are common lifecycle needs. It also has no tool to record completed follow-ups, leaving notable gaps in the follow-up management cycle.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Mock MCP server for pediatric CKD risk warning, enabling patient biochemical trend retrieval, deterministic risk rule evaluation, structured alert triggering, and clinical SOP lookup using simulated data.
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      This MCP server generates individualized meal plans for children with chronic kidney disease (CKD) based on KDIGO 2024/PRNT 2020/KRCP 2025 guidelines, incorporating patient age, CKD stage, allergies, dietary culture, and diet diary analysis. It provides deterministic nutrient computations and tools for meal plan generation, food database lookup, and risk analysis.
      13
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      MCP server for pediatric CKD lab data, providing lab panel queries, critical value alerts, trend analysis, and write operations with role-based permissions.
      5
      -
    • F
      license
      A
      quality
      B
      maintenance
      Read-only MCP server providing pediatric CKD patient master data with tools for patient profiles, diagnosis, nutrition ceilings, guardian verification, and patient lists, designed for the CKDNutri project.
      5
      -