diff --git a/MD/MODULE_INDEX.md b/MD/MODULE_INDEX.md index 16aca71e8..66356fd11 100644 --- a/MD/MODULE_INDEX.md +++ b/MD/MODULE_INDEX.md @@ -1,7 +1,7 @@ # HealthLink-HIS 代码模块索引 > 供 LLM 快速定位代码。每个模块列出 Controller → Service → Mapper 关键文件。 -> 最后更新: 2026-06-19 06:00 (335 个 Controller) +> 最后更新: 2026-06-19 18:00 (342 个 Controller) ## 关键词 → 模块速查 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java index ffb4806c5..1a9677f64 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java @@ -196,7 +196,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { List activityList = regAdviceSaveList.stream() .filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType()) || ItemType.SURGERY.getValue().equals(e.getAdviceType()) - || ItemType.TEXT.getValue().equals(e.getAdviceType()) || (e.getAdviceType() != null && e.getAdviceType() == 26)) .collect(Collectors.toList()); // 耗材 🔧 Bug #147 修复 @@ -1081,7 +1080,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { // 诊疗(包含 医疗活动=3、手术=6、文字医嘱=8、护理=26 等,都属于 service_request) List activityList = paramList.stream() .filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType()) - || ItemType.TEXT.getValue().equals(e.getAdviceType()) || ItemType.SURGERY.getValue().equals(e.getAdviceType()) || (e.getAdviceType() != null && e.getAdviceType() == 26)) .collect(Collectors.toList()); @@ -1156,14 +1154,17 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { .orElse(new Date()); // 获取当前操作用户昵称作为停嘱医生 String stopUserName = SecurityUtils.getNickName(); - // 药品 + // 药品(包含出院带药adviceType=7,与handleDeleteOperations保持一致) List medicineList = paramList.stream() - .filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList()); + .filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType()) + || (e.getAdviceType() != null && e.getAdviceType() == 7)) + .collect(Collectors.toList()); List medicineRequestIds = medicineList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList()); - // 诊疗(包含护理adviceType=26、文字医嘱adviceType=8) + // 诊疗(包含护理adviceType=26、手术adviceType=6、文字医嘱adviceType=8,与saveRegAdvice保持一致) List activityList = paramList.stream() .filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType()) + || ItemType.SURGERY.getValue().equals(e.getAdviceType()) || ItemType.TEXT.getValue().equals(e.getAdviceType()) || (e.getAdviceType() != null && e.getAdviceType() == 26)) .collect(Collectors.toList()); @@ -1195,6 +1196,28 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { .set(DeviceRequest::getStatusEnum, RequestStatus.PENDING_STOP.getValue()) .set(DeviceRequest::getUpdateBy, stopUserName)); } + + // 🔧 Bug #782 兜底处理:未被以上类型过滤器捕获的未知医嘱类型 + // 将所有未匹配类型的医嘱统一按诊疗请求(ServiceRequest)处理 + Set handledIds = new HashSet<>(); + handledIds.addAll(medicineRequestIds); + handledIds.addAll(activityRequestIds); + handledIds.addAll(deviceRequestIds); + List fallbackRequestIds = paramList.stream() + .map(AdviceBatchOpParam::getRequestId) + .filter(Objects::nonNull) + .filter(id -> !handledIds.contains(id)) + .collect(Collectors.toList()); + if (!fallbackRequestIds.isEmpty()) { + log.info("Bug #782 兜底停嘱:处理未匹配类型的医嘱,requestIds: {}, 共{}条", + fallbackRequestIds, fallbackRequestIds.size()); + iServiceRequestService.update(new LambdaUpdateWrapper() + .in(ServiceRequest::getId, fallbackRequestIds) + .set(ServiceRequest::getOccurrenceEndTime, stopTime) + .set(ServiceRequest::getStatusEnum, RequestStatus.PENDING_STOP.getValue()) + .set(ServiceRequest::getUpdateBy, stopUserName)); + } + return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"医嘱停止"})); } @@ -1213,14 +1236,17 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { */ @Override public R cancelStopRegAdvice(List paramList) { - // 药品 + // 药品(包含出院带药adviceType=7,与handleDeleteOperations保持一致) List medicineList = paramList.stream() - .filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList()); + .filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType()) + || (e.getAdviceType() != null && e.getAdviceType() == 7)) + .collect(Collectors.toList()); List medicineRequestIds = medicineList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList()); - // 诊疗(包含护理adviceType=26、文字医嘱adviceType=8) + // 诊疗(包含护理adviceType=26、手术adviceType=6、文字医嘱adviceType=8,与saveRegAdvice保持一致) List activityList = paramList.stream() .filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType()) + || ItemType.SURGERY.getValue().equals(e.getAdviceType()) || ItemType.TEXT.getValue().equals(e.getAdviceType()) || (e.getAdviceType() != null && e.getAdviceType() == 26)) .collect(Collectors.toList()); @@ -1310,4 +1336,4 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { } -} \ No newline at end of file +} diff --git a/healthlink-his-ui/src/views/doctorstation/components/inspection/inspectionApplication.vue b/healthlink-his-ui/src/views/doctorstation/components/inspection/inspectionApplication.vue index 0251d4517..bddfe373c 100755 --- a/healthlink-his-ui/src/views/doctorstation/components/inspection/inspectionApplication.vue +++ b/healthlink-his-ui/src/views/doctorstation/components/inspection/inspectionApplication.vue @@ -81,6 +81,7 @@ class="inspection-table" :row-config="{ keyField: 'applicationId', keyField: 'itemId' }" @checkbox-change="handleSelectionChange" + @current-change="handleRowClick" @cell-click="handleCellClick" > { let hasErrors = false // 修复【#406】:保存前尝试从 props 同步患者信息,避免因加载时序导致信息缺失 - if (props.patientInfo && props.patientInfo.encounterId) { - // encounterId 来自 adm_encounter 表,lab_apply 表无此字段,需始终从 props 同步 - if (!formData.encounterId) { - formData.encounterId = props.patientInfo.encounterId || '' - } - if (!formData.patientName?.trim()) { - formData.patientName = props.patientInfo.patientName || '' - } - if (!formData.medicalrecordNumber?.trim()) { - formData.medicalrecordNumber = props.patientInfo.identifierNo || '' - } - if (!formData.visitNo) { - formData.visitNo = props.patientInfo.busNo || '' - } - if (!formData.patientId) { - formData.patientId = props.patientInfo.patientId || '' - } - if (!formData.applyDepartment) { - formData.applyDepartment = props.patientInfo.organizationName || '' - } - if (!formData.applyDeptCode) { - formData.applyDeptCode = props.patientInfo.organizationName || '' - } - if (!formData.applyOrganizationId) { - formData.applyOrganizationId = props.patientInfo.orgId || '' - } + if ((!formData.patientName?.trim() || !formData.medicalrecordNumber?.trim()) && props.patientInfo && props.patientInfo.encounterId) { + formData.patientName = props.patientInfo.patientName || '' + formData.medicalrecordNumber = props.patientInfo.identifierNo || '' + formData.encounterId = props.patientInfo.encounterId || '' + formData.visitNo = props.patientInfo.busNo || '' + formData.patientId = props.patientInfo.patientId || '' + formData.applyDepartment = props.patientInfo.organizationName || '' + formData.applyDeptCode = props.patientInfo.organizationName || '' + formData.applyOrganizationId = props.patientInfo.orgId || '' } // P0:检查患者信息是否已加载 @@ -2473,13 +2457,10 @@ const handleDelete = (row) => { } // 单元格点击 - 点击表格行时加载申请单详情 -const handleCellClick = (params) => { - // vxe-table cell-click 事件参数是 { row, column, $event, ... } 对象,需安全提取行数据 - const row = params.row || params; - const column = params.column || params; +const handleCellClick = (row, column) => { // 如果点击的是操作列或展开列,不触发数据填充 - if (column.type === 'expand' || column.type === 'selection' || - column.title === '操作' || column.property === '操作') { + if (column.property === '操作' || column.label === '操作' || + column.type === 'expand' || column.type === 'selection') { return; } // 点击表格行时,将该申请单的数据加载到表单中 @@ -2489,6 +2470,15 @@ const handleCellClick = (params) => { } } +// 行点击事件处理 +const handleRowClick = (currentRow, oldRow) => { + // 点击表格行时,将该申请单的数据加载到表单中 + // 使用 applyNo 判断是否有效,同时检查是否处于删除状态 + if (currentRow && currentRow.applyNo && !isDeleting.value) { + loadApplicationToForm(currentRow); + } +} + // 提取公共方法加载申请单到表单 const loadApplicationToForm = async (row) => { // 停止申请日期实时更新(加载已保存的申请单) diff --git a/healthlink-his-ui/src/views/doctorstation/components/surgery/surgeryApplication.vue b/healthlink-his-ui/src/views/doctorstation/components/surgery/surgeryApplication.vue index af4be781f..425eb354d 100755 --- a/healthlink-his-ui/src/views/doctorstation/components/surgery/surgeryApplication.vue +++ b/healthlink-his-ui/src/views/doctorstation/components/surgery/surgeryApplication.vue @@ -196,6 +196,7 @@ v-model="open" :title="title" width="1200px" + class="surgery-dialog" :close-on-click-modal="false" @close="cancel" > @@ -1757,14 +1758,13 @@ defineExpose({ height: 100%; width: 100%; padding: 10px; - + /* 顶部操作栏样式 */ .top-operation-bar { height: 60px; - display: flex; align-items: center; margin-bottom: 16px; - + .add-button { background-color: #5b8fb9; color: white; @@ -1775,7 +1775,7 @@ defineExpose({ box-shadow: 0 4px 8px rgba(91, 143, 185, 0.3); } } - + .refresh-button { background-color: transparent; border: 1px solid #dcdfe6; @@ -1787,14 +1787,14 @@ defineExpose({ } } } - + /* 表格样式 */ .vxe-table { :deep(.cancelled-row) { background-color: #f5f5f5; color: #999; text-decoration: line-through; - + :deep(.cell) { opacity: 0.6; } @@ -1802,47 +1802,49 @@ defineExpose({ } } -/* 对话框样式 */ -.el-dialog { +/* Bug #770: Dialog flex 布局 — 防止 footer 按钮遮盖表单字段 */ +:deep(.surgery-dialog) { + display: flex; + flex-direction: column; + max-height: 85vh; + margin-top: 7.5vh; +} + +:deep(.surgery-dialog .el-dialog__header) { + flex-shrink: 0; + padding: 16px 20px; + border-bottom: 1px solid #ebeef5; +} + +:deep(.surgery-dialog .el-dialog__body) { + flex: 1; + min-height: 0; + overflow-y: auto; + padding: 20px; +} + +:deep(.surgery-dialog .el-dialog__footer) { + flex-shrink: 0; + padding: 12px 20px; + border-top: 1px solid #ebeef5; +} + +/* 对话框圆角 */ +:deep(.surgery-dialog .el-dialog) { border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); } .dialog-footer { text-align: center; - padding: 20px 0; -} - -/* Bug #770: Dialog flex 布局 — 防止 footer 按钮遮盖表单字段 */ -:deep(.el-dialog) { - display: flex; - flex-direction: column; - max-height: 90vh; - margin-top: 5vh; -} - -:deep(.el-dialog__header) { - flex-shrink: 0; -} - -:deep(.el-dialog__body) { - flex: 1; - overflow-y: auto; - overflow: hidden; - min-height: 0; -} - -:deep(.el-dialog__footer) { - flex-shrink: 0; - border-top: 1px solid #ebeef5; - padding: 12px 20px 16px; } /* 响应式:小屏幕下对话框宽度自适应 */ @media (max-width: 1200px) { - :deep(.el-dialog) { + :deep(.surgery-dialog) { width: 95vw !important; margin: 2.5vh auto; } } - \ No newline at end of file + + \ No newline at end of file diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/index.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/index.vue index ce5a85568..634559f1f 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/index.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/index.vue @@ -4,6 +4,7 @@ @@ -276,4 +277,4 @@ provide('adviceDiagnoInit', (value) => { } } } - + \ No newline at end of file diff --git a/healthlink-his-ui/src/views/inpatientNurse/drugDistribution/components/summaryMedicineList.vue b/healthlink-his-ui/src/views/inpatientNurse/drugDistribution/components/summaryMedicineList.vue index 5f6b8011f..06d13a5b2 100755 --- a/healthlink-his-ui/src/views/inpatientNurse/drugDistribution/components/summaryMedicineList.vue +++ b/healthlink-his-ui/src/views/inpatientNurse/drugDistribution/components/summaryMedicineList.vue @@ -191,10 +191,8 @@ function handleGetPrescription() { const params = { encounterIds: encounterIds || undefined }; - if (props.therapyEnum !== undefined) { - params.therapyEnum = props.therapyEnum; - } - params.tcmFlag = props.drugType === '1' ? 0 : 1; + // 注意:汇总单查询不传 tcmFlag / therapyEnum,因为汇总单表(wor_supply_request) + // 没有这些列,传入会导致 PostgreSQL 报 "column 'tcm_flag' does not exist" getMedicineSummary(params).then((res) => { medicineSummaryFormList.value = res.data.records; loading.value = false; diff --git a/healthlink-his-ui/src/views/inpatientNurse/inpatientNurseStation/index.vue b/healthlink-his-ui/src/views/inpatientNurse/inpatientNurseStation/index.vue index 1a16c1054..4dedfe7af 100755 --- a/healthlink-his-ui/src/views/inpatientNurse/inpatientNurseStation/index.vue +++ b/healthlink-his-ui/src/views/inpatientNurse/inpatientNurseStation/index.vue @@ -96,9 +96,14 @@ + + - 退药管理 - 手术记录 --> + @@ -122,6 +127,7 @@ import { MedicalOrderProofread, RollFee, TprChart, + MedicineReturn, } from './index.js'; const activeTabName = ref('InOut');