|
@@ -6,15 +6,24 @@ import com.diagbot.client.CRFServiceClient;
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
import com.diagbot.model.ai.AIAnalyze;
|
|
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.model.label.ChiefLabel;
|
|
|
|
+import com.diagbot.model.label.DiagLabel;
|
|
|
|
+import com.diagbot.model.label.PacsLabel;
|
|
|
|
+import com.diagbot.model.label.PastLabel;
|
|
|
|
+import com.diagbot.model.label.PresentLabel;
|
|
|
|
+import com.diagbot.model.label.VitalLabel;
|
|
import com.diagbot.util.CoreUtil;
|
|
import com.diagbot.util.CoreUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.vo.NeoPushVO;
|
|
import com.diagbot.vo.NeoPushVO;
|
|
import com.diagbot.vo.SearchData;
|
|
import com.diagbot.vo.SearchData;
|
|
import com.diagbot.vo.StandConvert;
|
|
import com.diagbot.vo.StandConvert;
|
|
-import com.diagbot.vo.neoPushEntity.*;
|
|
|
|
|
|
+import com.diagbot.vo.neoPushEntity.ChiefPushVo;
|
|
|
|
+import com.diagbot.vo.neoPushEntity.Diag;
|
|
|
|
+import com.diagbot.vo.neoPushEntity.DiagVo;
|
|
|
|
+import com.diagbot.vo.neoPushEntity.Drug;
|
|
|
|
+import com.diagbot.vo.neoPushEntity.LisPushVo;
|
|
|
|
+import com.diagbot.vo.neoPushEntity.PresentPushVo;
|
|
|
|
+import com.diagbot.vo.neoPushEntity.Symptom;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@@ -140,14 +149,20 @@ public class CommonFacade {
|
|
}
|
|
}
|
|
standConvert.setLisList(allLis);
|
|
standConvert.setLisList(allLis);
|
|
|
|
|
|
- //所有辅助检查(结构化数据)
|
|
|
|
|
|
+ //所有辅助项目(结构化数据)
|
|
List<String> allPacs = new ArrayList<>();
|
|
List<String> allPacs = new ArrayList<>();
|
|
- List<PacsNew> pacsNews = wordCrfDTO.getPacsLabel().getPacsNewList();
|
|
|
|
- if (ListUtil.isNotEmpty(pacsNews)) {
|
|
|
|
- List<String> pacss_unique = pacsNews.stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
|
|
|
|
|
|
+ List<Item> pacsList = wordCrfDTO.getPacsLabel().getItem();
|
|
|
|
+ if (ListUtil.isNotEmpty(pacsList)) {
|
|
|
|
+ List<String> pacss_unique = pacsList.stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
|
|
.map(x -> x.getName()).collect(Collectors.toList());
|
|
.map(x -> x.getName()).collect(Collectors.toList());
|
|
allPacs.addAll(pacss_unique);
|
|
allPacs.addAll(pacss_unique);
|
|
}
|
|
}
|
|
|
|
+ // List<PacsNew> pacsNews = wordCrfDTO.getPacsLabel().getPacsNewList();
|
|
|
|
+ // if (ListUtil.isNotEmpty(pacsNews)) {
|
|
|
|
+ // List<String> pacss_unique = pacsNews.stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
|
|
|
|
+ // .map(x -> x.getName()).collect(Collectors.toList());
|
|
|
|
+ // allPacs.addAll(pacss_unique);
|
|
|
|
+ // }
|
|
allPacs.addAll(wordCrfDTO.getPacs().stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
|
|
allPacs.addAll(wordCrfDTO.getPacs().stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
|
|
.map(x -> x.getName()).collect(Collectors.toList()));
|
|
.map(x -> x.getName()).collect(Collectors.toList()));
|
|
//开单检查
|
|
//开单检查
|
|
@@ -202,7 +217,7 @@ public class CommonFacade {
|
|
PastLabel pastLabel = wordCrfDTO.getPastLabel();
|
|
PastLabel pastLabel = wordCrfDTO.getPastLabel();
|
|
DiagLabel diagLabel = wordCrfDTO.getDiagLabel();
|
|
DiagLabel diagLabel = wordCrfDTO.getDiagLabel();
|
|
List<Lis> lis = wordCrfDTO.getLis();
|
|
List<Lis> lis = wordCrfDTO.getLis();
|
|
- List<PacsNew> pacsNews = wordCrfDTO.getPacsLabel().getPacsNewList();
|
|
|
|
|
|
+ List<Item> pacsList = wordCrfDTO.getPacsLabel().getItem();
|
|
VitalLabel vitalLabel = wordCrfDTO.getVitalLabel();
|
|
VitalLabel vitalLabel = wordCrfDTO.getVitalLabel();
|
|
|
|
|
|
//症状回填
|
|
//症状回填
|
|
@@ -223,7 +238,7 @@ public class CommonFacade {
|
|
CoreUtil.setPropertyList(lis, "name", "detailName", "uniqueName", map.get(StandConvertEnum.lis.getName()));
|
|
CoreUtil.setPropertyList(lis, "name", "detailName", "uniqueName", map.get(StandConvertEnum.lis.getName()));
|
|
CoreUtil.setPropertyList(wordCrfDTO.getLisOrder(), "name", "detailName", "uniqueName", map.get(StandConvertEnum.lis.getName()));
|
|
CoreUtil.setPropertyList(wordCrfDTO.getLisOrder(), "name", "detailName", "uniqueName", map.get(StandConvertEnum.lis.getName()));
|
|
//辅助检查回填
|
|
//辅助检查回填
|
|
- CoreUtil.setPropertyList(pacsNews, "name", "uniqueName", map.get(StandConvertEnum.pacs.getName()));
|
|
|
|
|
|
+ CoreUtil.setPropertyList(pacsList, "name", "uniqueName", map.get(StandConvertEnum.pacs.getName()));
|
|
CoreUtil.setPropertyList(wordCrfDTO.getPacs(), "name", "uniqueName", map.get(StandConvertEnum.pacs.getName()));
|
|
CoreUtil.setPropertyList(wordCrfDTO.getPacs(), "name", "uniqueName", map.get(StandConvertEnum.pacs.getName()));
|
|
CoreUtil.setPropertyList(wordCrfDTO.getPacsOrder(), "name", "uniqueName", map.get(StandConvertEnum.pacs.getName()));
|
|
CoreUtil.setPropertyList(wordCrfDTO.getPacsOrder(), "name", "uniqueName", map.get(StandConvertEnum.pacs.getName()));
|
|
//体征回填
|
|
//体征回填
|
|
@@ -249,7 +264,8 @@ public class CommonFacade {
|
|
PastLabel pastLabel = wordCrfDTO.getPastLabel();
|
|
PastLabel pastLabel = wordCrfDTO.getPastLabel();
|
|
List<Lis> lis = wordCrfDTO.getLis();
|
|
List<Lis> lis = wordCrfDTO.getLis();
|
|
// List<Pacs> pacs = wordCrfDTO.getPacs();
|
|
// List<Pacs> pacs = wordCrfDTO.getPacs();
|
|
- List<PacsNew> pacsNewList = wordCrfDTO.getPacsLabel().getPacsNewList();
|
|
|
|
|
|
+ // TODO 辅检
|
|
|
|
+ // List<PacsNew> pacsNewList = wordCrfDTO.getPacsLabel().getPacsNewList();
|
|
pushVO.setAge(wordCrfDTO.getAge());
|
|
pushVO.setAge(wordCrfDTO.getAge());
|
|
pushVO.setSex(wordCrfDTO.getSex());
|
|
pushVO.setSex(wordCrfDTO.getSex());
|
|
pushVO.setDiaeaseName(diseaseName);
|
|
pushVO.setDiaeaseName(diseaseName);
|
|
@@ -304,11 +320,12 @@ public class CommonFacade {
|
|
lisPushVo.setLises(lis);
|
|
lisPushVo.setLises(lis);
|
|
pushVO.setLisPushVo(lisPushVo);
|
|
pushVO.setLisPushVo(lisPushVo);
|
|
}
|
|
}
|
|
- if(ListUtil.isNotEmpty(pacsNewList)){
|
|
|
|
- PacsPushVo pacsPushVo = new PacsPushVo();
|
|
|
|
- pacsPushVo.setPacs(pacsNewList);
|
|
|
|
- pushVO.setPacsPushVo(pacsPushVo);
|
|
|
|
- }
|
|
|
|
|
|
+ // TODO
|
|
|
|
+ // if(ListUtil.isNotEmpty(pacsNewList)){
|
|
|
|
+ // PacsPushVo pacsPushVo = new PacsPushVo();
|
|
|
|
+ // pacsPushVo.setPacs(pacsNewList);
|
|
|
|
+ // pushVO.setPacsPushVo(pacsPushVo);
|
|
|
|
+ // }
|
|
if(ListUtil.isNotEmpty(diags)){
|
|
if(ListUtil.isNotEmpty(diags)){
|
|
DiagVo diagVo = new DiagVo();
|
|
DiagVo diagVo = new DiagVo();
|
|
List<Diag> diseases = diags.stream().map(x -> {
|
|
List<Diag> diseases = diags.stream().map(x -> {
|
|
@@ -362,63 +379,65 @@ public class CommonFacade {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- //处理辅检
|
|
|
|
- List<com.diagbot.biz.push.entity.Pacs> pacs = new ArrayList<>();
|
|
|
|
- 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);
|
|
|
|
- collect.forEach(x ->{
|
|
|
|
- com.diagbot.biz.push.entity.Pacs p = new com.diagbot.biz.push.entity.Pacs();
|
|
|
|
- p.setName(x.getName());
|
|
|
|
- p.setUniqueName(x.getUniqueName());
|
|
|
|
- pacs.add(p);
|
|
|
|
- });
|
|
|
|
- }else {
|
|
|
|
- PacsNew pan = new PacsNew();
|
|
|
|
- pan.setName(name);
|
|
|
|
- pan.setPacsResults(pacsResults);
|
|
|
|
- pan.setDisease(disease);
|
|
|
|
- packagePacs.add(pan);
|
|
|
|
- com.diagbot.biz.push.entity.Pacs p = new com.diagbot.biz.push.entity.Pacs();
|
|
|
|
- p.setName(name);
|
|
|
|
- pacs.add(p);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }else {
|
|
|
|
- packagePacs.addAll(pacsNewList);
|
|
|
|
- pacsNewList.forEach(x ->{
|
|
|
|
- com.diagbot.biz.push.entity.Pacs p = new com.diagbot.biz.push.entity.Pacs();
|
|
|
|
- p.setName(x.getName());
|
|
|
|
- pacs.add(p);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(ListUtil.isNotEmpty(pacs)){
|
|
|
|
- wordCrfDTO.getPacs().addAll(pacs);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
wordCrfDTO.getLis().addAll(lisList);
|
|
wordCrfDTO.getLis().addAll(lisList);
|
|
|
|
|
|
|
|
+ //处理辅检 TODO 辅检
|
|
|
|
+ // List<com.diagbot.biz.push.entity.Pacs> pacs = new ArrayList<>();
|
|
|
|
+ // 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);
|
|
|
|
+ // collect.forEach(x ->{
|
|
|
|
+ // com.diagbot.biz.push.entity.Pacs p = new com.diagbot.biz.push.entity.Pacs();
|
|
|
|
+ // p.setName(x.getName());
|
|
|
|
+ // p.setUniqueName(x.getUniqueName());
|
|
|
|
+ // pacs.add(p);
|
|
|
|
+ // });
|
|
|
|
+ // }else {
|
|
|
|
+ // PacsNew pan = new PacsNew();
|
|
|
|
+ // pan.setName(name);
|
|
|
|
+ // pan.setPacsResults(pacsResults);
|
|
|
|
+ // pan.setDisease(disease);
|
|
|
|
+ // packagePacs.add(pan);
|
|
|
|
+ // com.diagbot.biz.push.entity.Pacs p = new com.diagbot.biz.push.entity.Pacs();
|
|
|
|
+ // p.setName(name);
|
|
|
|
+ // pacs.add(p);
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // }else {
|
|
|
|
+ // packagePacs.addAll(pacsNewList);
|
|
|
|
+ // pacsNewList.forEach(x ->{
|
|
|
|
+ // com.diagbot.biz.push.entity.Pacs p = new com.diagbot.biz.push.entity.Pacs();
|
|
|
|
+ // p.setName(x.getName());
|
|
|
|
+ // pacs.add(p);
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // if(ListUtil.isNotEmpty(pacs)){
|
|
|
|
+ // wordCrfDTO.getPacs().addAll(pacs);
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+
|
|
PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
- pacsLabel.getPacsNewList().addAll(packagePacs);
|
|
|
|
|
|
+ // TODO 辅检
|
|
|
|
+ // pacsLabel.getPacsNewList().addAll(packagePacs);
|
|
}
|
|
}
|
|
|
|
|
|
private Lis getLis(String bigName, String detailName, String value, String unit, String uniqueName) {
|
|
private Lis getLis(String bigName, String detailName, String value, String unit, String uniqueName) {
|