feat(ai): Phase 2A-4 新增 3 个 Agent Tool — 化验报告/预约/用药查询

新增 3 个 AI Agent Tool 扩展医护沙箱能力:
- query_patient_lab_reports: 查询患者化验报告列表(含异常计数)
- query_patient_appointments: 查询患者即将到来的预约
- query_patient_medications: 查询患者当前用药列表

同时:
- HealthDataProvider trait 新增 get_patient_lab_reports 方法 + LabReportListItemDto
- erp-health 实现新 trait 方法(含 PII 解密)
- sandbox.rs 更新角色权限:Patient 可查体征/化验/用药,MedicalStaff 额外可查预约
- 修复 ai_prompt_tests.rs 中 AnalysisService::new 签名变更的遗留编译错误
- 新增 5 个 agent 测试覆盖新 Tool 和沙箱权限过滤
This commit is contained in:
iven
2026-05-19 00:19:10 +08:00
parent 89581b070f
commit b2053d5bcc
10 changed files with 401 additions and 12 deletions

View File

@@ -1,5 +1,11 @@
// Agent Tool 实现 — Phase 0 添加 query_patient_vitals
// Agent Tool 实现
pub mod query_appointments;
pub mod query_lab_reports;
pub mod query_medications;
pub mod query_vitals;
pub use query_appointments::QueryAppointmentsTool;
pub use query_lab_reports::QueryLabReportsTool;
pub use query_medications::QueryMedicationsTool;
pub use query_vitals::QueryPatientVitalsTool;