From acfce391dce73d6b1d27197c7e2c0ee2e2c89018 Mon Sep 17 00:00:00 2001 From: HuangShun <148689675+huabuweixin@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:39:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=8217=20=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E7=AB=99-=E3=80=8B=E6=82=A3=E8=80=85?= =?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=9B=E4=BB=8Eadm=5Fencounter=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E6=9F=A5=E8=AF=A2=E5=88=B0first=5Fenum=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=94=A8=E4=BB=A5=E5=88=A4=E6=96=AD=E5=88=9D=E5=A4=8D?= =?UTF-8?q?=E8=AF=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DoctorStationMainAppServiceImpl.java | 2 ++ .../web/doctorstation/dto/PatientInfoDto.java | 6 ++++++ .../DoctorStationMainAppMapper.xml | 12 +++++++++-- .../src/views/doctorstation/index.vue | 21 +++++++++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java index 7485cd07..75d0422e 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java @@ -111,6 +111,8 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer e.setAge(e.getBirthDate() != null ? AgeCalculatorUtil.getAge(e.getBirthDate()) : ""); // 就诊状态 e.setStatusEnum_enumText(EnumUtils.getInfoByValue(EncounterStatus.class, e.getStatusEnum())); + // 初复诊 + e.setFirstEnum_enumText(EnumUtils.getInfoByValue(EncounterType.class, e.getFirstEnum())); }); return patientInfo; } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/PatientInfoDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/PatientInfoDto.java index 3968f6d6..b67c4343 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/PatientInfoDto.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/PatientInfoDto.java @@ -133,4 +133,10 @@ public class PatientInfoDto { * 过号时间 */ private Date missedTime; + + /** + * 初复诊标识 + */ + private Integer firstEnum; + private String firstEnum_enumText; } diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationMainAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationMainAppMapper.xml index e37cd888..34c04c8e 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationMainAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationMainAppMapper.xml @@ -25,7 +25,9 @@ T10.jz_practitioner_user_id, T10.bus_no, T10.identifier_no, - T10.missed_time + T10.missed_time, + T10.first_enum, + T10.first_enum_enumText from ( SELECT T1.tenant_id AS tenant_id, @@ -52,7 +54,13 @@ T1.organization_id AS org_id, T8.bus_no AS bus_no, T9.identifier_no AS identifier_no, - T1.missed_time AS missed_time + T1.missed_time AS missed_time, + T1.first_enum AS first_enum, + CASE + WHEN T1.first_enum = 1 THEN '初诊' + WHEN T1.first_enum = 2 THEN '复诊' + ELSE NULL + END AS first_enum_enumText FROM adm_encounter AS T1 LEFT JOIN adm_organization AS T2 ON T1.organization_id = T2.ID AND T2.delete_flag = '0' LEFT JOIN adm_healthcare_service AS T3 ON T1.service_type_id = T3.ID AND T3.delete_flag = '0' diff --git a/openhis-ui-vue3/src/views/doctorstation/index.vue b/openhis-ui-vue3/src/views/doctorstation/index.vue index 352d55e2..405ba302 100644 --- a/openhis-ui-vue3/src/views/doctorstation/index.vue +++ b/openhis-ui-vue3/src/views/doctorstation/index.vue @@ -99,6 +99,10 @@ {{ userStore.nickName }} + + 初诊 + 复诊 + 完诊 @@ -276,6 +280,7 @@ const loading = ref(false); const { proxy } = getCurrentInstance(); const visitType = ref(''); const firstVisitDate = ref(''); +const firstEnum = ref(1); // 初复诊标识:1=初诊,2=复诊 const disabled = computed(() => { // 只有在有患者信息但某些条件不满足时才启用覆盖层 // 当前逻辑保持不变,但我们将在按钮级别处理禁用状态 @@ -506,6 +511,15 @@ function handleCardClickOriginal(item, index) { console.log('patientInfo.value 设置为:', patientInfo.value); console.log('patientInfo.value.encounterId:', patientInfo.value?.encounterId); + // 根据患者信息设置初复诊标识 + const backendValue = item.firstEnum ?? item.first_enum; + + if (backendValue !== undefined && backendValue !== null) { + firstEnum.value = Number(backendValue); // 确保是数字类型 + } else { + firstEnum.value = 1; + } + // 确保患者信息包含必要的字段 if (!patientInfo.value.encounterId) { console.error('患者信息缺少encounterId字段:', patientInfo.value); @@ -566,11 +580,18 @@ function handleFinish(encounterId) { patientInfo.value = {}; visitType.value = ''; // 重置初复诊标识 visitTypeDisabled.value = false; // 重置禁用状态 + firstEnum.value = 1; // 重置为初诊 getPatientList(); } }); } +// 监听初复诊标识变化 +watch(firstEnum, (newValue) => { + // 这里可以添加更新后端的逻辑,如果需要实时同步到后端 + // 例如:updateEncounterFirstEnum(patientInfo.value.encounterId, newValue) +}); + function handleTimeChange(value) { queryParams.value.registerTimeSTime = value + ' 00:00:00'; queryParams.value.registerTimeETime = value + ' 23:59:59';