feat(diagnosis): 完善诊断模块功能并优化病历数据获取
- 添加isSaving状态控制保存过程 - 监听患者信息变化自动获取病历详情和诊断列表 - 增强getDetail方法添加错误处理和日志输出 - 重构handleAddDiagnosis方法分离验证逻辑到独立函数 - 优化病历详情获取接口同时查询门诊和住院病历数据 - 添加文档定义树形列表按使用范围筛选功能 - 修复历史病历数据加载错误处理机制
This commit is contained in:
@@ -560,12 +560,12 @@ const loadLatestMedicalRecord = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
// 获取患者的历史病历记录
|
||||
// const res = await getRecordByEncounterIdList({
|
||||
// isPage: 0,
|
||||
// encounterId: patientInfo.value.encounterId,
|
||||
// patientId: patientInfo.value.patientId,
|
||||
// definitionId: currentSelectTemplate.value.id,
|
||||
// });
|
||||
const res = await getRecordByEncounterIdList({
|
||||
isPage: 0,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
patientId: patientInfo.value.patientId,
|
||||
definitionId: currentSelectTemplate.value.id,
|
||||
});
|
||||
|
||||
const historyRecords = res.data || [];
|
||||
if (historyRecords.length > 0) {
|
||||
@@ -623,7 +623,8 @@ const loadLatestMedicalRecord = async () => {
|
||||
loading.value = false;
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage.error('加载最新病历数据失败=====>', error);
|
||||
console.error('加载最新病历数据失败:', error);
|
||||
ElMessage.error('加载最新病历数据失败');
|
||||
// 出错时也清空选中状态
|
||||
selectedHistoryRecordId.value = '';
|
||||
// 出错时也要清空表单数据,避免显示之前患者的数据
|
||||
|
||||
Reference in New Issue
Block a user