From a7b09a0248d0efe6c8acd87f7af0dba853ec3d35 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Tue, 19 May 2026 19:12:40 +0800 Subject: [PATCH 01/21] =?UTF-8?q?Fix=20Bug=20#556:=20=E5=B0=B1=E8=AF=8A?= =?UTF-8?q?=E5=8D=A1=E5=8F=B7/=E6=89=A7=E8=A1=8C=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=9B=9E=E6=98=BE=20+=20=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=86=97=E4=BD=99"=E5=A5=97=E9=A4=90"=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 执行时间默认填充: initData() 和 resetForm() 中设置 executeTime = formatDateTime(new Date()) - isPackage判定统一: loadApplicationToForm() 中的 isPackage 判断与 loadCategoryItems() 保持一致 Co-Authored-By: Claude Opus 4.7 --- .agentforge/bugs/556-analysis.md | 53 +++++++++++++++++++ .../inspection/inspectionApplication.vue | 6 ++- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 .agentforge/bugs/556-analysis.md diff --git a/.agentforge/bugs/556-analysis.md b/.agentforge/bugs/556-analysis.md new file mode 100644 index 00000000..1fefd960 --- /dev/null +++ b/.agentforge/bugs/556-analysis.md @@ -0,0 +1,53 @@ +# Bug #556 分析报告 + +## 问题描述 +【门诊医生站-检验】新增检验申请单时: +1. 就诊卡号字段为空,未自动带出患者就诊卡号 +2. 执行时间字段未自动填充,仅显示占位提示 +3. 检验项目列表每条记录前均带"套餐"文字标签(冗余显示) + +## 根因分析 + +### 问题1:就诊卡号未自动回显 +- 代码路径:`initData()` 中 `formData.medicalrecordNumber = props.patientInfo.identifierNo || ''` +- 数据绑定:`v-model="formData.medicalrecordNumber"` +- `props.patientInfo` 由父组件传入,字段 `identifierNo` 来自后端患者信息 +- 当前逻辑本身正确,但需要增加兜底回读机制(已有 #406 的同步逻辑在 handleSave 中,initData 也应覆盖) +- **结论**:代码路径正确,如果 identifierNo 为空则是父组件传参问题;已在 handleSave 中有同步逻辑,initData 中已有逻辑。无需额外修复。 + +### 问题2:执行时间未自动填充 +- 根因:`formData.executeTime` 在 `formData` 初始化时(line 978)设为 `null` +- `initData()` 函数没有为 executeTime 设置默认值 +- `resetForm()` 函数(line 1550)也将 executeTime 重置为 `null` +- 前端 datetime picker 在 `v-model` 为 `null` 时显示占位符 "选择执行时间" +- **修复方案**:在 `initData()` 中设置 `formData.executeTime = formatDateTime(new Date())`;在 `resetForm()` 中也同样设置默认值为当前时间 + +### 问题3:项目列表冗余显示"套餐"文字 +- 根因:`isPackage` 判定条件不一致 + - `loadCategoryItems()` (line 1190): 使用 `item.feePackageId != null && ... && item.packageName` — ✅ 正确(同时检查 feePackageId 有效 + packageName 非空) + - `loadApplicationToForm()` (line 2000): 使用 `item.feePackageId != null || item.itemName?.includes('套餐')` — ❌ 错误 + - `feePackageId != null` 单独判断会导致普通项目因 feePackageId 有值被误标为套餐 + - `item.itemName?.includes('套餐')` 更是直接按名称文字判断,极不准确 +- 影响位置: + - 检验项目选择区(line 566):`套餐` + - 已选项目列表(line 617):`套餐` + - 检验信息详情表格(line 448):`套餐` +- **修复方案**:将 `loadApplicationToForm()` 中的 `isPackage` 判定统一为与 `loadCategoryItems()` 一致的逻辑 + +## 修复方案 + +### 修复1:执行时间默认填充 +- 文件:`inspectionApplication.vue` +- 位置:`initData()` 函数,在已有患者信息赋值后添加 `formData.executeTime = formatDateTime(new Date())` +- 位置:`resetForm()` 函数,将 `executeTime: null` 改为使用当前时间 + +### 修复2:isPackage 判定统一 +- 文件:`inspectionApplication.vue` +- 位置:`loadApplicationToForm()` 函数 line 2000 +- 旧代码:`const isPackage = item.feePackageId != null || item.itemName?.includes('套餐')` +- 新代码:`const isPackage = item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName` + +## 验收标准 +1. 新增检验申请单时,执行时间字段自动填充当前系统时间(YYYY-MM-DD HH:mm:ss 格式) +2. 检验项目列表中,只有真正的套餐项目前显示"套餐"标签,普通项目不显示 +3. 就诊卡号在有患者信息时正常显示 diff --git a/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue index 19229ff8..9c464e8b 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue @@ -895,6 +895,8 @@ const initData = async () => { // 申请单号在保存时由后端生成,此处显示"自动生成" formData.applyNo = '自动生成' + // 执行时间默认填充当前系统时间 + formData.executeTime = formatDateTime(new Date()) // 申请日期实时更新(启动定时器) startApplyTimeTimer() @@ -1547,7 +1549,7 @@ const resetForm = async () => { visitNo: '', specimenName: '血液', encounterId: props.patientInfo.encounterId || '', - executeTime: null, + executeTime: formatDateTime(new Date()), applicationType: 0, }) selectedInspectionItems.value = [] @@ -1997,7 +1999,7 @@ const loadApplicationToForm = async (row) => { // Bug #387修复: 套餐项目默认展开,并自动加载明细 selectedInspectionItems.value = detail.labApplyItemList.map(item => { const itemId = item.activityId || item.itemId || item.id || Math.random().toString(36).substring(2, 11) - const isPackage = item.feePackageId != null || item.itemName?.includes('套餐') + const isPackage = item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName return { itemId: itemId, From 7fa487197729e2bb451931cab199920ef5a43625 Mon Sep 17 00:00:00 2001 From: guanyu Date: Wed, 20 May 2026 09:25:04 +0800 Subject: [PATCH 02/21] =?UTF-8?q?Fix=20Bug=20#556:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .agentforge/analysis/556.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.agentforge/analysis/556.md b/.agentforge/analysis/556.md index eb74f6b3..6591d6c4 100644 --- a/.agentforge/analysis/556.md +++ b/.agentforge/analysis/556.md @@ -25,3 +25,11 @@ 1. `initData()`: Add `formData.executeTime = formatDateTime(new Date())` after line 899 2. `resetForm()`: Change `executeTime: null` to `executeTime: formatDateTime(new Date())` at line 1550 3. `loadApplicationToForm()`: Fix `isPackage` logic at line 2000 + +修复结果:✅ 成功,5行改动 + +### 修改内容 +1. `initData()` (line ~898): 新增 `formData.executeTime = formatDateTime(new Date())` — 新增检验申请单时执行时间自动填充当前时间 +2. `resetForm()` (line ~1552): `executeTime: null` → `executeTime: formatDateTime(new Date())` — 重置表单/新增时执行时间默认当前时间 +3. `loadApplicationToForm()` (line ~2002): `isPackage` 判定从 `item.feePackageId != null || item.itemName?.includes('套餐')` 改为 `item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName` — 与 `loadCategoryItems()` 保持一致,只有真正的套餐项目才显示"套餐"标签 + From ca8b547062e0a5b04df259f9457832bd47fa6abf Mon Sep 17 00:00:00 2001 From: guanyu Date: Wed, 20 May 2026 09:35:20 +0800 Subject: [PATCH 03/21] =?UTF-8?q?Fix=20Bug=20#557:=20=E6=A0=B9=E5=9B=A0+?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B9=E6=A1=88=E6=91=98=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:OpSchedule.java 中 6 个时间字段的 @JsonFormat 使用 ISO 格式 (yyyy-MM-dd'T'HH:mm:ss),而前端 el-date-picker 通过 value-format 发送的 是空格分隔格式 (yyyy-MM-dd HH:mm:ss),导致编辑手术安排时 Jackson 反序列化 失败,抛出日期格式解析错误。 修复:将 admissionTime、entryTime、startTime、endTime、anesStart、anesEnd 共6个字段 @JsonFormat 格式从 'T' 分隔改为空格分隔,与 OpCreateScheduleDto 及前端 value-format 保持一致。 Co-Authored-By: Claude Opus 4.7 --- .../openhis/surgicalschedule/domain/OpSchedule.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openhis-server-new/openhis-domain/src/main/java/com/openhis/surgicalschedule/domain/OpSchedule.java b/openhis-server-new/openhis-domain/src/main/java/com/openhis/surgicalschedule/domain/OpSchedule.java index 99936b21..b771b5c0 100755 --- a/openhis-server-new/openhis-domain/src/main/java/com/openhis/surgicalschedule/domain/OpSchedule.java +++ b/openhis-server-new/openhis-domain/src/main/java/com/openhis/surgicalschedule/domain/OpSchedule.java @@ -79,11 +79,11 @@ public class OpSchedule extends HisBaseEntity { private String surgerySite; /** 入院时间 */ - @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime admissionTime; /** 入手术室时间 */ - @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime entryTime; /** 手术室编码 */ @@ -142,19 +142,19 @@ public class OpSchedule extends HisBaseEntity { private String assistant3Code; /** 手术开始时间 */ - @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime startTime; /** 手术结束时间 */ - @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime endTime; /** 麻醉开始时间 */ - @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime anesStart; /** 麻醉结束时间 */ - @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime anesEnd; /** 手术状态 */ From 17677107545e40df47d0f24ba8541fb98985cbd2 Mon Sep 17 00:00:00 2001 From: guanyu Date: Wed, 20 May 2026 09:39:11 +0800 Subject: [PATCH 04/21] =?UTF-8?q?Fix=20Bug=20#556:=20=E6=A0=B9=E5=9B=A0+?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B9=E6=A1=88=E6=91=98=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: 1. 就诊卡号字段映射错误:三处 (initData/resetForm/handleSave) 使用 identifierNo(身份证号) 而非 visitNo/busNo(就诊卡号),参照 examinationApplication.vue 第1167行注释确认 2. 执行时间未设置默认值:initData 和 resetForm 中 executeTime 初始化为 null 3. 套餐判断条件过松:loadApplicationToForm 中 feePackageId != null 即判定为套餐, 普通项目因 feePackageId 有值被误标 修复: 1. 三处 medicalrecordNumber 改为 props.patientInfo.visitNo || props.patientInfo.busNo 2. initData 和 resetForm 中 executeTime 默认填充 formatDateTime(new Date()) 3. isPackage 增加 packageName 联合判断,与 loadCategoryItems 逻辑一致 Co-Authored-By: Claude Opus 4.7 --- .../components/inspection/inspectionApplication.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue index 19229ff8..f4942c64 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue @@ -883,7 +883,7 @@ const initData = async () => { formData.visitNo = props.patientInfo.busNo || '' formData.patientId = props.patientInfo.patientId || '' formData.patientName = props.patientInfo.patientName || '' - formData.medicalrecordNumber = props.patientInfo.identifierNo || '' + formData.medicalrecordNumber = props.patientInfo.visitNo || props.patientInfo.busNo || '' formData.applyDepartment = props.patientInfo.organizationName || '' formData.applyDocName = userNickName.value || userName.value || '' formData.applyDocCode = userId.value || '' @@ -895,6 +895,8 @@ const initData = async () => { // 申请单号在保存时由后端生成,此处显示"自动生成" formData.applyNo = '自动生成' + // 执行时间默认填充当前系统时间 + formData.executeTime = formatDateTime(new Date()) // 申请日期实时更新(启动定时器) startApplyTimeTimer() @@ -1523,7 +1525,7 @@ const resetForm = async () => { applicationId: null, applyOrganizationId: props.patientInfo.orgId || '', patientName: props.patientInfo.patientName || '', - medicalrecordNumber: props.patientInfo.identifierNo || '', + medicalrecordNumber: props.patientInfo.visitNo || props.patientInfo.busNo || '', natureofCost: 'self', applyTime: '', // 申请日期由定时器实时更新 applyDepartment: props.patientInfo.organizationName || '', @@ -1547,7 +1549,7 @@ const resetForm = async () => { visitNo: '', specimenName: '血液', encounterId: props.patientInfo.encounterId || '', - executeTime: null, + executeTime: formatDateTime(new Date()), applicationType: 0, }) selectedInspectionItems.value = [] @@ -1597,7 +1599,7 @@ const handleSave = () => { // 修复【#406】:保存前尝试从 props 同步患者信息,避免因加载时序导致信息缺失 if ((!formData.patientName?.trim() || !formData.medicalrecordNumber?.trim()) && props.patientInfo && props.patientInfo.encounterId) { formData.patientName = props.patientInfo.patientName || '' - formData.medicalrecordNumber = props.patientInfo.identifierNo || '' + formData.medicalrecordNumber = props.patientInfo.visitNo || props.patientInfo.busNo || '' formData.encounterId = props.patientInfo.encounterId || '' formData.visitNo = props.patientInfo.busNo || '' formData.patientId = props.patientInfo.patientId || '' @@ -1997,7 +1999,7 @@ const loadApplicationToForm = async (row) => { // Bug #387修复: 套餐项目默认展开,并自动加载明细 selectedInspectionItems.value = detail.labApplyItemList.map(item => { const itemId = item.activityId || item.itemId || item.id || Math.random().toString(36).substring(2, 11) - const isPackage = item.feePackageId != null || item.itemName?.includes('套餐') + const isPackage = item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName return { itemId: itemId, From 103121d8326349c55c10a305cc1c9a1fda31d64f Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Wed, 20 May 2026 09:40:39 +0800 Subject: [PATCH 05/21] =?UTF-8?q?Fix=20Bug=20#556:=20=E6=A0=B9=E5=9B=A0+?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B9=E6=A1=88=E6=91=98=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/core/framework/config/ApplicationConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java b/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java index 4084f9d9..c843a30a 100755 --- a/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java +++ b/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java @@ -1,6 +1,7 @@ package com.core.framework.config; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; From 75970f07b14ce10093a0a4f3975517b20d58b5ca Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Wed, 20 May 2026 09:42:02 +0800 Subject: [PATCH 06/21] =?UTF-8?q?Fix=20Bug=20#557:=20ApplicationConfig=20?= =?UTF-8?q?=E5=85=A8=E5=B1=80=20Jackson=20LocalDateTime=20=E5=8F=8D?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E5=99=A8=E7=BC=BA=E5=A4=B1=20?= =?UTF-8?q?=E2=80=94=20=E6=A0=B9=E5=9B=A0=EF=BC=9AJavaTimeModule=20?= =?UTF-8?q?=E4=BB=85=E6=B3=A8=E5=86=8C=E4=BA=86=20LocalDateTimeSerializer?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E6=B3=A8=E5=86=8C=20LocalDateTimeDeserialize?= =?UTF-8?q?r=EF=BC=8C=E5=AF=BC=E8=87=B4=E9=BB=98=E8=AE=A4=E5=8F=8D?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E5=99=A8=E6=9C=9F=E6=9C=9B=20ISO-86?= =?UTF-8?q?01=20=E6=A0=BC=E5=BC=8F=EF=BC=88T=20=E5=88=86=E9=9A=94=E7=AC=A6?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E4=B8=8E=E5=89=8D=E7=AB=AF=20el-date-picker?= =?UTF-8?q?=20=E7=A9=BA=E6=A0=BC=E5=88=86=E9=9A=94=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=EF=BC=88YYYY-MM-DD=20HH:mm:ss=EF=BC=89=E4=B8=8D=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=EF=BC=9B=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20LocalDateTimeDeserializer(pattern=3D"yyyy-MM-dd=20HH:mm:ss")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../java/com/core/framework/config/ApplicationConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java b/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java index c843a30a..a36d518a 100755 --- a/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java +++ b/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java @@ -35,7 +35,9 @@ public class ApplicationConfig { // 设置日期格式为 yyyy/M/d HH:mm:ss,支持多种格式反序列化 builder.simpleDateFormat("yyyy/M/d HH:mm:ss"); // 添加JavaTimeModule支持,用于LocalDateTime - builder.modules(new JavaTimeModule()); + JavaTimeModule javaTimeModule = new JavaTimeModule(); + javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + builder.modules(javaTimeModule); builder.serializerByType(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy/M/d HH:mm:ss"))); }; } From e5b85c733d3889095bb13f25cbebc160c723d416 Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Wed, 20 May 2026 09:45:33 +0800 Subject: [PATCH 07/21] =?UTF-8?q?549=E3=80=90=E4=BD=8F=E9=99=A2=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99-=E4=B8=B4=E5=BA=8A=E5=8C=BB=E5=98=B1-?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E3=80=91=E6=89=93=E5=BC=80=E2=80=9C=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E7=94=B3=E8=AF=B7=E5=8D=95=E2=80=9D=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E6=9E=81=E5=85=B6=E7=BC=93=E6=85=A2=20546=20=E3=80=90?= =?UTF-8?q?=E6=82=A3=E8=80=85=E7=AE=A1=E7=90=86=E3=80=91-=E3=80=90?= =?UTF-8?q?=E6=82=A3=E8=80=85=E5=88=97=E8=A1=A8=E3=80=91-=E3=80=90?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=82=A3=E8=80=85=E3=80=91=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=82=A3=E8=80=85=EF=BC=8C=E4=BF=9D=E5=AD=98=E6=88=90?= =?UTF-8?q?=E5=8A=9F=EF=BC=8C=E4=BD=86=E6=B2=A1=E6=9C=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=20536=20[=E9=97=A8=E8=AF=8A=E6=89=8B=E6=9C=AF=E5=AE=89?= =?UTF-8?q?=E6=8E=92]=E2=80=9C=E6=89=8B=E6=9C=AF=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E2=80=9D=E5=BC=B9=E7=AA=97=E5=BA=95=E9=83=A8?= =?UTF-8?q?=EF=BC=8C=E5=88=86=E9=A1=B5=E7=BB=84=E4=BB=B6=E4=B8=8E=E7=95=8C?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E5=85=83=E7=B4=A0=E9=87=8D=E5=8F=A0=EF=BC=8C?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E6=93=8D=E4=BD=9C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IDoctorStationAdviceAppService.java | 2 +- .../DoctorStationAdviceAppServiceImpl.java | 5 +- .../DoctorStationAdviceController.java | 5 +- .../mapper/DoctorStationAdviceAppMapper.java | 3 +- .../impl/PatientInformationServiceImpl.java | 36 +--- .../DoctorStationAdviceAppMapper.xml | 4 +- openhis-ui-vue3/src/utils/medicalConstants.js | 15 ++ .../order/applicationForm/laboratoryTests.vue | 109 ++++++------ .../applicationForm/medicalExaminations.vue | 2 + .../src/views/surgicalschedule/index.vue | 161 +++++++++++------- 10 files changed, 180 insertions(+), 162 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java index 641ad4db..f9f0b95e 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java @@ -147,6 +147,6 @@ public interface IDoctorStationAdviceAppService { */ IPage getSurgeryPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey); - IPage getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey); + IPage getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey, String categoryCode); } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index 4fa5d990..c5815994 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -2566,12 +2566,13 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp } @Override - public IPage getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey) { + public IPage getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey, String categoryCode) { IPage result = doctorStationAdviceAppMapper.getExaminationPage( new Page<>(pageNo, pageSize), PublicationStatus.ACTIVE.getValue(), organizationId, - searchKey); + searchKey, + categoryCode); return result; } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java index 84b83334..2e64d725 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java @@ -226,8 +226,9 @@ public class DoctorStationAdviceController { @RequestParam(value = "organizationId", required = false) Long organizationId, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize", defaultValue = "500") Integer pageSize, - @RequestParam(value = "searchKey", defaultValue = "") String searchKey) { - return R.ok(iDoctorStationAdviceAppService.getExaminationPage(organizationId, pageNo, pageSize, searchKey)); + @RequestParam(value = "searchKey", defaultValue = "") String searchKey, + @RequestParam(value = "categoryCode", defaultValue = "23") String categoryCode) { + return R.ok(iDoctorStationAdviceAppService.getExaminationPage(organizationId, pageNo, pageSize, searchKey, categoryCode)); } } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java index 67a16f4b..36b12109 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java @@ -203,6 +203,7 @@ public interface DoctorStationAdviceAppMapper { IPage getExaminationPage(@Param("page") Page page, @Param("statusEnum") Integer statusEnum, @Param("organizationId") Long organizationId, - @Param("searchKey") String searchKey); + @Param("searchKey") String searchKey, + @Param("categoryCode") String categoryCode); } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/PatientInformationServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/PatientInformationServiceImpl.java index 54909bb8..abe838ee 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/PatientInformationServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/PatientInformationServiceImpl.java @@ -133,47 +133,13 @@ public class PatientInformationServiceImpl implements IPatientInformationService @Override public IPage getPatientInfo(PatientBaseInfoDto patientBaseInfoDto, String searchKey, Integer pageNo, Integer pageSize, HttpServletRequest request) { - // 获取登录者信息 + // 构建基础查询条件 LoginUser loginUser = SecurityUtils.getLoginUser(); - Long userId = loginUser.getUserId(); - Integer tenantId = loginUser.getTenantId().intValue(); - - // 先构建基础查询条件 QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper( patientBaseInfoDto, searchKey, new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name, CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr)), request); - // 检查是否是精确ID查询(从门诊挂号页面跳转时使用) - boolean hasExactIdQuery = (patientBaseInfoDto.getId() != null); - - // 只有非精确ID查询时,才添加医生患者过滤条件 - if (!hasExactIdQuery) { - // 查询当前用户对应的医生信息 - LambdaQueryWrapper practitionerQuery = new LambdaQueryWrapper<>(); - practitionerQuery.eq(com.openhis.administration.domain.Practitioner::getUserId, userId); - // 使用list()避免TooManyResultsException异常,然后取第一个记录 - List practitionerList = practitionerService.list(practitionerQuery); - com.openhis.administration.domain.Practitioner practitioner = practitionerList != null && !practitionerList.isEmpty() ? practitionerList.get(0) : null; - - // 如果当前用户是医生,添加医生患者过滤条件 - if (practitioner != null) { - // 查询该医生作为接诊医生(ADMITTER, code="1")和挂号医生(REGISTRATION_DOCTOR, code="12")的所有就诊记录的患者ID - List doctorPatientIds = patientManageMapper.getPatientIdsByPractitionerId( - practitioner.getId(), - Arrays.asList(ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode()), - tenantId); - - if (doctorPatientIds != null && !doctorPatientIds.isEmpty()) { - // 添加患者ID过滤条件 - 注意:这里使用列名而不是表别名 - queryWrapper.in("id", doctorPatientIds); - } else { - // 如果没有相关患者,返回空结果 - queryWrapper.eq("id", -1); // 设置一个不存在的ID - } - } - // 如果不是医生,查询所有患者 - } IPage patientInformationPage = patientManageMapper.getPatientPage(new Page<>(pageNo, pageSize), queryWrapper); diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml index 372ddc68..bb6c9b67 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml @@ -897,7 +897,7 @@ LIMIT #{limit} OFFSET #{offset} - +