From d0d14460f61c184b8fb385afda8ebb52f3a969e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=80=E5=BD=A7?= <荀彧@gentronhealth.com> Date: Thu, 14 May 2026 20:09:37 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#444:=20=E9=97=A8=E8=AF=8A=E6=89=8B?= =?UTF-8?q?=E6=9C=AF=E5=8C=BB=E5=98=B1=E7=95=8C=E9=9D=A2"=E5=B7=B2?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E8=AE=A1=E8=B4=B9=E8=8D=AF=E5=93=81"?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9C=AA=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=8D=AF=E5=93=81=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因分析: 1. 前端 handleMedicalAdvice 调用 getPrescriptionList 时只传 encounterId, 未传 generateSourceEnum=6 和 sourceBillNo(手术单号), 后端默认查询 generateSourceEnum=1(医生开立),漏掉了手术计费创建的药品记录 2. 后端 getRequestBaseInfo 在 sourceBillNo 存在时会过滤掉药品(adviceType=1), 进一步阻断了手术计费药品的返回 修复方案: - 前端:handleMedicalAdvice 传参 (visitId, 6, operCode) 匹配手术计费记录 - 后端:移除手术计费场景的药品过滤,前端各组件已按 adviceType 自行过滤 Co-Authored-By: Claude Opus 4.7 --- .../impl/DoctorStationAdviceAppServiceImpl.java | 8 +++----- openhis-ui-vue3/src/views/surgicalschedule/index.vue | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index 26e7b4fbb..4fffefc0c 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -2107,11 +2107,9 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST, CommonConstants.TableName.WOR_SERVICE_REQUEST, practitionerId, Whether.NO.getCode(), sourceEnum, sourceBillNo); - // 手术计费场景:sourceBillNo 不为空时,过滤掉药品(1),保留耗材(2)和诊疗(3/6) - if (sourceBillNo != null && !sourceBillNo.isEmpty()) { - requestBaseInfo.removeIf(dto -> dto.getAdviceType() != null - && dto.getAdviceType() == 1); - } + // 🔧 修复 Bug #444: 移除手术计费场景的药品过滤。 + // 原过滤会导致门诊手术医嘱界面无法获取手术计费创建的药品记录。 + // 前端各组件已根据自身业务逻辑做了正确的 adviceType 过滤。 for (RequestBaseDto requestBaseDto : requestBaseInfo) { // 请求状态 requestBaseDto diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index aa8b05c86..34e3c05fc 100755 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -1535,8 +1535,8 @@ function handleMedicalAdvice(row) { temporarySigned.value = hasSubmittedAdvices; // 修复:根据已有数据状态设置,而非盲目重置 temporaryMedicalLoading.value = true // 🔧 新增:开始加载 - // 调用计费接口获取数据 - getPrescriptionList(row.visitId).then((res) => { + // 调用计费接口获取数据(使用手术计费来源参数,匹配 surgery billing 创建的记录) + getPrescriptionList(row.visitId, 6, row.operCode).then((res) => { console.log('=== 拉取计费数据返回结果 ===', res) if (res.code === 200 && res.data) { // 🔧 修复:显示所有药品请求数据,不管有没有计费项目