Fix Bug #444: 门诊手术医嘱界面"已引用计费药品"列表未正常显示药品名称

根因分析:
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 <noreply@anthropic.com>
This commit is contained in:
荀彧
2026-05-14 20:09:37 +08:00
parent 7d3a16ce54
commit d0d14460f6
2 changed files with 5 additions and 7 deletions

View File

@@ -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

View File

@@ -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) {
// 🔧 修复:显示所有药品请求数据,不管有没有计费项目