Browse Source

有序替换参数以及添加字段录入

0027005599 1 year ago
parent
commit
15975538cf

+ 9 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/SystemEventAttrConstant.java

@@ -207,6 +207,15 @@ public class SystemEventAttrConstant {
      */
     public static final String TEMP_DISCHARGE_STATUS = "temp_discharge_status_list";
 
+    /**
+     * his接口年龄属性
+     */
+    public static final String PATIENT_AGE_KEY = "patient_age";
+
 
+    /**
+     * his接口性别属性
+     */
+    public static final String PATIENT_GENDER_KEY = "patient_age";
 }
 

+ 6 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/AfterwardsAuditDetail.java

@@ -170,6 +170,12 @@ public class AfterwardsAuditDetail implements Serializable {
     private String projectUseTime;
     @ApiModelProperty(value = "用药天数")
     private Integer useDay;
+
+    private String patientGender;
+
+    private String patientAge;
+
+    private Double patientAgeDays;
     @TableField(exist = false)
     private String startTime;
     @TableField(exist = false)

+ 11 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/FactorEnchangeFactory.java

@@ -288,7 +288,9 @@ public class FactorEnchangeFactory {
                     String projectUseTimeStr = DateUtil.formatDateTime((Date) projectUseTime);
                     afterwardsAuditDetail.setProjectUseTime(projectUseTimeStr);
                 }
-
+                afterwardsAuditDetail.setUseDay((Integer) itemMap.getOrDefault(SystemEventAttrConstant.USE_DAY, 1));
+                afterwardsAuditDetail.setPatientAge(itemMap.getOrDefault(SystemEventAttrConstant.PATIENT_AGE_KEY, "1").toString());
+                afterwardsAuditDetail.setPatientGender(itemMap.getOrDefault(SystemEventAttrConstant.PATIENT_GENDER_KEY,"3").toString());
                 afterwardsAuditDetail.setCreateBy("auto");
                 afterwardsAuditDetail.setQuantity(otherMap.get(SystemEventAttrConstant.QUANTITY) != null ? Integer.parseInt(otherMap.get(SystemEventAttrConstant.QUANTITY).toString()) : 1);
                 afterwardsAuditDetail.setMedicalInsuranceMark(otherMap.get(Constant.MEDICAL_INSURANCE_MARK_KEY) != null ? otherMap.get(Constant.MEDICAL_INSURANCE_MARK_KEY).toString() : "0");
@@ -327,7 +329,14 @@ public class FactorEnchangeFactory {
             afterwardsAuditDetail.setPrescriptionNumber(afterwardsAudit.getPrescriptionNumber());
 //            afterwardsAuditDetail.setReminderLevel();
             afterwardsAuditDetail.setCreateBy("auto");
-
+            Object projectUseTime = itemMap.get(SystemEventAttrConstant.PROJECT_USE_TIME);
+            if (null != projectUseTime) {
+                String projectUseTimeStr = DateUtil.formatDateTime((Date) projectUseTime);
+                afterwardsAuditDetail.setProjectUseTime(projectUseTimeStr);
+            }
+            afterwardsAuditDetail.setPatientAge(itemMap.getOrDefault(SystemEventAttrConstant.PATIENT_AGE_KEY, "1").toString());
+            afterwardsAuditDetail.setPatientGender(itemMap.getOrDefault(SystemEventAttrConstant.PATIENT_GENDER_KEY,"3").toString());
+            afterwardsAuditDetail.setUseDay((Integer) itemMap.getOrDefault(SystemEventAttrConstant.USE_DAY, 1));
             afterwardsAuditDetail.setQuantity(itemMap.get(SystemEventAttrConstant.QUANTITY) != null ? Integer.parseInt(itemMap.get(SystemEventAttrConstant.QUANTITY).toString()) : 1);
             afterwardsAuditDetail.setViolationLevel(medicalInsRuleInfo.getViolationLevel());
             afterwardsAuditDetail.setTreatmentType(medicalInsRuleInfo.getTreatmentType());

+ 30 - 12
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/SPELUtil.java

@@ -23,6 +23,7 @@ import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.Date;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -420,18 +421,18 @@ public class SPELUtil {
 //        Date now = new Date();
 //        System.out.println(getProjectUseDay(now));
 
-        String s = "234sdfsafasdf423";
-        System.out.println(isMemberObjectAndObject(s, "safasd"));
-
-        Long day = 1607475808000l;
-        System.out.println(getProjectUseDay(day));
-
-        ExpressionParser ep = new SpelExpressionParser();
-        // 创建上下文变量
-        EvaluationContext ctx = new StandardEvaluationContext();
-        ctx.setVariable("alarmTime", "2018-09-26 13:00:00");
-        ctx.setVariable("location", "二楼201机房");
-        System.out.println(ep.parseExpression("告警发生时间 #{#alarmTime},位置是在#{#location}", new TemplateParserContext()).getValue(ctx));
+//        String s = "234sdfsafasdf423";
+//        System.out.println(isMemberObjectAndObject(s, "safasd"));
+//
+//        Long day = 1607475808000l;
+//        System.out.println(getProjectUseDay(day));
+//
+//        ExpressionParser ep = new SpelExpressionParser();
+//        // 创建上下文变量
+//        EvaluationContext ctx = new StandardEvaluationContext();
+//        ctx.setVariable("alarmTime", "2018-09-26 13:00:00");
+//        ctx.setVariable("location", "二楼201机房");
+//        System.out.println(ep.parseExpression("告警发生时间 #{#alarmTime},位置是在#{#location}", new TemplateParserContext()).getValue(ctx));
 //        String test ="A0123123";
 //        System.out.println(isNumeric(test));
 //        String[] rolesArr = new String []{"correlationMedicalDiagnoseCode","111"};
@@ -441,5 +442,22 @@ public class SPELUtil {
 //        String srcStr = "sfdsalfjasldfjsadlfjsald;fj1123";
 //        String key = "fdsalf";
 //        System.out.println(startWithKey(srcStr, key));
+
+
+        Set<String> sortSet = new TreeSet<String>(new Comparator<String>() {
+            @Override
+            public int compare(String o1, String o2) {
+                int lleng = o1.length();
+                int rleng = o2.length();
+                return rleng-lleng;//降序排列
+            }
+        });
+        Set<String> condStrParamName = new HashSet<>();
+        condStrParamName.add("sdfsdf");
+        condStrParamName.add("123333333");
+        condStrParamName.add("1");
+        condStrParamName.add("2343");
+        sortSet.addAll(condStrParamName);
+        System.out.println(sortSet);
     }
 }