This commit is contained in:
lik
2026-06-02 12:21:54 +08:00
parent 43aa9ac844
commit 9758dc2d7b
2 changed files with 29 additions and 28 deletions

View File

@@ -110,7 +110,7 @@ class HandlerEscortRecord {
} }
const updatedRecord = await DBModel.EscortRecord.updateRecord(id, { const updatedRecord = await DBModel.EscortRecord.updateRecord(id, {
"escort.status": status, "status": status,
}); });
if (!updatedRecord) { if (!updatedRecord) {

View File

@@ -39,6 +39,8 @@ const EscortRecordSchema = mongoose.Schema(
mobile: { type: String, default: "", unique: true, index: true, comment: "患者联系电话" }, mobile: { type: String, default: "", unique: true, index: true, comment: "患者联系电话" },
sex: { type: String, enum: ["male", "female"], comment: "患者性别" }, sex: { type: String, enum: ["male", "female"], comment: "患者性别" },
age: { type: Number, default: 0, comment: "患者年龄" }, age: { type: Number, default: 0, comment: "患者年龄" },
weight: { type: Number, default: 0, comment: "患者体重kg" },
height: { type: Number, default: 0, comment: "患者身高cm" },
idnumber: { type: String, default: "", comment: "患者身份证号" }, idnumber: { type: String, default: "", comment: "患者身份证号" },
}, },
@@ -48,6 +50,19 @@ const EscortRecordSchema = mongoose.Schema(
escort: { escort: {
serviceId: { type: Number, default: -1, comment: "陪诊服务ID" }, serviceId: { type: Number, default: -1, comment: "陪诊服务ID" },
serviceName: { type: String, default: "", comment: "陪诊服务名称" }, serviceName: { type: String, default: "", comment: "陪诊服务名称" },
sexRequirement: { type: String, enum: ["none", "male", "female"], comment: "陪诊员性别要求" },
},
/**
* 陪诊员信息 - 为患者提供服务的陪诊员
*/
attendant: {
id: {
type: mongoose.Schema.Types.ObjectId, index: true, comment: "陪诊员用户ID"
},
name: { type: String, default: "", comment: "陪诊员姓名" },
sex: { type: String, enum: ["none", "male", "female"], comment: "陪诊员性别" },
mobile: { type: String, default: "", comment: "陪诊员联系电话" },
}, },
/** /**
@@ -72,20 +87,6 @@ const EscortRecordSchema = mongoose.Schema(
duration: { type: Number, default: 60, comment: "陪诊时长(分钟)" }, duration: { type: Number, default: 60, comment: "陪诊时长(分钟)" },
}, },
/**
* 陪诊员信息 - 为患者提供服务的陪诊员
*/
attendant: {
id: {
type: mongoose.Schema.Types.ObjectId,
ref: "user",
index: true,
comment: "陪诊员用户ID"
},
name: { type: String, default: "", comment: "陪诊员姓名" },
sex: { type: String, enum: ["none", "male", "female"], comment: "陪诊员性别" },
},
/** /**
* 费用信息 - 服务费用相关 * 费用信息 - 服务费用相关
*/ */