From 58936c957d4abf2b63349f3d1737dccc607ad729 Mon Sep 17 00:00:00 2001 From: chenqi Date: Thu, 8 Jan 2026 16:32:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(doctorstation):=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=8C=BB=E5=98=B1=E5=BC=80=E5=85=B7=E5=92=8C=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=B8=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复医嘱开具时诊断验证警告显示逻辑,支持可选的警告提示 - 修复中医医嘱库存检查条件判断逻辑 - 修复中医医嘱表单验证后数据处理逻辑,添加剂量单位字典值设置 - 优化报告查询处理,独立处理检查和检验报告查询,避免相互影响 - 修复LIS和PACS报告地址配置缺失时的处理逻辑,改为警告而非异常抛出 --- .../DoctorStationAdviceAppServiceImpl.java | 12 +++-- .../prescription/prescriptionlist.vue | 12 ++--- .../doctorstation/components/reportQuery.vue | 22 +++++---- .../components/tcm/tcmAdvice.vue | 45 +++++++++++-------- 4 files changed, 56 insertions(+), 35 deletions(-) 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 75151c84..282f3fa5 100644 --- 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 @@ -959,12 +959,14 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp // LIS查看报告地址 String lisReportUrl = TenantOptionUtil.getOptionContent(TenantOptionDict.LIS_REPORT_URL); if (StringUtils.isEmpty(lisReportUrl)) { - throw new ServiceException("租户配置项【LIS查看报告地址】未配置"); + log.warn("租户配置项【LIS查看报告地址】未配置"); } List proofResult = doctorStationAdviceAppMapper.getProofAndTestResult(encounterId, RequestStatus.DRAFT.getValue(), ActivityType.PROOF.getValue()); for (ProofAndTestResultDto proofAndTestResultDto : proofResult) { - proofAndTestResultDto.setRequestUrl(lisReportUrl.concat(proofAndTestResultDto.getBusNo())); + if (StringUtils.isNotEmpty(lisReportUrl)) { + proofAndTestResultDto.setRequestUrl(lisReportUrl.concat(proofAndTestResultDto.getBusNo())); + } } return R.ok(proofResult); @@ -981,12 +983,14 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp // PACS查看报告地址 String pacsReportUrl = TenantOptionUtil.getOptionContent(TenantOptionDict.PACS_REPORT_URL); if (StringUtils.isEmpty(pacsReportUrl)) { - throw new ServiceException("租户配置项【PACS查看报告地址】未配置"); + log.warn("租户配置项【PACS查看报告地址】未配置"); } List testResult = doctorStationAdviceAppMapper.getProofAndTestResult(encounterId, RequestStatus.DRAFT.getValue(), ActivityType.TEST.getValue()); for (ProofAndTestResultDto proofAndTestResultDto : testResult) { - proofAndTestResultDto.setRequestUrl(pacsReportUrl.concat(proofAndTestResultDto.getBusNo())); + if (StringUtils.isNotEmpty(pacsReportUrl)) { + proofAndTestResultDto.setRequestUrl(pacsReportUrl.concat(proofAndTestResultDto.getBusNo())); + } } return R.ok(testResult); } diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index ee811a9a..6d40b2d2 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -1106,7 +1106,7 @@ onMounted(() => { document.addEventListener('keydown', escKeyListener); // 初始化时自动创建第一个西药处方 if (westernPrescriptions.value.length === 0) { - handleAddPrescription(); + handleAddPrescription(null, false); } }); @@ -1531,7 +1531,7 @@ function getListInfo(addNewRow) { }); getGroupMarkers(); // 更新标记 if (props.activeTab == 'prescription' && addNewRow) { - handleAddPrescription(); + handleAddPrescription(null, false); } // 在所有异步操作完成后 resolve Promise @@ -1595,14 +1595,16 @@ function handleSelectionChange(selection, row) { } // 新增医嘱 -function handleAddPrescription(prescriptionId) { +function handleAddPrescription(prescriptionId, showWarning = true) { // 如果传入了处方ID,先切换到该处方 if (prescriptionId && prescriptionId !== currentPrescriptionId.value) { switchToActivePrescription(prescriptionId); } if (diagnosisList.value.length == 0) { - proxy.$modal.msgWarning('请先保存诊断后再开立医嘱'); + if (showWarning) { + proxy.$modal.msgWarning('请先保存诊断后再开立医嘱'); + } return; } if (isAdding.value) { @@ -2291,7 +2293,7 @@ function handleSaveSign(row, index, prescriptionId) { }); } else { if (prescriptionList.value[0].adviceName) { - handleAddPrescription(); + handleAddPrescription(null, false); } } adviceQueryParams.value.adviceType = undefined; diff --git a/openhis-ui-vue3/src/views/doctorstation/components/reportQuery.vue b/openhis-ui-vue3/src/views/doctorstation/components/reportQuery.vue index ea122974..714967b7 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/reportQuery.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/reportQuery.vue @@ -145,14 +145,20 @@ const fetchAll = async () => { } loadingCheck.value = true; loadingInspection.value = true; - try { - await Promise.all([fetchCheckReport(), fetchInspectionReport()]); - } catch (e) { - proxy.$modal?.msgError?.(e.message || '查询报告失败'); - } finally { - loadingCheck.value = false; - loadingInspection.value = false; - } + + // 独立处理,互不影响 + const runFetch = async (fn, loadingRef, name) => { + try { + await fn(); + } catch (e) { + proxy.$modal?.msgError?.(`${name}查询失败: ${e.message || '未知错误'}`); + } finally { + loadingRef.value = false; + } + }; + + runFetch(fetchCheckReport, loadingCheck, '检查报告'); + runFetch(fetchInspectionReport, loadingInspection, '检验报告'); }; const handleRefreshCheck = async () => { diff --git a/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue b/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue index ee7efb64..1d014f9b 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue @@ -893,7 +893,7 @@ function selectAdviceBase(key, row, pIndex) { ).chargeItemDefinitionId; // 库存列表 + 价格列表拼成批次号的下拉框 - if (row.adviceType != 3) { + if (row.adviceType == 1 || row.adviceType == 2) { if (row.inventoryList && row.inventoryList.length == 0) { prescription.expandOrder = []; proxy.$modal.msgWarning('该项目无库存'); @@ -1069,23 +1069,32 @@ function handleSaveSign(row, index, pIndex) { const prescription = tcmPrescriptionList.value[pIndex]; const formRefName = 'formRef' + pIndex + '-' + index; proxy.$refs[formRefName][0].validate((valid) => { - row.isEdit = false; - prescription.isAdding = false; - prescription.expandOrder = []; - row.contentJson = undefined; - row.patientId = props.patientInfo.patientId; - row.encounterId = props.patientInfo.encounterId; - row.accountId = prescription.accountId; - row.quantity = row.minUnitQuantity; - row.conditionId = prescription.conditionId; - row.unitPrice = - row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit' - ? row.unitPrice - : new Decimal(row.unitPrice).div(row.partPercent).toFixed(2); - row.conditionDefinitionId = prescription.conditionDefinitionId; - row.encounterDiagnosisId = prescription.encounterDiagnosisId; - row.diagnosisName = prescription.diagnosisName; - row.contentJson = JSON.stringify(row); + if (valid) { + row.isEdit = false; + prescription.isAdding = false; + prescription.expandOrder = []; + row.contentJson = undefined; + row.patientId = props.patientInfo.patientId; + row.encounterId = props.patientInfo.encounterId; + row.accountId = prescription.accountId; + row.quantity = row.minUnitQuantity; + row.chineseHerbsDoseQuantity = prescription.chineseHerbsDoseQuantity; + row.unitPrice = + row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit' + ? row.unitPrice + : new Decimal(row.unitPrice).div(row.partPercent).toFixed(2); + row.conditionDefinitionId = prescription.conditionDefinitionId; + row.encounterDiagnosisId = prescription.encounterDiagnosisId; + row.diagnosisName = prescription.diagnosisName; + + // 寻找当前选中的单位字典值 + const selectedUnit = row.unitCodeList.find((item) => item.value === row.minUnitCode); + if (selectedUnit) { + row.doseUnitCode_dictText = selectedUnit.label; + } + + row.contentJson = JSON.stringify(row); + } }); }