|
|
@@ -6,8 +6,9 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import net.sf.json.JSONArray;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.constant.CommonConstant;
|
|
|
@@ -214,7 +215,7 @@ public class RuleEngine {
|
|
|
interfRuleAttrList = ruleAttrList.stream().collect(Collectors.groupingBy(RuleAttr::getInterfName));
|
|
|
initFactor();
|
|
|
initRuleDaysSet();
|
|
|
-
|
|
|
+ initMedicalProjectDesc();
|
|
|
}
|
|
|
|
|
|
@PostConstruct
|
|
|
@@ -355,6 +356,42 @@ public class RuleEngine {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void initMedicalProjectDesc(){
|
|
|
+ long count = medicalInsRuleProjectService.lambdaQuery().eq(MedicalInsRuleProject::getState,Constant.EFF_STATE).count();
|
|
|
+ if(count>0){
|
|
|
+ long pageSize = count/1000;
|
|
|
+ long modNum = count%1000;
|
|
|
+ if(modNum>0) {
|
|
|
+ pageSize = pageSize + 1;
|
|
|
+ }
|
|
|
+ Map<Integer,Map<String,String>> ruleAndDescMap = new HashMap<>();
|
|
|
+ for(long index=1;index<=pageSize;index++){
|
|
|
+ IPage page = new Page(index, 1000);
|
|
|
+ List<MedicalInsRuleProject> medicalInsRuleProjectList = medicalInsRuleProjectService.lambdaQuery().eq(MedicalInsRuleProject::getState, Constant.EFF_STATE).page(page).getRecords();
|
|
|
+ Map<String,String> descMap = null;
|
|
|
+ for(MedicalInsRuleProject medicalInsRuleProject : medicalInsRuleProjectList){
|
|
|
+ MedicalInsRuleInfo medicalInsRuleInfo = allMedicalMap.get(medicalInsRuleProject.getMedicalInsRuleInfoId());
|
|
|
+ if(null != medicalInsRuleInfo ) {
|
|
|
+ if(ruleAndDescMap.containsKey(medicalInsRuleProject.getMedicalInsRuleInfoId())) {
|
|
|
+ descMap = ruleAndDescMap.get(medicalInsRuleProject.getMedicalInsRuleInfoId());
|
|
|
+ descMap.put(medicalInsRuleProject.getId().toString() , medicalInsRuleProject.getViolationDesc());
|
|
|
+ }else{
|
|
|
+ descMap = new HashMap<>();
|
|
|
+ descMap.put(medicalInsRuleProject.getId().toString() , medicalInsRuleProject.getViolationDesc());
|
|
|
+ ruleAndDescMap.put(medicalInsRuleProject.getMedicalInsRuleInfoId(), descMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(Map.Entry<Integer, Map<String, String>> ruleEntry: ruleAndDescMap.entrySet()){
|
|
|
+ Integer ruleId = ruleEntry.getKey();
|
|
|
+ Map<String,String> ruleMap = ruleEntry.getValue();
|
|
|
+ redisTemplate.opsForHash().putAll(Constant.PROJECT_VOLIDATION_DESC_KEY + ruleId, ruleMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public void genItemCodeAndRuleIdMapTest(String medicalProjectCode, AfterwardsAuditDetail afterwardsAuditDetail, List<MedicalInsRuleInfo> medicalInsRuleInfoList, Map<Integer, MedicalInsRuleInfo> medicalMap, Map<String, Boolean> codeDataMap) {
|
|
|
try {
|
|
|
@@ -1134,6 +1171,7 @@ public class RuleEngine {
|
|
|
afterwardsAudit.setPatientGender(afterIncidentLog.getPatientGender());
|
|
|
afterwardsAudit.setPatientBirthday(afterIncidentLog.getPatientBirthday());
|
|
|
afterwardsAudit.setHisid(afterIncidentLog.getHisid());
|
|
|
+
|
|
|
// afterwardsAudit.setBedNumber(afterIncidentLog.);
|
|
|
afterwardsAuditService.save(afterwardsAudit);
|
|
|
if (StringUtils.isNotBlank(afterIncidentLog.getDiagnoses())) {
|