|
@@ -133,6 +133,7 @@ public class RuleEngine {
|
|
IMedicalInsuranceDrugsService medicalInsuranceDrugsService;
|
|
IMedicalInsuranceDrugsService medicalInsuranceDrugsService;
|
|
@Autowired
|
|
@Autowired
|
|
IDiagnoseItemsService diagnoseItemsService;
|
|
IDiagnoseItemsService diagnoseItemsService;
|
|
|
|
+
|
|
@Value("${cache.auto:false}")
|
|
@Value("${cache.auto:false}")
|
|
private Boolean cacheAutoInit;
|
|
private Boolean cacheAutoInit;
|
|
|
|
|
|
@@ -643,9 +644,14 @@ public class RuleEngine {
|
|
Set<String> auditDetailSet = new HashSet<>();
|
|
Set<String> auditDetailSet = new HashSet<>();
|
|
Set<Integer> medicalInsRuleInfoIdList = itemCodeAndRuleIdMap.get(itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY));
|
|
Set<Integer> medicalInsRuleInfoIdList = itemCodeAndRuleIdMap.get(itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY));
|
|
if (CollectionUtil.isEmpty(medicalInsRuleInfoIdList)) {
|
|
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);
|
|
Object diagnose = itemMap.get(Constant.MEDICAL_DIAGNOSE_CODE_KEY);
|
|
if (null != diagnose) {
|
|
if (null != diagnose) {
|
|
@@ -758,7 +764,7 @@ public class RuleEngine {
|
|
advanceWarningAudit.setMedicalDeptName(advanceWarningVO.getMedical_dept_name());
|
|
advanceWarningAudit.setMedicalDeptName(advanceWarningVO.getMedical_dept_name());
|
|
advanceWarningAudit.setPatientId(advanceWarningVO.getPatient_id());
|
|
advanceWarningAudit.setPatientId(advanceWarningVO.getPatient_id());
|
|
advanceWarningAudit.setPatientName(advanceWarningVO.getPatient_name());
|
|
advanceWarningAudit.setPatientName(advanceWarningVO.getPatient_name());
|
|
- advanceWarningAudit.setNoticeType("事前提醒");
|
|
|
|
|
|
+ advanceWarningAudit.setNoticeType("before");
|
|
advanceWarningAudit.setTreatmentType(advanceWarningVO.getVisit_type());
|
|
advanceWarningAudit.setTreatmentType(advanceWarningVO.getVisit_type());
|
|
|
|
|
|
advanceWarningAuditService.save(advanceWarningAudit);
|
|
advanceWarningAuditService.save(advanceWarningAudit);
|
|
@@ -779,7 +785,7 @@ public class RuleEngine {
|
|
midIncidentAudit.setPatientName(midIncidentWarningVO.getPatient_name());
|
|
midIncidentAudit.setPatientName(midIncidentWarningVO.getPatient_name());
|
|
midIncidentAudit.setTreatmentType(midIncidentWarningVO.getVisit_type());
|
|
midIncidentAudit.setTreatmentType(midIncidentWarningVO.getVisit_type());
|
|
midIncidentAudit.setPrescriptionNumber(midIncidentWarningVO.getDoctor_advice_no());
|
|
midIncidentAudit.setPrescriptionNumber(midIncidentWarningVO.getDoctor_advice_no());
|
|
- midIncidentAudit.setNoticeType("事中预警");
|
|
|
|
|
|
+ midIncidentAudit.setNoticeType("middle");
|
|
midIncidentAudit.setAmount((double) 0);
|
|
midIncidentAudit.setAmount((double) 0);
|
|
midIncidentAudit.setDoctorLevel(midIncidentWarningVO.getDoctor_level());
|
|
midIncidentAudit.setDoctorLevel(midIncidentWarningVO.getDoctor_level());
|
|
midIncidentAudit.setPatientAge(midIncidentWarningVO.getPatient_age().toString());
|
|
midIncidentAudit.setPatientAge(midIncidentWarningVO.getPatient_age().toString());
|