Compare commits

..

12 Commits

Author SHA1 Message Date
72b9639ec0 Fix Bug #556: 根因+修复方案摘要 2026-05-19 19:12:56 +08:00
0e8fb32108 Fix Bug #556: 根因+修复方案摘要 2026-05-19 19:07:29 +08:00
955c72af41 Fix Bug #556: 根因+修复方案摘要 2026-05-19 19:05:33 +08:00
Ranyunqiao
be57c026ec 553 【住院护士站-医嘱校对】医嘱列表缺少“医嘱状态”显示列 2026-05-19 17:41:08 +08:00
3bf7e04a04 Fix Bug #469: 根因+修复方案摘要 2026-05-19 16:10:13 +08:00
7743bb5df4 Fix Bug #547: 执行科室配置保存时,冲突检测应跳过已被软删除科室的孤脏记录 — 根因:时间冲突校验未排除科室已删除的 OrganizationLocation 记录,导致已不存在的科室仍会阻断新配置保存
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 16:02:58 +08:00
f274ebaf5c Fix Bug #478: 住院医生工作站检验申请详情「发往科室」显示为- — 根因:getLocationInfo 未对科室ID做类型归一化,recursionFun 中 item.id == targetDepartment 在类型不一致时匹配失败;修复:新增 normalizeOrgTreeIds 统一转 String,recursionFun 改用 String(item.id) === String(targetDepartment)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 15:09:23 +08:00
9826df98e3 Fix Bug #552: 根因+修复方案摘要 2026-05-19 15:04:12 +08:00
Ranyunqiao
fbe434f01f Merge remote-tracking branch 'origin/develop' into develop 2026-05-19 14:23:21 +08:00
Ranyunqiao
c28b322e91 bug 443 444 445 478 494 521 2026-05-19 14:22:40 +08:00
7eeaafef59 bug550 2026-05-19 14:13:57 +08:00
05e7d54d87 Fix Bug #552: 双击待保存医嘱编辑保存后不应自动添加空医嘱 — 根因:handleSaveSign 中自动添加空行的条件缺少 isAdding.value 判断,导致双击编辑已有待保存医嘱也会触发 handleAddPrescription()
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 14:06:33 +08:00
5 changed files with 64 additions and 77 deletions

View File

@@ -25,5 +25,3 @@
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
修复结果:✅ 成功6行改动含linter自动补充的就诊卡号字段回退逻辑

View File

@@ -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`<el-tag v-if="item.isPackage">套餐</el-tag>`
- 已选项目列表line 617`<el-tag v-if="item.isPackage">套餐</el-tag>`
- 检验信息详情表格line 448`<el-tag v-if="scope.row.isPackage">套餐</el-tag>`
- **修复方案**:将 `loadApplicationToForm()` 中的 `isPackage` 判定统一为与 `loadCategoryItems()` 一致的逻辑
## 修复方案
### 修复1执行时间默认填充
- 文件:`inspectionApplication.vue`
- 位置:`initData()` 函数,在已有患者信息赋值后添加 `formData.executeTime = formatDateTime(new Date())`
- 位置:`resetForm()` 函数,将 `executeTime: null` 改为使用当前时间
### 修复2isPackage 判定统一
- 文件:`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. 就诊卡号在有患者信息时正常显示

View File

@@ -1,55 +0,0 @@
# Bug #556 分析报告
## Bug 描述
【门诊医生站-检验】新增检验申请单时就诊卡号/执行时间未自动回显,且项目列表冗余显示"套餐"文字
## 三个子问题分析
### 问题1就诊卡号未自动回显
**位置**: `inspectionApplication.vue` 第 146 行 `formData.medicalrecordNumber`
**根因**:
- `initData()` 第 886 行使用 `props.patientInfo.identifierNo` 填充
- `resetForm()` 第 1526 行同样使用 `props.patientInfo.identifierNo` 填充
- `handleSave()` 第 1598-1607 行同步患者信息时,只同步了 `visitNo`(对应 `busNo`**没有同步 `medicalrecordNumber`**
- `props.patientInfo` 中就诊卡号对应的字段是 `busNo`(就诊流水号/卡号),而 `identifierNo` 是身份证号/标识号,可能为空
- **修复**: `medicalrecordNumber` 应使用 `props.patientInfo.busNo` 填充,与 `visitNo` 保持一致
### 问题2执行时间未自动填充
**位置**: `inspectionApplication.vue` 第 978 行 `executeTime: null`
**根因**:
- `formData.executeTime` 初始值为 `null`
- `initData()``resetForm()` 都**没有**设置 `executeTime` 默认值
- 第 176-186 行的日期选择器 placeholder 为"选择执行时间",无默认值
- **修复**: 在 `initData()``resetForm()` 中将 `executeTime` 设置为当前时间(格式与 `applyTime` 一致)
### 问题3项目列表冗余显示"套餐"文字
**位置**: `inspectionApplication.vue` 第 566 行 `el-tag v-if="item.isPackage"`
**根因**:
- `loadCategoryItems()` 第 1190 行: `const isPackage = item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null'`
- 数据库中 ALL 12条 lab_activity_definition 记录都有 `fee_package_id`
- 但通过 `inspection_package_detail` 比对,只有 **2条** 记录的名称与套餐名称匹配("肝功能12项"和"免疫组织化学染色诊断"
- 其余 10 条是套餐子项或普通项目,不应显示"套餐"标签
- **修复**: 改为检查 `item.packageName && item.itemName === item.packageName`,即只有当项目名称与套餐名称匹配时才标记为套餐
## 修复方案
### 修复1: 就诊卡号
- `initData()`: `formData.medicalrecordNumber = props.patientInfo.busNo || ''`(替代 `identifierNo`
- `resetForm()`: 同样改为 `busNo`
- `handleSave()`: 同步时增加 `formData.medicalrecordNumber` 同步
### 修复2: 执行时间
- `initData()`: 新增 `formData.executeTime = formatDateTime(new Date())`
- `resetForm()`: 将 `executeTime: null` 改为 `executeTime: formatDateTime(new Date())`
### 修复3: 套餐标签
- `loadCategoryItems()` 第1190行: 将 `isPackage` 判断改为 `item.packageName && item.name === item.packageName`
## 验证门禁
- Gate A: 根因已定位到具体代码行
- Gate B: 已读取 inspectionApplication.vue 全部代码,理解数据流
- Gate C: 修复方案与验收标准一致
- Gate D: 不涉及数据库 DDL 变更

View File

@@ -79,13 +79,11 @@ public class OpSchedule extends HisBaseEntity {
private String surgerySite;
/** 入院时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime admissionTime;
/** 入手术室时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime entryTime;
/** 手术室编码 */
@@ -144,23 +142,19 @@ public class OpSchedule extends HisBaseEntity {
private String assistant3Code;
/** 手术开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime startTime;
/** 手术结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime endTime;
/** 麻醉开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime anesStart;
/** 麻醉结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime anesEnd;
/** 手术状态 */

View File

@@ -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.busNo || ''
formData.medicalrecordNumber = props.patientInfo.identifierNo || ''
formData.applyDepartment = props.patientInfo.organizationName || ''
formData.applyDocName = userNickName.value || userName.value || ''
formData.applyDocCode = userId.value || ''
@@ -893,9 +893,6 @@ const initData = async () => {
formData.applyOrganizationId = props.patientInfo.orgId || ''
formData.encounterId = props.patientInfo.encounterId
// 执行时间默认填充当前系统时间
formData.executeTime = formatDateTime(new Date())
// 申请单号在保存时由后端生成,此处显示"自动生成"
formData.applyNo = '自动生成'
// 申请日期实时更新(启动定时器)
@@ -1526,7 +1523,7 @@ const resetForm = async () => {
applicationId: null,
applyOrganizationId: props.patientInfo.orgId || '',
patientName: props.patientInfo.patientName || '',
medicalrecordNumber: props.patientInfo.busNo || '',
medicalrecordNumber: props.patientInfo.identifierNo || '',
natureofCost: 'self',
applyTime: '', // 申请日期由定时器实时更新
applyDepartment: props.patientInfo.organizationName || '',
@@ -1550,7 +1547,7 @@ const resetForm = async () => {
visitNo: '',
specimenName: '血液',
encounterId: props.patientInfo.encounterId || '',
executeTime: formatDateTime(new Date()),
executeTime: null,
applicationType: 0,
})
selectedInspectionItems.value = []
@@ -1600,7 +1597,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.busNo || ''
formData.medicalrecordNumber = props.patientInfo.identifierNo || ''
formData.encounterId = props.patientInfo.encounterId || ''
formData.visitNo = props.patientInfo.busNo || ''
formData.patientId = props.patientInfo.patientId || ''
@@ -2000,7 +1997,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.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName
const isPackage = item.feePackageId != null || item.itemName?.includes('套餐')
return {
itemId: itemId,