Fix Bug #455: 门诊医生站-医嘱:开立诊疗医嘱时执行科室默认获取逻辑有误且显示为原始ID

移除else分支中对orgId和positionName的条件判断,确保诊疗类医嘱的执行科室
始终使用患者就诊科室,不被诊疗目录配置的positionId覆盖。
之前的if (!orgId)条件导致目录已配置positionId时不会被覆盖,
若目录配置的ID不在机构树中则显示原始ID。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
关羽
2026-05-14 16:07:48 +08:00
committed by 赵云
parent b5c308d9cb
commit 46358ea03d

View File

@@ -3591,13 +3591,10 @@ async function setValue(row) {
prescriptionList.value[rowIndex.value].categoryEnum = 31; // 会诊的category_enum设置为31
} else {
// 诊疗类型adviceType == 3
// 🔧 Bug Fix #238: 诊疗项目默认使用患者就诊科室
if (!prescriptionList.value[rowIndex.value].orgId) {
prescriptionList.value[rowIndex.value].orgId = props.patientInfo.orgId;
}
if (!prescriptionList.value[rowIndex.value].positionName) {
prescriptionList.value[rowIndex.value].positionName = findOrgNameById(prescriptionList.value[rowIndex.value].orgId) || props.patientInfo.orgName || '';
}
// 🔧 Bug #455: 诊疗项目执行科室强制使用患者就诊科室
// 不使用目录配置的执行科室可能是错误ID或占位符导致显示原始ID
prescriptionList.value[rowIndex.value].orgId = props.patientInfo.orgId;
prescriptionList.value[rowIndex.value].positionName = findOrgNameById(props.patientInfo.orgId) || props.patientInfo.orgName || '';
// 🔧 Bug #218 修复使用组套中维护的quantity如果没有则默认1
prescriptionList.value[rowIndex.value].quantity = row.quantity || 1;
// 🔧 Bug #144 修复:安全访问 priceList防止 orderDetailInfos 为空时出错