Fix Bug #519: [门诊医生站-诊断-报卡] 已完成传染病报卡的诊断在再次点保存时重复弹出报卡界面
根因:handleInfectiousDiseaseReport() 仅根据诊断名称匹配传染病,未校验该诊断是否已有已提交的报卡记录。 修复方案: 1. 后端 DiagnosisQueryDto 新增 hasInfectiousReport 字段 2. getEncounterDiagnosis SQL 通过 EXISTS 子查询关联 infectious_card 表, 判断是否存在 status >= 1(已提交/已审核/已上报)的报卡记录 3. 前端 handleInfectiousDiseaseReport() 过滤掉 hasInfectiousReport === 1 的诊断,不再弹出报卡 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -134,7 +134,11 @@
|
||||
T2.yb_no,
|
||||
T1.onset_date AS onsetDate,
|
||||
T1.diagnosis_time AS diagnosisTime,
|
||||
T1.doctor AS diagnosisDoctor
|
||||
T1.doctor AS diagnosisDoctor,
|
||||
CASE WHEN EXISTS (
|
||||
SELECT 1 FROM infectious_card T4
|
||||
WHERE T4.diag_id = T2.id AND T4.delete_flag = '0' AND T4.status >= 1
|
||||
) THEN 1 ELSE 0 END AS hasInfectiousReport
|
||||
FROM adm_encounter_diagnosis AS T1
|
||||
LEFT JOIN cli_condition AS T2 ON T2.ID = T1.condition_id
|
||||
AND T2.delete_flag = '0' AND T2.tcm_flag = 0
|
||||
|
||||
Reference in New Issue
Block a user