From 3bbffc47c175e42190d90b1fbc77345a9da9a0e5 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Thu, 28 May 2026 23:21:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(#566):=20=E8=AF=B7=E4=BF=AE=E5=A4=8D=20Bug?= =?UTF-8?q?=20#566=EF=BC=9A[=E4=B8=80=E8=88=AC]=20[=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E6=8A=A4=E5=A3=AB=E7=AB=99-=E4=B8=89=E6=B5=8B=E5=8D=95]=20?= =?UTF-8?q?=E4=BD=93=E5=BE=81=E6=95=B0=E6=8D=AE=E5=B7=B2=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E6=88=90=E5=8A=9F=EF=BC=8C=E4=BD=86=E5=9C=A8=E2=80=9C=E4=BD=93?= =?UTF-8?q?=E6=B8=A9=E5=8D=95=E2=80=9D=E5=9B=BE=E8=A1=A8=E5=8C=BA=E4=B8=AD?= =?UTF-8?q?=E6=9C=AA=E6=B8=B2=E6=9F=93=E6=98=BE=E7=A4=BA=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: - Bug #请修复 Bug #566 存在的问题 修复: - 调整 `confirmCharge` 中 `vitalSignsCode` 的入队顺序: - 原顺序: 体温 → 血压(001,002) → 心率(014) → 脉搏(002) → 呼吸(001) → 其他 - 新顺序: 体温 → 心率(014) → 脉搏(002) → 呼吸(001) → 血压(001,002) → 其他 - 脉搏(`002`)排在舒张压(`002`)之前,呼吸(`001`)排在收缩压(`001`)之前,`find()` 优先匹配到正确的体征数据。 - 2. `src/action/nurseStation/temperatureSheet/drawfn.js`** - 问题**: 旧数据兼容层中 `some()` 检查会阻止添加映射编码。例如:旧数据已有 `001`(收缩压)和 `006`(旧呼吸)时,`006→001` 因 `some()` 检测到已存在 `001` 而跳过,导致旧呼吸数据丢失。 - 移除 `some()` 检查,始终添加映射条目 - 用 `unshift()` 替代 `push()`,将映射后的脉搏(`002`)、呼吸(`001`)条目插入 `rowBOS` 头部,确保 `find()` 优先匹配它们而非同编码的血压条目 --- .../action/nurseStation/temperatureSheet/drawfn.js | 12 ++++++++---- .../tprChart/components/addTprDialog.vue | 10 ++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/openhis-ui-vue3/src/action/nurseStation/temperatureSheet/drawfn.js b/openhis-ui-vue3/src/action/nurseStation/temperatureSheet/drawfn.js index f7908a5c0..67e8bca52 100755 --- a/openhis-ui-vue3/src/action/nurseStation/temperatureSheet/drawfn.js +++ b/openhis-ui-vue3/src/action/nurseStation/temperatureSheet/drawfn.js @@ -166,14 +166,18 @@ export function getData(allData) { const OLD_CODE_MAP = { '004': '014', '005': '002', '006': '001' }; rowsData.forEach(row => { if (row.rowBOS) { - const extraItems = []; + const prependItems = []; row.rowBOS.forEach(item => { const newCode = OLD_CODE_MAP[item.typeCode]; - if (newCode && !row.rowBOS.some(i => i.date === item.date && i.times === item.times && i.typeCode === newCode)) { - extraItems.push({ ...item, typeCode: newCode }); + // 始终添加映射条目,用 unshift 插入数组头部 + // 这样 getType 的 find() 优先匹配映射后的编码(如脉冲、呼吸) + // 即使存在同编码的旧条目(如血压舒张压用 002、收缩压用 001), + // 映射后的脉搏(002)和呼吸(001)条目排在前面,确保图表正确渲染 + if (newCode) { + prependItems.push({ ...item, typeCode: newCode }); } }); - row.rowBOS.push(...extraItems); + row.rowBOS.unshift(...prependItems); } }); const infoData = allData.grParamBOS; diff --git a/openhis-ui-vue3/src/views/inpatientNurse/tprChart/components/addTprDialog.vue b/openhis-ui-vue3/src/views/inpatientNurse/tprChart/components/addTprDialog.vue index aae2bc6ac..a41b46cd6 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/tprChart/components/addTprDialog.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/tprChart/components/addTprDialog.vue @@ -999,22 +999,24 @@ function confirmCharge() { vitalSignsCode.push('003'); vitalSignsValues.push(params.temperature); } - if (params.systolicPressure && params.diastolicPressure) { - vitalSignsCode.push('001', '002'); - vitalSignsValues.push(params.systolicPressure, params.diastolicPressure); - } if (params.heartRate) { vitalSignsCode.push('014'); vitalSignsValues.push(params.heartRate); } + // 脉搏(002)排血压舒张压(002)之前,确保图表getType('002')优先匹配脉搏 if (params.pulseRate) { vitalSignsCode.push('002'); vitalSignsValues.push(params.pulseRate); } + // 呼吸(001)排血压收缩压(001)之前,确保图表getType('001')优先匹配呼吸 if (params.respirationRate) { vitalSignsCode.push('001'); vitalSignsValues.push(params.respirationRate); } + if (params.systolicPressure && params.diastolicPressure) { + vitalSignsCode.push('001', '002'); + vitalSignsValues.push(params.systolicPressure, params.diastolicPressure); + } if (params.bloodOxygen) { vitalSignsCode.push('021'); vitalSignsValues.push(params.bloodOxygen);