From 626ae1a459987ebc01b9ba786fecf93f661c34d2 Mon Sep 17 00:00:00 2001 From: qk123 <18211963828.@163.cpm> Date: Mon, 10 Nov 2025 10:12:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=88=9D=E5=A4=8D?= =?UTF-8?q?=E8=AF=8A=E6=A0=87=E8=AF=86=E7=B3=BB=E7=BB=9F=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E5=88=A4=E6=96=AD->=E4=BB=8E=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E4=B8=AD=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/doctorstation/index.vue | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/index.vue b/openhis-ui-vue3/src/views/doctorstation/index.vue index d7c6ab9b..a3ae3866 100644 --- a/openhis-ui-vue3/src/views/doctorstation/index.vue +++ b/openhis-ui-vue3/src/views/doctorstation/index.vue @@ -305,15 +305,15 @@ function checkPatientHistory(patient) { return; } - // 如果当前就诊已经有明确的初复诊标识,则使用该标识 - if (patient.visitType) { - visitType.value = patient.visitType; - // 如果是已完诊的记录,禁用修改 - if (patient.statusEnum && patient.statusEnum !== 2) { // 假设2是就诊中状态 - visitTypeDisabled.value = true; - } - return; - } + // // 如果当前就诊已经有明确的初复诊标识,则使用该标识 + // if (patient.visitType) { + // visitType.value = patient.visitType; + // // 如果是已完诊的记录,禁用修改 + // if (patient.statusEnum && patient.statusEnum !== 2) { // 假设2是就诊中状态 + // visitTypeDisabled.value = true; + // } + // return; + // } // 查询患者历史就诊记录 const params = { @@ -325,7 +325,7 @@ function checkPatientHistory(patient) { if (res.code === 200) { const records = res.data?.records || []; // 如果有历史记录,则为复诊 - if (res.data && res.data.total > 1) { + if (res.data && res.data.total > 0) { visitType.value = 'FOLLOW_UP'; // 计算最早一次病历创建时间作为初诊日期 const earliest = records.reduce((min, cur) => { @@ -417,7 +417,19 @@ function handleCardClick(item, index) { // 检查患者历史记录以确定初诊/复诊 checkPatientHistory(item); - + // 直接使用数据库中保存的初复诊值,而不是重新判断 + if (item.visitType) { + visitType.value = item.visitType; + // 已完诊的记录禁用修改 + visitTypeDisabled.value = item.statusEnum !== 2; + // 如果有初诊日期也从数据库获取 + if (item.firstVisitDate) { + firstVisitDate.value = item.firstVisitDate; + } + } else { + // 对于没有初复诊记录的患者,仍使用原有的判断逻辑 + checkPatientHistory(item); + } activeTab.value = 'emr'; nextTick(() => { prescriptionRef.value.getListInfo();