|
@@ -176,6 +176,18 @@ public class NeoFacade {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void vitalCache() {
|
|
|
+ List<String> diseaseProperty = nodeRepository.getVitalClass();
|
|
|
+ if (ListUtil.isNotEmpty(diseaseProperty)) {
|
|
|
+ Map map = diseaseProperty.stream().collect(Collectors.toMap(
|
|
|
+ k -> RedisEnum.vitalType.getName() + k,
|
|
|
+ v -> v,
|
|
|
+ (v1, v2) -> (v2)
|
|
|
+ ));
|
|
|
+ redisTemplate.opsForValue().multiSet(map);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public void symptomNumCache() {
|
|
|
List<SymptomNumOfDiS> diseaseProperty = nodeRepository.getSymptomNum();
|
|
|
if (ListUtil.isNotEmpty(diseaseProperty)) {
|
|
@@ -286,6 +298,7 @@ public class NeoFacade {
|
|
|
*/
|
|
|
public List<String> getPush(NeoPushVO pushVO) {
|
|
|
List<String> pushDis = Lists.newArrayList();
|
|
|
+ List<String> pushSpeDis = Lists.newArrayList();
|
|
|
//年龄
|
|
|
Double age = pushVO.getAgeNum();
|
|
|
//性别
|
|
@@ -310,20 +323,32 @@ public class NeoFacade {
|
|
|
List<String> pushDisByPacs = pushDisByPacs(pushVO);
|
|
|
|
|
|
List<String> allDis = Lists.newArrayList();
|
|
|
- /*try {
|
|
|
+ try {
|
|
|
Map<String, Object> invokeParams = new HashMap<>();
|
|
|
- invokeParams.put("allDis", allDis);
|
|
|
invokeParams.put("pushVo", pushVO);
|
|
|
- invokeParams.put("lis", lises);
|
|
|
allDis = DataFacade.get("pushAll", invokeParams, List.class);
|
|
|
} catch (Exception e) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "并行推送疾病出错" + e.getMessage());
|
|
|
- }*/
|
|
|
+ }
|
|
|
|
|
|
filterAndSort(pushDis, allDis, sex, age, pd,depts);
|
|
|
- pushDis = addDiagFromPresent(pushDis, presentDiags);
|
|
|
-
|
|
|
- return pushDis;
|
|
|
+ //特异值推送的诊断添加到症状推送诊断的头部
|
|
|
+ pushDisByPacs.removeAll(pushDisByLis);
|
|
|
+ pushDisByLis.addAll(pushDisByPacs);
|
|
|
+ filterAndSort(pushSpeDis,pushDisByLis, sex, age, pd,depts);
|
|
|
+ pushDis.removeAll(pushSpeDis);
|
|
|
+ pushSpeDis.addAll(pushDis);
|
|
|
+
|
|
|
+ //初步诊断、现病史拟诊、主诉诊断添加头部
|
|
|
+ chiefDiags.removeAll(presentDiags);
|
|
|
+ presentDiags.addAll(chiefDiags);
|
|
|
+ presentDiags.removeAll(disByDiag);
|
|
|
+ disByDiag.addAll(presentDiags);
|
|
|
+
|
|
|
+ pushSpeDis.removeAll(disByDiag);
|
|
|
+ disByDiag.addAll(pushSpeDis);
|
|
|
+
|
|
|
+ return disByDiag;
|
|
|
}
|
|
|
|
|
|
private List<String> getDiseaseByChief(NeoPushVO pushVO) {
|
|
@@ -519,15 +544,41 @@ public class NeoFacade {
|
|
|
allDis.addAll(allDis_bySymptom);
|
|
|
}
|
|
|
|
|
|
- public List<String> getDisBySymptom_vital_other(NeoPushVO pushVO){
|
|
|
+ public List<String> getDisBySymptom_other(NeoPushVO pushVO){
|
|
|
+ List<String> disBySymptoms_1 = Lists.newArrayList();
|
|
|
List<String> symptoms = getSymptoms(pushVO);
|
|
|
if(ListUtil.isNotEmpty(symptoms) && symptoms.size() > 2){
|
|
|
symptoms = symptoms.size() >= 5?symptoms.subList(1,5):symptoms;
|
|
|
List<String> sv = redisUtil.getSv(symptoms,RedisEnum.symptomVitalType.getName());
|
|
|
- List<String> disBySymptoms_1 = symptomRepository.getDisBySymptoms_1(sv);
|
|
|
+ disBySymptoms_1 = symptomRepository.getDisBySymptoms_1(sv);
|
|
|
+ }
|
|
|
+ return disBySymptoms_1;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<String> getDisByVital(NeoPushVO pushVO){
|
|
|
+ List<String> disByVital = Lists.newArrayList();
|
|
|
+ List<String> symptoms = getSymptoms(pushVO);
|
|
|
+ if(ListUtil.isNotEmpty(symptoms)){
|
|
|
+ List<String> sv = redisUtil.getSv(symptoms,RedisEnum.vitalType.getName());
|
|
|
+ disByVital = symptomRepository.getDisByVital(sv);
|
|
|
}
|
|
|
+ return disByVital;
|
|
|
+ }
|
|
|
|
|
|
+ public List<String> getDisByLis_other(NeoPushVO pushVO){
|
|
|
+ List<Lis> lises = null;
|
|
|
+ LisPushVo lisPushVo = pushVO.getLisPushVo();
|
|
|
+ if (lisPushVo != null) {
|
|
|
+ lises = lisPushVo.getLises();
|
|
|
+ }
|
|
|
+ List<String> neoPushDTOS = new ArrayList<>();
|
|
|
+ if (ListUtil.isNotEmpty(lises)) {
|
|
|
+ neoPushDTOS = lises.parallelStream()
|
|
|
+ .map(x -> nodeRepository.getDisByLis_Other(x.getName(), x.getUniqueName() + x.getResult()))
|
|
|
+ .flatMap(List::stream).collect(Collectors.toList());
|
|
|
|
|
|
+ }
|
|
|
+ return neoPushDTOS;
|
|
|
}
|
|
|
|
|
|
public void filterAndSort(List<String> dises, List<String> allDis, int gender_code, double age, PD pd, List<String> depts) {
|