Files
api_health/agent/infra/tools/db/attendant/employee_query.js
T
lik cc9d855132 feat(agent): 管理端 agent 支持陪诊员并按角色收敛工具
陪诊员身份以 Employee 在职档案为准,显式管理员优先;管理端小程序首次登录会写入 role:['user'],不能据此判断。管理员保留跨用户查询与医院资料写入,陪诊员只开放本人订单查询/改单(归属校验、状态与字段白名单、并发保护)与本人档案,患者档案与财务操作不可用。
2026-11-01 12:09:12 +08:00

13 lines
463 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { buildEmployeeQueryTool } from "../query/employee_query.js";
/**
* 陪诊员端员工查询工具
*
* 只允许查本人档案:强制按当前登录用户 ID 隔离,schema 不暴露 userId;
* 输出走用户端白名单,不返回身份证、手机号、证书编号等敏感字段。
*/
const createAttendantEmployeeQueryTool = (userInfo) =>
buildEmployeeQueryTool({ userId: userInfo?._id });
export { createAttendantEmployeeQueryTool };