Browse Source

化验开单项阳性、阴性特殊处理

zhoutg 4 năm trước cách đây
mục cha
commit
0cc4d1f5c0

+ 3 - 0
src/main/java/com/diagbot/facade/IndicationFacade.java

@@ -7,6 +7,7 @@ import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.util.CoreUtil;
 import com.diagbot.util.ListUtil;
+import com.diagbot.util.ParamUtil;
 import com.diagbot.vo.IndicationPushVO;
 import com.diagbot.vo.StandConvert;
 import io.github.lvyahui8.spring.facade.DataFacade;
@@ -99,6 +100,8 @@ public class IndicationFacade {
         // 合并【数据来源】
         wordCrfDTO.setDiagSource(commonFacade.getDiseaseSource(wordCrfDTO));
         wordCrfDTO.setDrugSource(commonFacade.getDrugSource(wordCrfDTO));
+        // 化验结果特殊值处理
+        ParamUtil.dealLisIndication(wordCrfDTO.getLis());
 
         try {
             Map<String, Object> invokeParams = new HashMap<>();

+ 12 - 2
src/main/java/com/diagbot/util/CoreUtil.java

@@ -318,9 +318,19 @@ public class CoreUtil {
                 if (lis.getOtherValue().equals(ruleBaseDTO.getBaseEqValue())) {
                     // 套餐和明细名称一样,提示语只取其中一个
                     if (StringUtil.isNotBlank(lis.getName()) && lis.getName().equals(lis.getDetailName())) {
-                        map.put("msg", lis.getDetailName() + lis.getOtherValue());
+                        // 有医院原值就提示医院值
+                        if (StringUtil.isNotBlank(lis.getResult())) {
+                            map.put("msg", lis.getName() + lis.getDetailName() + lis.getResult());
+                        } else {
+                            map.put("msg", lis.getName() + lis.getDetailName() + lis.getOtherValue());
+                        }
                     } else {
-                        map.put("msg", lis.getName() + lis.getDetailName() + lis.getOtherValue());
+                        // 有医院原值就提示医院值
+                        if (StringUtil.isNotBlank(lis.getResult())) {
+                            map.put("msg", lis.getDetailName() + lis.getResult());
+                        } else {
+                            map.put("msg", lis.getDetailName() + lis.getOtherValue());
+                        }
                     }
                     flag = true;
                 }

+ 46 - 0
src/main/java/com/diagbot/util/ParamUtil.java

@@ -36,12 +36,18 @@ public class ParamUtil {
                     case "++":
                     case "+++":
                     case "++++":
+                    case "阳":
+                    case "阳(+)":
+                    case "阳(+)":
                         lis.setOtherValue("阳性");
                         break;
                     case "-":
                     case "--":
                     case "---":
                     case "----":
+                    case "阴":
+                    case "阴(-)":
+                    case "阴(-)":
                         lis.setOtherValue("阴性");
                         break;
                     default: // 其他类型
@@ -62,6 +68,46 @@ public class ParamUtil {
         }
     }
 
+    /**
+     * 化验结果设置
+     *
+     * @param list
+     */
+    public static void dealLisIndication(List<Lis> list) {
+        if (ListUtil.isEmpty(list)) {
+            return ;
+        }
+        for (Lis lis : list) {
+            String otherValue = lis.getOtherValue();
+            if (StringUtil.isNotBlank(otherValue)) {
+                switch (otherValue) {
+                    case "+":
+                    case "++":
+                    case "+++":
+                    case "++++":
+                    case "阳":
+                    case "阳(+)":
+                    case "阳(+)":
+                        lis.setResult(otherValue);
+                        lis.setOtherValue("阳性");
+                        break;
+                    case "-":
+                    case "--":
+                    case "---":
+                    case "----":
+                    case "阴":
+                    case "阴(-)":
+                    case "阴(-)":
+                        lis.setResult(otherValue);
+                        lis.setOtherValue("阴性");
+                        break;
+                    default: // 其他类型
+                        break;
+                }
+            }
+        }
+    }
+
     public static void main(String[] args) {
         List<Lis> lisList = new ArrayList<>();
         Lis lis1 = new Lis();