fix(doctorstation): 解决医嘱开具和报告查询中的问题
- 修复医嘱开具时诊断验证警告显示逻辑,支持可选的警告提示 - 修复中医医嘱库存检查条件判断逻辑 - 修复中医医嘱表单验证后数据处理逻辑,添加剂量单位字典值设置 - 优化报告查询处理,独立处理检查和检验报告查询,避免相互影响 - 修复LIS和PACS报告地址配置缺失时的处理逻辑,改为警告而非异常抛出
This commit is contained in:
@@ -959,12 +959,14 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
|||||||
// LIS查看报告地址
|
// LIS查看报告地址
|
||||||
String lisReportUrl = TenantOptionUtil.getOptionContent(TenantOptionDict.LIS_REPORT_URL);
|
String lisReportUrl = TenantOptionUtil.getOptionContent(TenantOptionDict.LIS_REPORT_URL);
|
||||||
if (StringUtils.isEmpty(lisReportUrl)) {
|
if (StringUtils.isEmpty(lisReportUrl)) {
|
||||||
throw new ServiceException("租户配置项【LIS查看报告地址】未配置");
|
log.warn("租户配置项【LIS查看报告地址】未配置");
|
||||||
}
|
}
|
||||||
List<ProofAndTestResultDto> proofResult = doctorStationAdviceAppMapper.getProofAndTestResult(encounterId,
|
List<ProofAndTestResultDto> proofResult = doctorStationAdviceAppMapper.getProofAndTestResult(encounterId,
|
||||||
RequestStatus.DRAFT.getValue(), ActivityType.PROOF.getValue());
|
RequestStatus.DRAFT.getValue(), ActivityType.PROOF.getValue());
|
||||||
for (ProofAndTestResultDto proofAndTestResultDto : proofResult) {
|
for (ProofAndTestResultDto proofAndTestResultDto : proofResult) {
|
||||||
proofAndTestResultDto.setRequestUrl(lisReportUrl.concat(proofAndTestResultDto.getBusNo()));
|
if (StringUtils.isNotEmpty(lisReportUrl)) {
|
||||||
|
proofAndTestResultDto.setRequestUrl(lisReportUrl.concat(proofAndTestResultDto.getBusNo()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok(proofResult);
|
return R.ok(proofResult);
|
||||||
@@ -981,12 +983,14 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
|||||||
// PACS查看报告地址
|
// PACS查看报告地址
|
||||||
String pacsReportUrl = TenantOptionUtil.getOptionContent(TenantOptionDict.PACS_REPORT_URL);
|
String pacsReportUrl = TenantOptionUtil.getOptionContent(TenantOptionDict.PACS_REPORT_URL);
|
||||||
if (StringUtils.isEmpty(pacsReportUrl)) {
|
if (StringUtils.isEmpty(pacsReportUrl)) {
|
||||||
throw new ServiceException("租户配置项【PACS查看报告地址】未配置");
|
log.warn("租户配置项【PACS查看报告地址】未配置");
|
||||||
}
|
}
|
||||||
List<ProofAndTestResultDto> testResult = doctorStationAdviceAppMapper.getProofAndTestResult(encounterId,
|
List<ProofAndTestResultDto> testResult = doctorStationAdviceAppMapper.getProofAndTestResult(encounterId,
|
||||||
RequestStatus.DRAFT.getValue(), ActivityType.TEST.getValue());
|
RequestStatus.DRAFT.getValue(), ActivityType.TEST.getValue());
|
||||||
for (ProofAndTestResultDto proofAndTestResultDto : testResult) {
|
for (ProofAndTestResultDto proofAndTestResultDto : testResult) {
|
||||||
proofAndTestResultDto.setRequestUrl(pacsReportUrl.concat(proofAndTestResultDto.getBusNo()));
|
if (StringUtils.isNotEmpty(pacsReportUrl)) {
|
||||||
|
proofAndTestResultDto.setRequestUrl(pacsReportUrl.concat(proofAndTestResultDto.getBusNo()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return R.ok(testResult);
|
return R.ok(testResult);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1106,7 +1106,7 @@ onMounted(() => {
|
|||||||
document.addEventListener('keydown', escKeyListener);
|
document.addEventListener('keydown', escKeyListener);
|
||||||
// 初始化时自动创建第一个西药处方
|
// 初始化时自动创建第一个西药处方
|
||||||
if (westernPrescriptions.value.length === 0) {
|
if (westernPrescriptions.value.length === 0) {
|
||||||
handleAddPrescription();
|
handleAddPrescription(null, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1531,7 +1531,7 @@ function getListInfo(addNewRow) {
|
|||||||
});
|
});
|
||||||
getGroupMarkers(); // 更新标记
|
getGroupMarkers(); // 更新标记
|
||||||
if (props.activeTab == 'prescription' && addNewRow) {
|
if (props.activeTab == 'prescription' && addNewRow) {
|
||||||
handleAddPrescription();
|
handleAddPrescription(null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 在所有异步操作完成后 resolve Promise
|
// 在所有异步操作完成后 resolve Promise
|
||||||
@@ -1595,14 +1595,16 @@ function handleSelectionChange(selection, row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 新增医嘱
|
// 新增医嘱
|
||||||
function handleAddPrescription(prescriptionId) {
|
function handleAddPrescription(prescriptionId, showWarning = true) {
|
||||||
// 如果传入了处方ID,先切换到该处方
|
// 如果传入了处方ID,先切换到该处方
|
||||||
if (prescriptionId && prescriptionId !== currentPrescriptionId.value) {
|
if (prescriptionId && prescriptionId !== currentPrescriptionId.value) {
|
||||||
switchToActivePrescription(prescriptionId);
|
switchToActivePrescription(prescriptionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (diagnosisList.value.length == 0) {
|
if (diagnosisList.value.length == 0) {
|
||||||
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
|
if (showWarning) {
|
||||||
|
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isAdding.value) {
|
if (isAdding.value) {
|
||||||
@@ -2291,7 +2293,7 @@ function handleSaveSign(row, index, prescriptionId) {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (prescriptionList.value[0].adviceName) {
|
if (prescriptionList.value[0].adviceName) {
|
||||||
handleAddPrescription();
|
handleAddPrescription(null, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
adviceQueryParams.value.adviceType = undefined;
|
adviceQueryParams.value.adviceType = undefined;
|
||||||
|
|||||||
@@ -145,14 +145,20 @@ const fetchAll = async () => {
|
|||||||
}
|
}
|
||||||
loadingCheck.value = true;
|
loadingCheck.value = true;
|
||||||
loadingInspection.value = true;
|
loadingInspection.value = true;
|
||||||
try {
|
|
||||||
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
|
// 独立处理,互不影响
|
||||||
} catch (e) {
|
const runFetch = async (fn, loadingRef, name) => {
|
||||||
proxy.$modal?.msgError?.(e.message || '查询报告失败');
|
try {
|
||||||
} finally {
|
await fn();
|
||||||
loadingCheck.value = false;
|
} catch (e) {
|
||||||
loadingInspection.value = false;
|
proxy.$modal?.msgError?.(`${name}查询失败: ${e.message || '未知错误'}`);
|
||||||
}
|
} finally {
|
||||||
|
loadingRef.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
runFetch(fetchCheckReport, loadingCheck, '检查报告');
|
||||||
|
runFetch(fetchInspectionReport, loadingInspection, '检验报告');
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleRefreshCheck = async () => {
|
const handleRefreshCheck = async () => {
|
||||||
|
|||||||
@@ -893,7 +893,7 @@ function selectAdviceBase(key, row, pIndex) {
|
|||||||
).chargeItemDefinitionId;
|
).chargeItemDefinitionId;
|
||||||
|
|
||||||
// 库存列表 + 价格列表拼成批次号的下拉框
|
// 库存列表 + 价格列表拼成批次号的下拉框
|
||||||
if (row.adviceType != 3) {
|
if (row.adviceType == 1 || row.adviceType == 2) {
|
||||||
if (row.inventoryList && row.inventoryList.length == 0) {
|
if (row.inventoryList && row.inventoryList.length == 0) {
|
||||||
prescription.expandOrder = [];
|
prescription.expandOrder = [];
|
||||||
proxy.$modal.msgWarning('该项目无库存');
|
proxy.$modal.msgWarning('该项目无库存');
|
||||||
@@ -1069,23 +1069,32 @@ function handleSaveSign(row, index, pIndex) {
|
|||||||
const prescription = tcmPrescriptionList.value[pIndex];
|
const prescription = tcmPrescriptionList.value[pIndex];
|
||||||
const formRefName = 'formRef' + pIndex + '-' + index;
|
const formRefName = 'formRef' + pIndex + '-' + index;
|
||||||
proxy.$refs[formRefName][0].validate((valid) => {
|
proxy.$refs[formRefName][0].validate((valid) => {
|
||||||
row.isEdit = false;
|
if (valid) {
|
||||||
prescription.isAdding = false;
|
row.isEdit = false;
|
||||||
prescription.expandOrder = [];
|
prescription.isAdding = false;
|
||||||
row.contentJson = undefined;
|
prescription.expandOrder = [];
|
||||||
row.patientId = props.patientInfo.patientId;
|
row.contentJson = undefined;
|
||||||
row.encounterId = props.patientInfo.encounterId;
|
row.patientId = props.patientInfo.patientId;
|
||||||
row.accountId = prescription.accountId;
|
row.encounterId = props.patientInfo.encounterId;
|
||||||
row.quantity = row.minUnitQuantity;
|
row.accountId = prescription.accountId;
|
||||||
row.conditionId = prescription.conditionId;
|
row.quantity = row.minUnitQuantity;
|
||||||
row.unitPrice =
|
row.chineseHerbsDoseQuantity = prescription.chineseHerbsDoseQuantity;
|
||||||
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
|
row.unitPrice =
|
||||||
? row.unitPrice
|
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
|
||||||
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
|
? row.unitPrice
|
||||||
row.conditionDefinitionId = prescription.conditionDefinitionId;
|
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
|
||||||
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
|
row.conditionDefinitionId = prescription.conditionDefinitionId;
|
||||||
row.diagnosisName = prescription.diagnosisName;
|
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
|
||||||
row.contentJson = JSON.stringify(row);
|
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);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user