fix(#503): 发药明细查询缺少 SUMMARIZED 状态——汇总发药后发药明细不显示
根因:
- 护士执行医嘱后 MedicationDispense 状态 = PREPARATION(2)
- 护士汇总发药申请后状态更新为 SUMMARIZED(8)
- 但 PendingMedicationDetails Mapper 只过滤 IN_PROGRESS(3)/PREPARATION(2)/PREPARED(14)
- 不含 SUMMARIZED(8),导致汇总发药申请后发药明细不再显示
修复:
- Mapper XML 增加 #{summarized} 到状态过滤
- Mapper Interface 增加 @Param('summarized')
- Service 调用传入 DispenseStatus.SUMMARIZED.getValue()
全链路状态流转:
医生开单(草稿1) → 护士执行(待配药2) → 汇总发药申请(已汇总8)
This commit is contained in:
@@ -52,7 +52,8 @@ public class PendingMedicationDetailsAppServiceImpl implements IPendingMedicatio
|
||||
Page<PendingMedicationPageDto> pendingMedicationPage = pendingMedicationDetailsMapper
|
||||
.selectPendingMedicationDetailsPage(new Page<>(pageNo, pageSize), queryWrapper,
|
||||
DispenseStatus.IN_PROGRESS.getValue(), DispenseStatus.PREPARATION.getValue(),
|
||||
DispenseStatus.PREPARED.getValue(), EncounterClass.AMB.getValue(), EncounterClass.IMP.getValue());
|
||||
DispenseStatus.PREPARED.getValue(), DispenseStatus.SUMMARIZED.getValue(),
|
||||
EncounterClass.AMB.getValue(), EncounterClass.IMP.getValue());
|
||||
|
||||
pendingMedicationPage.getRecords().forEach(e -> {
|
||||
// 发药类型
|
||||
|
||||
@@ -22,6 +22,7 @@ public interface PendingMedicationDetailsMapper {
|
||||
* @param inProgress 发药类型:待发药
|
||||
* @param preparation 发药类型:待配药
|
||||
* @param prepared 发药类型:已配药
|
||||
* @param summarized 发药类型:已汇总
|
||||
* @param amb 门诊类型
|
||||
* @param imp 住院类型
|
||||
* @return 待发药明细
|
||||
@@ -32,6 +33,7 @@ public interface PendingMedicationDetailsMapper {
|
||||
@Param("inProgress") Integer inProgress,
|
||||
@Param("preparation") Integer preparation,
|
||||
@Param("prepared") Integer prepared,
|
||||
@Param("summarized") Integer summarized,
|
||||
@Param("amb") Integer amb,
|
||||
@Param("imp") Integer imp);
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
ON T5.medication_def_id = T6.id
|
||||
AND T5.delete_flag = '0'
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.status_enum IN (#{inProgress}, #{preparation}, #{prepared})
|
||||
AND T1.status_enum IN (#{inProgress}, #{preparation}, #{prepared}, #{summarized})
|
||||
ORDER BY T1.create_time DESC
|
||||
) AS T7
|
||||
${ew.customSqlSegment}
|
||||
|
||||
Reference in New Issue
Block a user