From f563713743d084c7a15ffa7e69fa2978fb380ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Thu, 14 May 2026 16:14:52 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#518:=20[=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E8=AF=8A?= =?UTF-8?q?=E6=96=AD-=E4=BC=A0=E6=9F=93=E7=97=85=E6=8A=A5=E5=8D=A1]=20?= =?UTF-8?q?=E6=8A=A5=E5=8D=A1=E9=A1=B5=E9=9D=A2=E7=BC=BA=E5=A4=B1"?= =?UTF-8?q?=E6=80=A7=E5=88=AB=E3=80=81=E5=87=BA=E7=94=9F=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E3=80=81=E5=AE=9E=E8=B6=B3=E5=B9=B4=E9=BE=84"=E6=A0=B8?= =?UTF-8?q?=E5=BF=83=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:infectiousDiseaseReportDialog.vue 读取患者性别时使用了错误的字段名 patientInfo.sex || patientInfo.genderName,但门诊医生站API返回的字段是 genderEnum(数字:1=男,2=女)和genderEnum_enumText(文本:男/女)。 新增 normalizeSexFromPatientInfo 函数,兼容HIS系统所有可能的性别字段命名。 Co-Authored-By: Claude Opus 4.7 --- .../diagnosis/infectiousDiseaseReportDialog.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/infectiousDiseaseReportDialog.vue b/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/infectiousDiseaseReportDialog.vue index 4015bbfae..af201231a 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/infectiousDiseaseReportDialog.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/infectiousDiseaseReportDialog.vue @@ -1034,6 +1034,17 @@ function normalizeSex(value) { return '未知'; } +function normalizeSexFromPatientInfo(patientInfo) { + // 优先使用文本字段 + if (patientInfo.genderEnum_enumText) return patientInfo.genderEnum_enumText; + if (patientInfo.genderName) return patientInfo.genderName; + if (patientInfo.sex) return normalizeSex(patientInfo.sex); + // 使用数字枚举字段 + if (patientInfo.genderEnum === 1) return '男'; + if (patientInfo.genderEnum === 2) return '女'; + return '未知'; +} + function normalizeAgeUnit(value) { const ageUnitMap = { 1: '岁', @@ -1295,7 +1306,7 @@ async function show(diagnosisData) { patName: patientInfo.patientName || patientInfo.name || '', // 患者姓名 parentName: '', // 家长姓名(14岁以下患者必填) idNo: patientInfo.idCard, // 身份证号 - sex: patientInfo.sex || patientInfo.genderName || '男', // 性别 + sex: normalizeSexFromPatientInfo(patientInfo), // 性别 // 出生日期信息 birthYear: birthInfo.year, // 出生年份