kwzbigdata 4 anni fa
parent
commit
77e827a022

+ 20 - 3
src/main/java/com/diagbot/facade/CommonFacade.java

@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
 import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 通过业务facade
@@ -32,16 +33,32 @@ public class CommonFacade {
         return wordBillCrfDTO;
     }
 
-    public void dataTypeConvert(WordBillCrfDTO wordBillCrfDTO){
+    public StandConvert dataTypeGet(WordBillCrfDTO wordBillCrfDTO){
         StandConvert standConvert = new StandConvert();
         List<String> clinicalList = new ArrayList<>();
 
         ChiefLabel chiefLabel = wordBillCrfDTO.getChiefLabel();
-        List<String> propertyList = CoreUtil.getPropertyList(chiefLabel.getClinicals());
-        clinicalList.addAll(propertyList);
+        clinicalList.addAll(CoreUtil.getPropertyList(chiefLabel.getClinicals()));
 
         standConvert.setClinicalList(clinicalList);
+        return standConvert;
+    }
+
+    public StandConvert dataTypeSet(WordBillCrfDTO wordBillCrfDTO, Map<String, Map<String, String>> map){
+        StandConvert standConvert = new StandConvert();
+        List<String> clinicalList = new ArrayList<>();
 
+        Map<String, String> clinicMap = map.get("clinicalList");
+        ChiefLabel chiefLabel = wordBillCrfDTO.getChiefLabel();
+        List<Clinical> clinicals = chiefLabel.getClinicals();
+        for (Clinical c : clinicals) {
+            if (clinicMap != null && clinicMap.get(c.getName()) != null) {
+                c.setStandName(clinicMap.get(c.getName()));
+            }
+        }
+
+        standConvert.setClinicalList(clinicalList);
+        return standConvert;
     }
 
 }

+ 13 - 0
src/main/java/com/diagbot/facade/NeoFacade.java

@@ -2,6 +2,7 @@ package com.diagbot.facade;
 
 import com.diagbot.dto.BillNeoDTO;
 import com.diagbot.vo.BillNeoVO;
+import com.diagbot.vo.StandConvert;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Component;
 
@@ -39,4 +40,16 @@ public class NeoFacade {
         res.put("ddd", new ArrayList<>());
         return res;
     }
+
+    /**
+     * 标准词转换
+     *
+     * @param standConvert
+     * @return
+     */
+    public Map<String, Map<String, String>> standConvert(StandConvert standConvert) {
+        // TODO 待处理业务
+        return null;
+    }
+
 }