feat(分诊队列): 实现分诊队列核心功能与日志记录
新增分诊队列相关服务接口与实现,包括队列管理、叫号操作和日志记录 添加DivLogService和CallRecordService用于记录分诊操作和叫号历史 在CurrentDayEncounterDto和TriageQueueItem中增加seqNo字段用于显示预约序号 实现分诊操作日志记录功能,包括添加队列、移除队列、叫号、完成等操作 新增CallType枚举定义叫号类型,并实现叫号记录功能 优化队列状态映射逻辑,支持更多状态类型显示
This commit is contained in:
@@ -40,7 +40,9 @@ import com.openhis.web.chargemanage.dto.PatientMetadata;
|
||||
import com.openhis.web.chargemanage.dto.PractitionerMetadata;
|
||||
import com.openhis.web.chargemanage.dto.ReprintRegistrationDto;
|
||||
import com.openhis.web.chargemanage.mapper.OutpatientRegistrationAppMapper;
|
||||
import com.openhis.triageandqueuemanage.domain.DivLog;
|
||||
import com.openhis.triageandqueuemanage.domain.TriageCandidateExclusion;
|
||||
import com.openhis.triageandqueuemanage.service.DivLogService;
|
||||
import com.openhis.triageandqueuemanage.service.TriageCandidateExclusionService;
|
||||
import com.openhis.web.paymentmanage.appservice.IPaymentRecService;
|
||||
import com.openhis.web.paymentmanage.dto.CancelPaymentDto;
|
||||
@@ -111,6 +113,9 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
@Resource
|
||||
com.openhis.triageandqueuemanage.service.TriageQueueItemService triageQueueItemService;
|
||||
|
||||
@Resource
|
||||
DivLogService divLogService;
|
||||
|
||||
@Resource
|
||||
ScheduleSlotMapper scheduleSlotMapper;
|
||||
|
||||
@@ -807,6 +812,23 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
queueItem.setDeleteFlag("1");
|
||||
queueItem.setUpdateTime(LocalDateTime.now());
|
||||
triageQueueItemService.updateById(queueItem);
|
||||
|
||||
// 写入分诊操作日志:诊前退号
|
||||
try {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
DivLog divLog = new DivLog()
|
||||
.setPoolId(queueItem.getPoolId())
|
||||
.setSlotId(queueItem.getSlotId())
|
||||
.setOpUserId(loginUser != null ? loginUser.getUserId() : null)
|
||||
.setAction("REFUND")
|
||||
.setCreateTime(LocalDateTime.now())
|
||||
.setUpdateAt(LocalDateTime.now())
|
||||
.setCreatedAt(LocalDateTime.now());
|
||||
divLogService.save(divLog);
|
||||
} catch (Exception e) {
|
||||
log.error("写入分诊退号日志失败,encounterId={}", encounterId, e);
|
||||
}
|
||||
|
||||
log.info("退号成功,已移除分诊队列记录,encounterId={}, queueItemId={}", encounterId, queueItem.getId());
|
||||
}
|
||||
|
||||
|
||||
@@ -170,4 +170,9 @@ public class CurrentDayEncounterDto {
|
||||
*/
|
||||
private String clinicRoom;
|
||||
|
||||
/**
|
||||
* 预约序号(来自 adm_schedule_slot.seq_no)
|
||||
*/
|
||||
private Integer seqNo;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user