|
@@ -1,22 +1,28 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.diagbot.biz.push.entity.Lis;
|
|
|
+import com.diagbot.biz.push.entity.Pacs;
|
|
|
import com.diagbot.client.CRFServiceClient;
|
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
|
import com.diagbot.model.ai.AIAnalyze;
|
|
|
+import com.diagbot.model.entity.Medicine;
|
|
|
import com.diagbot.model.label.ChiefLabel;
|
|
|
import com.diagbot.model.label.DiagLabel;
|
|
|
import com.diagbot.model.label.PastLabel;
|
|
|
import com.diagbot.model.label.PresentLabel;
|
|
|
import com.diagbot.util.CoreUtil;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.vo.SearchData;
|
|
|
import com.diagbot.vo.StandConvert;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @Description: 通过业务facade
|
|
@@ -64,6 +70,28 @@ public class CommonFacade {
|
|
|
diagList.addAll(CoreUtil.getPropertyList(diagLabel.getDiags()));
|
|
|
diagList.addAll(CoreUtil.getPropertyList(pastLabel.getDiags()));
|
|
|
|
|
|
+ //所有化验(结构化数据)
|
|
|
+ List<Lis> lis = wordCrfDTO.getLis();
|
|
|
+ if(ListUtil.isNotEmpty(lis)){
|
|
|
+ List<String> lis_unique = lis.stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
|
|
|
+ .map(x ->x.getName()+x.getDetailName()).collect(Collectors.toList());
|
|
|
+ standConvert.setLisList(lis_unique);
|
|
|
+ }
|
|
|
+
|
|
|
+ //所有辅助检查(结构化数据)
|
|
|
+ List<Pacs> pacs = wordCrfDTO.getPacs();
|
|
|
+ if(ListUtil.isNotEmpty(pacs)){
|
|
|
+ List<String> pacss_unique = pacs.stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
|
|
|
+ .map(x ->x.getName()).collect(Collectors.toList());
|
|
|
+ standConvert.setLisList(pacss_unique);
|
|
|
+ }
|
|
|
+
|
|
|
+ //所有药品
|
|
|
+ List<String> drugList = new ArrayList<>();
|
|
|
+ //1、现病史中的药品
|
|
|
+ drugList.addAll(CoreUtil.getPropertyList(presentLabel.getMedicines()));
|
|
|
+ standConvert.setDrugList(drugList);
|
|
|
+
|
|
|
standConvert.setClinicalList(clinicalList);
|
|
|
standConvert.setDiaglList(diagList);
|
|
|
return standConvert;
|
|
@@ -72,7 +100,22 @@ public class CommonFacade {
|
|
|
//把图谱返回的标准词set到label中
|
|
|
public void dataTypeSet(WordCrfDTO wordCrfDTO, Map<Integer, Map<String, String>> map){
|
|
|
ChiefLabel chiefLabel = wordCrfDTO.getChiefLabel();
|
|
|
+ PresentLabel presentLabel = wordCrfDTO.getPresentLabel();
|
|
|
+ DiagLabel diagLabel = wordCrfDTO.getDiagLabel();
|
|
|
+ List<Lis> lis = wordCrfDTO.getLis();
|
|
|
+ List<Pacs> pacs = wordCrfDTO.getPacs();
|
|
|
+
|
|
|
+ //症状回填
|
|
|
CoreUtil.setPropertyList(chiefLabel.getClinicals(),map.get(StandConvertEnum.clinical.getKey()));
|
|
|
+ CoreUtil.setPropertyList(presentLabel.getClinicals(),map.get(StandConvertEnum.clinical.getKey()));
|
|
|
+ //诊断回填
|
|
|
+ CoreUtil.setPropertyList(diagLabel.getDiags(),map.get(StandConvertEnum.disease.getKey()));
|
|
|
+ //药品回填
|
|
|
+ CoreUtil.setPropertyList(presentLabel.getClinicals(),map.get(StandConvertEnum.drug.getKey()));
|
|
|
+ // TODO: 2020/8/5 化验回填
|
|
|
+// CoreUtil.setPropertyList(lis,map.get(StandConvertEnum.lis.getKey()));
|
|
|
+ // TODO: 2020/8/5 辅助检查回填
|
|
|
+// CoreUtil.setPropertyList(pacs,map.get(StandConvertEnum.pacs.getKey()));
|
|
|
}
|
|
|
|
|
|
}
|