|
@@ -133,6 +133,7 @@ public class RuleEngine {
|
|
|
IMedicalInsuranceDrugsService medicalInsuranceDrugsService;
|
|
|
@Autowired
|
|
|
IDiagnoseItemsService diagnoseItemsService;
|
|
|
+
|
|
|
@Value("${cache.auto:false}")
|
|
|
private Boolean cacheAutoInit;
|
|
|
|
|
@@ -643,9 +644,14 @@ public class RuleEngine {
|
|
|
Set<String> auditDetailSet = new HashSet<>();
|
|
|
Set<Integer> medicalInsRuleInfoIdList = itemCodeAndRuleIdMap.get(itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY));
|
|
|
if (CollectionUtil.isEmpty(medicalInsRuleInfoIdList)) {
|
|
|
- log.error("项目编码未匹配到对应的医保规则:{}", itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY));
|
|
|
-
|
|
|
- return;
|
|
|
+ log.error("项目编码未匹配到对应的医保规则:{} 再次从数据库检索", itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY));
|
|
|
+ List<MedicalInsRuleProject> medicalInsRuleProjectList = medicalInsRuleProjectService.getRuleProjectByMedicalProjectCode(itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY).toString());
|
|
|
+ if(CollectionUtil.isEmpty(medicalInsRuleProjectList)){
|
|
|
+ log.error("项目编码未匹配到对应的医保规则:{} 在规则库数据库中未检索到数据,退出规则执行", itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ medicalInsRuleInfoIdList = medicalInsRuleProjectList.stream().map(MedicalInsRuleProject::getMedicalInsRuleInfoId).collect(Collectors.toSet());
|
|
|
+ log.info("数据库检索到匹配规则ID列表:{}", medicalInsRuleInfoIdList);
|
|
|
}
|
|
|
Object diagnose = itemMap.get(Constant.MEDICAL_DIAGNOSE_CODE_KEY);
|
|
|
if (null != diagnose) {
|
|
@@ -758,7 +764,7 @@ public class RuleEngine {
|
|
|
advanceWarningAudit.setMedicalDeptName(advanceWarningVO.getMedical_dept_name());
|
|
|
advanceWarningAudit.setPatientId(advanceWarningVO.getPatient_id());
|
|
|
advanceWarningAudit.setPatientName(advanceWarningVO.getPatient_name());
|
|
|
- advanceWarningAudit.setNoticeType("事前提醒");
|
|
|
+ advanceWarningAudit.setNoticeType("before");
|
|
|
advanceWarningAudit.setTreatmentType(advanceWarningVO.getVisit_type());
|
|
|
|
|
|
advanceWarningAuditService.save(advanceWarningAudit);
|
|
@@ -779,7 +785,7 @@ public class RuleEngine {
|
|
|
midIncidentAudit.setPatientName(midIncidentWarningVO.getPatient_name());
|
|
|
midIncidentAudit.setTreatmentType(midIncidentWarningVO.getVisit_type());
|
|
|
midIncidentAudit.setPrescriptionNumber(midIncidentWarningVO.getDoctor_advice_no());
|
|
|
- midIncidentAudit.setNoticeType("事中预警");
|
|
|
+ midIncidentAudit.setNoticeType("middle");
|
|
|
midIncidentAudit.setAmount((double) 0);
|
|
|
midIncidentAudit.setDoctorLevel(midIncidentWarningVO.getDoctor_level());
|
|
|
midIncidentAudit.setPatientAge(midIncidentWarningVO.getPatient_age().toString());
|