|
@@ -12,6 +12,7 @@ import com.diagbot.enums.RedisEnum;
|
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
+import com.diagbot.model.entity.PD;
|
|
|
import com.diagbot.repository.*;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.NeoUtil;
|
|
@@ -252,6 +253,11 @@ public class NeoFacade {
|
|
|
public List<NeoPushDTO> getPush(NeoPushVO pushVO) {
|
|
|
Double age = pushVO.getAgeNum();
|
|
|
Integer sex = pushVO.getSex();
|
|
|
+ List<PD> pds = pushVO.getChiefPushVo().getPds();
|
|
|
+ PD pd = null;
|
|
|
+ if(ListUtil.isNotEmpty(pds)){
|
|
|
+ pd = pds.get(0);
|
|
|
+ }
|
|
|
List<NeoPushDTO> neoPushDTOS = new ArrayList<>();
|
|
|
List<String> allDis = Lists.newArrayList();
|
|
|
//如果化验有特异性就直接推送疾病
|
|
@@ -261,7 +267,7 @@ public class NeoFacade {
|
|
|
lises = lisPushVo.getLises();
|
|
|
}
|
|
|
|
|
|
- if (pushDisBySpecialLis(age, sex, neoPushDTOS, lises)) return neoPushDTOS;
|
|
|
+ if (pushDisBySpecialLis(age, sex, pd, neoPushDTOS, lises)) return neoPushDTOS;
|
|
|
|
|
|
// 症状、体征推送出的疾病
|
|
|
pushDisBySymptomOrVital(pushVO, allDis);
|
|
@@ -269,7 +275,7 @@ public class NeoFacade {
|
|
|
pushDisByLis(allDis, lises);
|
|
|
//辅检推出的疾病
|
|
|
pushDisByPacs(pushVO, allDis);
|
|
|
- filterAndSort(neoPushDTOS, allDis, sex, age);
|
|
|
+ filterAndSort(neoPushDTOS, allDis, sex, age, pd);
|
|
|
|
|
|
return neoPushDTOS;
|
|
|
}
|
|
@@ -282,13 +288,13 @@ public class NeoFacade {
|
|
|
* @param lises
|
|
|
* @return
|
|
|
*/
|
|
|
- private boolean pushDisBySpecialLis(Double age, Integer sex, List<NeoPushDTO> neoPushDTOS, List<Lis> lises) {
|
|
|
+ private boolean pushDisBySpecialLis(Double age, Integer sex, PD pd, List<NeoPushDTO> neoPushDTOS, List<Lis> lises) {
|
|
|
if (ListUtil.isNotEmpty(lises)) {
|
|
|
List<String> lis_dis = lises.parallelStream()
|
|
|
.map(x -> nodeRepository.getDisByLis_Special(x.getName(), x.getUniqueName() + x.getResult()))
|
|
|
.flatMap(List::stream).collect(Collectors.toList());
|
|
|
if (ListUtil.isNotEmpty(lis_dis)) {
|
|
|
- filterAndSort(neoPushDTOS, lis_dis, sex, age);
|
|
|
+ filterAndSort(neoPushDTOS, lis_dis, sex, age,pd);
|
|
|
if (ListUtil.isNotEmpty(neoPushDTOS)) {
|
|
|
return true;
|
|
|
}
|
|
@@ -355,7 +361,7 @@ public class NeoFacade {
|
|
|
allDis.addAll(allDis_bySymptom);
|
|
|
}
|
|
|
|
|
|
- private void filterAndSort(List<NeoPushDTO> neoPushDTOS, List<String> allDis, int gender_code, double age) {
|
|
|
+ private void filterAndSort(List<NeoPushDTO> neoPushDTOS, List<String> allDis, int gender_code, double age, PD pd) {
|
|
|
//推送出的所有疾病进行性别和年龄的过滤
|
|
|
List<Map<String, String>> diseases = null;
|
|
|
Map<String, Double> dis_fbl = new HashMap<>();
|