|
@@ -14,6 +14,7 @@ import com.diagbot.enums.MedicalAdviceEnum;
|
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
|
import com.diagbot.facade.CommonFacade;
|
|
|
import com.diagbot.facade.NeoFacade;
|
|
|
+import com.diagbot.facade.TranLisConfigIcssFacade;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.vo.IcssVo;
|
|
|
import com.diagbot.vo.NeoPushVO;
|
|
@@ -22,6 +23,7 @@ import com.diagbot.vo.neoPushEntity.Diag;
|
|
|
import com.diagbot.vo.neoPushEntity.DiagVo;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
+import org.apache.commons.collections.MapUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -43,9 +45,13 @@ public class PushProcess {
|
|
|
@Autowired
|
|
|
CommonFacade commonFacade;
|
|
|
@Autowired
|
|
|
+ TranLisConfigIcssFacade tranLisConfigIcssFacade;
|
|
|
+ @Autowired
|
|
|
IcssPushServiceClient icssPushServiceClient;
|
|
|
|
|
|
+
|
|
|
public PushDTO processIcss(PushVO pushVo){
|
|
|
+
|
|
|
List<Item> diag1 = pushVo.getDiag();
|
|
|
int length = pushVo.getLength();
|
|
|
Map<String, List<String>> typeWords = Maps.newHashMap();
|
|
@@ -53,10 +59,20 @@ public class PushProcess {
|
|
|
List<String> pushDiags = Lists.newArrayList();
|
|
|
PushDTO pushDTO = new PushDTO();
|
|
|
IcssVo icssVo = pushVo2IcssVo(pushVo);
|
|
|
+// String s = JSONObject.toJSONString(icssVo);
|
|
|
Response<ResponseData> annotation = icssPushServiceClient.getAnnotation(icssVo);
|
|
|
if(annotation != null){
|
|
|
ResponseData data = annotation.getData();
|
|
|
if(data != null){
|
|
|
+ Map<String, Map<String, String>> inputs = data.getInputs();
|
|
|
+ if(MapUtils.isNotEmpty(inputs)){
|
|
|
+ List<String> words = new ArrayList<>(inputs.keySet());
|
|
|
+ typeWords.put(StandConvertEnum.symptom.toString(),words);
|
|
|
+ typeWords.put(StandConvertEnum.disease.toString(),words);
|
|
|
+ typeWords.put(StandConvertEnum.pacs.toString(),words);
|
|
|
+ typeWords.put(StandConvertEnum.lis.toString(),words);
|
|
|
+ typeWords.put(StandConvertEnum.vital.toString(),words);
|
|
|
+ }
|
|
|
List<FeatureRate> dis = data.getDis();
|
|
|
if(ListUtil.isNotEmpty(dis)){
|
|
|
pushDiags = dis.stream().filter(x -> x.getDesc() == null || x.getDesc().contains("确诊") || x.getDesc().contains("拟诊"))
|
|
@@ -102,7 +118,7 @@ public class PushProcess {
|
|
|
*/
|
|
|
public IcssVo pushVo2IcssVo(PushVO pushVo){
|
|
|
IcssVo icssVo = new IcssVo();
|
|
|
- icssVo.setAge(Integer.parseInt(pushVo.getAge()));
|
|
|
+ icssVo.setAge(new Double(pushVo.getAgeNum()).intValue());
|
|
|
String sexs = "";
|
|
|
Integer sex = pushVo.getSex();
|
|
|
if(sex == 1){
|
|
@@ -116,26 +132,30 @@ public class PushProcess {
|
|
|
icssVo.setVital(pushVo.getVital());
|
|
|
icssVo.setPasts(pushVo.getPasts());
|
|
|
icssVo.setPersonal(pushVo.getPersonal());
|
|
|
- icssVo.setFeatureType(pushVo.getFeatureType());
|
|
|
+ icssVo.setFeatureType(pushVo.getFeatureType()+",7");
|
|
|
|
|
|
List<Lis> lis = pushVo.getLis();
|
|
|
+ lis = tranLisConfigIcssFacade.addLisUniqueName(lis, "A001");
|
|
|
List<PreResult> lis_icss = lis.stream().map(x ->{
|
|
|
PreResult instantiate = BeanUtils.instantiate(PreResult.class);
|
|
|
BeanUtils.copyProperties(x,instantiate);
|
|
|
- instantiate.setValue(x.getValue().toString());
|
|
|
- instantiate.setMaxValue(x.getMaxValue().toString());
|
|
|
- instantiate.setMinValue(x.getMinValue().toString());
|
|
|
+ instantiate.setValue(x.getValue()==null?"":x.getValue().toString());
|
|
|
+ instantiate.setMaxValue(x.getMaxValue()==null?"":x.getMaxValue().toString());
|
|
|
+ instantiate.setMinValue(x.getMinValue()==null?"":x.getMinValue().toString());
|
|
|
return instantiate;
|
|
|
}).collect(Collectors.toList());
|
|
|
icssVo.setLis(lis_icss);
|
|
|
|
|
|
List<Pacs> pacs = pushVo.getPacs();
|
|
|
- List<PreResult> pacs_icss = pacs.stream().map(x ->{
|
|
|
- PreResult instantiate = new PreResult();
|
|
|
- BeanUtils.copyProperties(x,instantiate);
|
|
|
- return instantiate;
|
|
|
- }).collect(Collectors.toList());
|
|
|
- icssVo.setPacs(pacs_icss);
|
|
|
+ if(ListUtil.isNotEmpty(pacs)){
|
|
|
+ List<PreResult> pacs_icss = pacs.stream().map(x ->{
|
|
|
+ PreResult instantiate = new PreResult();
|
|
|
+ BeanUtils.copyProperties(x,instantiate);
|
|
|
+ return instantiate;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ icssVo.setPacs(pacs_icss);
|
|
|
+ }
|
|
|
+
|
|
|
if(ListUtil.isNotEmpty(pushVo.getDiag())){
|
|
|
List<PreResult> diagOrder = pushVo.getDiag().stream().map(x ->{
|
|
|
String name = x.getName();
|