From 1c04c5aadd9aab1e5c45836454ba0eb0736dd017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=A4=87?= <刘备@gentronhealth.com> Date: Sat, 9 May 2026 17:50:31 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#456:=20=E9=97=A8=E8=AF=8A=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99=EF=BC=9A=E8=AF=8A=E7=96=97=E7=B1=BB=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E4=BF=9D=E5=AD=98=E5=90=8E=E7=B1=BB=E5=9E=8B=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E4=B8=BA"=E6=A3=80=E6=9F=A5"=E4=B8=94=E7=AD=BE?= =?UTF-8?q?=E5=8F=91=E6=88=90=E5=8A=9F=E5=90=8E=E7=8A=B6=E6=80=81=E6=9C=AA?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因:selectAdviceBase()中setValue()将后端返回的categoryCode(目录分类码,如检查=2) 直接赋值给categoryEnum,保存后存入wor_service_request.category_enum字段。 后端SQL查询getRequestBaseInfo使用COALESCE(category_enum, 3)推导advice_type, 导致category_enum=2时类型被误判为"检查"而非"诊疗"。 修复:诊疗类医嘱(adviceType=3)不再将categoryCode赋值给categoryEnum, 让SQL的COALESCE默认值3(医疗活动)正确推导类型。 --- .../components/prescription/prescriptionlist.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index cef0b090..23404eed 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -3407,7 +3407,11 @@ function setValue(row) { prescriptionList.value[rowIndex.value].unitCode = row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode; } - prescriptionList.value[rowIndex.value].categoryEnum = row.categoryCode; + // 🔧 Bug Fix #456: 诊疗类医嘱(adviceType=3)不应将categoryCode赋值给categoryEnum, + // 否则保存后SQL查询会根据category_enum=2(检查目录)将类型误判为"检查" + if (row.adviceType != 3) { + prescriptionList.value[rowIndex.value].categoryEnum = row.categoryCode; + } prescriptionList.value[rowIndex.value].skinTestFlag = row.skinTestFlag; prescriptionList.value[rowIndex.value].definitionId = row.chargeItemDefinitionId; prescriptionList.value[rowIndex.value].executeNum = 1;