Fix Bug #456: 门诊医生站:诊疗类医嘱保存后类型变更为"检查"且签发成功后状态未更新

原因: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(医疗活动)正确推导类型。
This commit is contained in:
刘备
2026-05-09 17:50:31 +08:00
parent bae86d8dc4
commit 1c04c5aadd

View File

@@ -3407,7 +3407,11 @@ function setValue(row) {
prescriptionList.value[rowIndex.value].unitCode = prescriptionList.value[rowIndex.value].unitCode =
row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode; row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode;
} }
// 🔧 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].categoryEnum = row.categoryCode;
}
prescriptionList.value[rowIndex.value].skinTestFlag = row.skinTestFlag; prescriptionList.value[rowIndex.value].skinTestFlag = row.skinTestFlag;
prescriptionList.value[rowIndex.value].definitionId = row.chargeItemDefinitionId; prescriptionList.value[rowIndex.value].definitionId = row.chargeItemDefinitionId;
prescriptionList.value[rowIndex.value].executeNum = 1; prescriptionList.value[rowIndex.value].executeNum = 1;