|
@@ -3,10 +3,19 @@ package com.diagbot.facade;
|
|
|
import com.diagbot.client.CRFServiceClient;
|
|
|
import com.diagbot.dto.WordBillCrfDTO;
|
|
|
import com.diagbot.model.ai.AIAnalyze;
|
|
|
+import com.diagbot.model.entity.Clinical;
|
|
|
+import com.diagbot.model.label.ChiefLabel;
|
|
|
+import com.diagbot.util.CoreUtil;
|
|
|
import com.diagbot.vo.IndicationPushVO;
|
|
|
+import com.diagbot.vo.StandConvert;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.lang.reflect.Field;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* @Description: 通过业务facade
|
|
|
* @author: zhoutg
|
|
@@ -24,4 +33,32 @@ public class CommonFacade {
|
|
|
return wordBillCrfDTO;
|
|
|
}
|
|
|
|
|
|
+ public StandConvert dataTypeGet(WordBillCrfDTO wordBillCrfDTO){
|
|
|
+ StandConvert standConvert = new StandConvert();
|
|
|
+ List<String> clinicalList = new ArrayList<>();
|
|
|
+
|
|
|
+ ChiefLabel chiefLabel = wordBillCrfDTO.getChiefLabel();
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
}
|