feat(escort): 陪诊记录新增问诊信息(病历与诉求)字段与写入白名单

This commit is contained in:
lik
2026-11-05 22:01:46 +08:00
parent 8802a6490c
commit 1e1c5499e4
3 changed files with 34 additions and 8 deletions
@@ -10,7 +10,7 @@ import {
} from "../../../../../utils/record_state.js";
const escortRecordSetTool = tool(
async ({ orderId, status, cancelStatus, notes, payment }) => {
async ({ orderId, status, cancelStatus, notes, inquiry, payment }) => {
try {
if (!orderId) {
return {
@@ -92,6 +92,16 @@ const escortRecordSetTool = tool(
}
}
// 问诊信息:病历与诉求由就诊人补充,管理端可代录
if (inquiry !== undefined) {
if (inquiry.medicalHistory !== undefined) {
update["inquiry.medicalHistory"] = inquiry.medicalHistory;
}
if (inquiry.demand !== undefined) {
update["inquiry.demand"] = inquiry.demand;
}
}
if (payment !== undefined) {
if (payment.totalFee !== undefined) {
update["payment.totalFee"] = payment.totalFee;
@@ -142,7 +152,7 @@ const escortRecordSetTool = tool(
{
name: "escort_record_set",
description:
"Update escort record fields by record ID (_id). Supports updating service status, cancel status (none/requested/cancelled), notes (patientNote, escortNote, medicalSummary), and payment (totalFee, paidFee, status). Only provided fields will be updated.",
"Update escort record fields by record ID (_id). Supports updating service status, cancel status (none/requested/cancelled), notes (patientNote, escortNote, medicalSummary), inquiry (medicalHistory, demand), and payment (totalFee, paidFee, status). Only provided fields will be updated.",
schema: z.object({
orderId: z
.string()
@@ -167,6 +177,13 @@ const escortRecordSetTool = tool(
})
.optional()
.describe("Notes information to update"),
inquiry: z
.object({
medicalHistory: z.string().optional().describe("Medical history / 病历"),
demand: z.string().optional().describe("Patient demand / 诉求"),
})
.optional()
.describe("Inquiry information to update"),
payment: z
.object({
totalFee: z.number().optional().describe("Total service fee (RMB)"),