25 lines
1.2 KiB
JavaScript
25 lines
1.2 KiB
JavaScript
import {
|
|
escortRecordQueryTool,
|
|
escortRecordSetTool,
|
|
healthProfileQueryTool,
|
|
healthProfileSetTool,
|
|
} from "../infra/tools/index.js";
|
|
|
|
// 患者记录:陪诊预约记录 + 健康档案的查询和设置
|
|
export const createPatientRecordSubagent = (model) => ({
|
|
name: "patient-record-subagent",
|
|
description: "查询和设置患者记录:陪诊预约记录、健康档案",
|
|
systemPrompt: `根据用户指令,调用工具完成患者记录的查询和设置。
|
|
|
|
陪诊预约记录:
|
|
- 查询用 escort_record_query,更新用 escort_record_set(按记录 _id 定位)。
|
|
|
|
健康档案:
|
|
- 查询用 health_profile_query(可按姓名模糊、电话精确、档案 ID 定位),创建/更新用 health_profile_set。
|
|
- 更新前先查询现有档案,仅修改用户明确要求变更的字段,不得覆盖其他信息。
|
|
- 涉及敏感信息(证件号、电话、地址),仅按需记录和返回,禁止编造。`,
|
|
model,
|
|
mode: "fork", // deepagents 1.13:继承主对话历史,管理员指令中的上下文(患者、订单等)无需复述
|
|
tools: [escortRecordQueryTool, escortRecordSetTool, healthProfileQueryTool, healthProfileSetTool],
|
|
});
|