|
@@ -6,6 +6,7 @@ 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.Pacs;
|
|
|
import com.diagbot.model.entity.PacsNew;
|
|
|
import com.diagbot.model.label.*;
|
|
|
import com.diagbot.util.CoreUtil;
|
|
@@ -34,6 +35,8 @@ public class CommonFacade {
|
|
|
CRFServiceClient crfServiceClient;
|
|
|
@Autowired
|
|
|
LisConfigFacade lisConfigFacade;
|
|
|
+ @Autowired
|
|
|
+ PacsConfigFacade pacsConfigFacade;
|
|
|
|
|
|
//组装好的label
|
|
|
public WordCrfDTO crf_process(SearchData searchData) {
|
|
@@ -68,9 +71,8 @@ public class CommonFacade {
|
|
|
wordCrfDTO.setDiag(searchData.getDiag());
|
|
|
}
|
|
|
aiAnalyze.aiProcess(searchData, wordCrfDTO);
|
|
|
- List<Lis> lisList = processPresentLisPacs(wordCrfDTO);
|
|
|
- wordCrfDTO.getLis().addAll(lisList);
|
|
|
- wordCrfDTO.setLis(wordCrfDTO.getLis());
|
|
|
+
|
|
|
+ processPresentLisPacs(wordCrfDTO);
|
|
|
return wordCrfDTO;
|
|
|
}
|
|
|
|
|
@@ -274,7 +276,7 @@ public class CommonFacade {
|
|
|
return pushVO;
|
|
|
}
|
|
|
|
|
|
- public List<Lis> processPresentLisPacs(WordCrfDTO wordCrfDTO){
|
|
|
+ public void processPresentLisPacs(WordCrfDTO wordCrfDTO){
|
|
|
PresentLabel presentLabel = wordCrfDTO.getPresentLabel();
|
|
|
List<com.diagbot.model.entity.Lis> lises = presentLabel.getLises();
|
|
|
List<Lis> lisList = new ArrayList<>();
|
|
@@ -325,7 +327,40 @@ public class CommonFacade {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- return lisList;
|
|
|
+ //处理辅检
|
|
|
+ List<PacsNew> packagePacs = new ArrayList<>();
|
|
|
+ List<PacsNew> pacsNewList = wordCrfDTO.getPresentLabel().getPacsNewList();
|
|
|
+ if(ListUtil.isNotEmpty(pacsNewList)){
|
|
|
+ List<String> pacsNames = pacsNewList.stream().map(x -> x.getName()).collect(Collectors.toList());
|
|
|
+ Map<String, Map<String, Long>> configMap = pacsConfigFacade.getConfigMap(wordCrfDTO.getHospitalId(), pacsNames, null);
|
|
|
+ if(configMap.size() > 0){
|
|
|
+ pacsNewList.stream().forEach(pacsNew ->{
|
|
|
+ String name = pacsNew.getName();
|
|
|
+ List<Pacs> disease = pacsNew.getDisease();
|
|
|
+ List<Pacs> pacsResults = pacsNew.getPacsResults();
|
|
|
+ if(configMap.containsKey(name)){
|
|
|
+ Map<String, Long> uinqueNameMap = configMap.get(name);
|
|
|
+ List<PacsNew> collect = uinqueNameMap.keySet().stream().map(x -> {
|
|
|
+ PacsNew pan = new PacsNew();
|
|
|
+ pan.setName(name);
|
|
|
+ pan.setUniqueName(x);
|
|
|
+ pan.setPacsResults(pacsResults);
|
|
|
+ pan.setDisease(disease);
|
|
|
+ return pan;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ packagePacs.addAll(collect);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ packagePacs.addAll(pacsNewList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ wordCrfDTO.getLis().addAll(lisList);
|
|
|
+ wordCrfDTO.setLis(wordCrfDTO.getLis());
|
|
|
+
|
|
|
+ PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
|
+ pacsLabel.getPacsNewList().addAll(packagePacs);
|
|
|
+ wordCrfDTO.setPacsLabel(pacsLabel);
|
|
|
}
|
|
|
}
|
|
|
|