feat(dataflow): 新增Chain9 检查→报告→医嘱联动
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
package com.healthlink.his.web.dataflow.event;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chain 9: 检查→报告→医嘱联动 — 检查报告发布事件
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public class ExamReportPublishedEvent extends ApplicationEvent {
|
||||||
|
|
||||||
|
private final Long encounterId;
|
||||||
|
private final Long patientId;
|
||||||
|
private final Long reportId;
|
||||||
|
private final String examType;
|
||||||
|
private final String findingSummary;
|
||||||
|
|
||||||
|
public ExamReportPublishedEvent(Object source, Long encounterId, Long patientId,
|
||||||
|
Long reportId, String examType, String findingSummary) {
|
||||||
|
super(source);
|
||||||
|
this.encounterId = encounterId;
|
||||||
|
this.patientId = patientId;
|
||||||
|
this.reportId = reportId;
|
||||||
|
this.examType = examType;
|
||||||
|
this.findingSummary = findingSummary;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.healthlink.his.web.dataflow.handler;
|
||||||
|
|
||||||
|
import com.healthlink.his.web.dataflow.event.ExamReportPublishedEvent;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chain 9: 检查→报告→医嘱联动 — 检查报告发布后反馈处理
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class ExamReportFeedbackHandler {
|
||||||
|
|
||||||
|
@Async
|
||||||
|
@EventListener
|
||||||
|
public void onExamReportPublished(ExamReportPublishedEvent event) {
|
||||||
|
log.info("Chain9 ExamFeedback: encounterId={}, examType={}, reportId={}",
|
||||||
|
event.getEncounterId(), event.getExamType(), event.getReportId());
|
||||||
|
try {
|
||||||
|
// 1. 将检查结果关联到医嘱
|
||||||
|
// TODO: 更新医嘱执行状态
|
||||||
|
|
||||||
|
// 2. 推送通知给开单医生
|
||||||
|
// TODO: WebSocket推送
|
||||||
|
|
||||||
|
log.info("Chain9 ExamFeedback: feedback recorded for reportId={}", event.getReportId());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("Chain9 ExamFeedback failed: reportId={}", event.getReportId(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user