|
|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.modules.medical.common.bo.after.response.AfterwardsAuditDetailResponse;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.modules.medical.common.bo.before.AuditAdvanceWarningAuditDetailResponse;
|
|
|
import org.jeecg.modules.medical.common.bo.before.PatientInformationResponse;
|
|
|
@@ -14,6 +15,7 @@ import org.jeecg.modules.medical.common.bo.mid.AuditMidDetailListResponse;
|
|
|
import org.jeecg.modules.medical.common.bo.mid.request.AuditMidDetailListRequest;
|
|
|
import org.jeecg.modules.medical.common.bo.mid.response.*;
|
|
|
import org.jeecg.modules.medical.entity.AdvanceWarningAuditDetail;
|
|
|
+import org.jeecg.modules.medical.service.*;
|
|
|
import org.jeecg.modules.medical.entity.AfterwardsAuditDetail;
|
|
|
import org.jeecg.modules.medical.service.*;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
@@ -46,6 +48,13 @@ public class ViolationAnalysisServiceImpl implements IViolationAnalysisService {
|
|
|
@Autowired
|
|
|
private IAdvanceWarningAuditService advanceWarningAuditService;
|
|
|
|
|
|
+ /** 事后服务 */
|
|
|
+ @Autowired
|
|
|
+ private IAfterwardsAuditService afterwardsAuditService;
|
|
|
+ @Autowired
|
|
|
+ private IAfterwardsAuditDetailService afterwardsAuditDetailService;
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public IPage<AuditAdvanceWarningAuditDetailResponse> loadBeforeList(AuditAdvanceWarningAuditDetailResponse advanceWarningAuditDetail, Integer pageNo, Integer pageSize, Map<String, String[]> parameterMap) {
|
|
|
IPage<AuditAdvanceWarningAuditDetailResponse> resultPage = new Page<>(pageNo, pageSize);
|
|
|
@@ -216,6 +225,62 @@ public class ViolationAnalysisServiceImpl implements IViolationAnalysisService {
|
|
|
}
|
|
|
|
|
|
// @Override
|
|
|
+ @Override
|
|
|
+ public MidAuditDetailResponse afterAllDetail(Integer detailId) {
|
|
|
+ MidAuditDetailResponse result = new MidAuditDetailResponse();
|
|
|
+
|
|
|
+
|
|
|
+ AfterwardsAuditDetailResponse detailInfo = afterwardsAuditDetailService.afterAllDetail(detailId);
|
|
|
+
|
|
|
+// detailInfo = midIncidentAuditService.loadViolationDetail(detailId);
|
|
|
+ if (detailInfo == null) {
|
|
|
+ log.error("找不到审查记录");
|
|
|
+ throw new JeecgBootException("找不到审查记录");
|
|
|
+ }
|
|
|
+ result.setDescription(detailInfo.getDescription());
|
|
|
+ result.setViolationLevel(detailInfo.getReminderLevel());
|
|
|
+ result.setMedicalInsRuleInfoCode(detailInfo.getMedicalInsRuleInfoCode());
|
|
|
+ // 构建违规项目/药品明细
|
|
|
+ ViolationsProjectMedicinesDetail v = new ViolationsProjectMedicinesDetail();
|
|
|
+ v.setMedicalProjectCode(detailInfo.getMedicalInsRuleInfoCode());
|
|
|
+ v.setMedicalProjectName(detailInfo.getMedicalInsRuleInfoName());
|
|
|
+ v.setMedicalInsuranceMark(detailInfo.getMedicalInsuranceMark());
|
|
|
+ v.setPrice(detailInfo.getPrice());
|
|
|
+ v.setMedicalNumber(detailInfo.getQuantity());
|
|
|
+ // 处理异常多收,少收
|
|
|
+// BigDecimal detailTotalAmt = midIncidentAuditService.statissticsErrAmtByMidAuditRecordId(detailId);
|
|
|
+
|
|
|
+ v.setErrorRelativelyFewAmt(new BigDecimal("0.00"));
|
|
|
+ v.setErrorRelativelyManyAmt(new BigDecimal("0.00"));
|
|
|
+ /*if (null != detailTotalAmt) {
|
|
|
+ if (detailTotalAmt.compareTo(BigDecimal.ZERO) > 0) { // 异常金额大于0,就是多收
|
|
|
+ v.setErrorRelativelyManyAmt(detailTotalAmt);
|
|
|
+ } else if (detailTotalAmt.compareTo(BigDecimal.ZERO) < 0) {
|
|
|
+ v.setErrorRelativelyFewAmt(detailTotalAmt);
|
|
|
+ }
|
|
|
+ }*/
|
|
|
+ List<ViolationsProjectMedicinesDetail> violationsProjectMedicinesDetails = new ArrayList<>();
|
|
|
+ violationsProjectMedicinesDetails.add(v);
|
|
|
+ result.setLists(violationsProjectMedicinesDetails);
|
|
|
+ PatientInformationResponse patientInformationResponse = afterwardsAuditDetailService.loadPatientInfoById(detailInfo.getAfterwardsAuditId().toString(), afterwardsAuditService);
|
|
|
+ // 构建患者信息
|
|
|
+// PatientInformationResponse patientInformationResponse =
|
|
|
+// midIncidentAuditDetailService.loadPatientInfoById(detailInfo.getMidIncidentAuditId().toString(), midIncidentAuditService);
|
|
|
+ result.setPatientInfo(patientInformationResponse);
|
|
|
+ // 构建医生信息
|
|
|
+ MidAuditDoctorInfo midAuditDoctorInfo = new MidAuditDoctorInfo();
|
|
|
+ midAuditDoctorInfo.setMedicalDeptCode(detailInfo.getMedicalDeptCode());
|
|
|
+ midAuditDoctorInfo.setMedicalDeptName(detailInfo.getMedicalDeptName());
|
|
|
+ midAuditDoctorInfo.setDoctorId(detailInfo.getDoctorId());
|
|
|
+ midAuditDoctorInfo.setDoctorName(detailInfo.getDoctorName());
|
|
|
+ midAuditDoctorInfo.setFeedbackResult("无");
|
|
|
+ result.setDoctorInfo(midAuditDoctorInfo);
|
|
|
+
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ // @Override
|
|
|
// public IPage<AfterwardsAuditDetail> allAuditPage(AuditMidDetailListRequest request, Integer pageNo, Integer pageSize, Map<String, String[]> parameterMap) {
|
|
|
// Page<AfterwardsAuditDetail> page = new Page<>(pageNo, pageSize);
|
|
|
// IPage<AfterwardsAuditDetail> resultPage = midIncidentAuditService.page(page, request);
|