|
@@ -3,6 +3,9 @@ package com.diagbot.facade;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.diagbot.client.ChiefPresentSimilarityServiceClient;
|
|
|
import com.diagbot.client.StandConvertServiceClient;
|
|
|
+import com.diagbot.dto.*;
|
|
|
+import com.diagbot.biz.push.entity.Lis;
|
|
|
+import com.diagbot.entity.node.*;
|
|
|
import com.diagbot.dto.BillNeoDTO;
|
|
|
import com.diagbot.dto.CriticalNeoDTO;
|
|
|
import com.diagbot.dto.HighRiskNeoDTO;
|
|
@@ -46,6 +49,7 @@ import com.diagbot.vo.StandConvertCrfVO;
|
|
|
import com.diagbot.vo.neoPushEntity.ChiefPushVo;
|
|
|
import com.diagbot.vo.neoPushEntity.Diag;
|
|
|
import com.diagbot.vo.neoPushEntity.PresentPushVo;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -80,6 +84,8 @@ public class NeoFacade {
|
|
|
@Autowired
|
|
|
LisSetRepository lisSetRepository;
|
|
|
@Autowired
|
|
|
+ LisRemindRepository lisRemindRepository;
|
|
|
+ @Autowired
|
|
|
YiBaoDiseaseRepository yiBaodiseaseRepository;
|
|
|
@Autowired
|
|
|
YiBaoOperationNameRepository yiBaoOperationRepository;
|
|
@@ -283,6 +289,91 @@ public class NeoFacade {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 处理其它提醒
|
|
|
+ */
|
|
|
+ public List<OtherTipNeoDTO> getOtherRemind(List<Lis> lislist) {
|
|
|
+
|
|
|
+ Map<String, List<LisRemind>> lrmap = new HashMap<>();
|
|
|
+ List<OtherTipNeoDTO> otherTipNeoDTOS = new ArrayList<>();
|
|
|
+
|
|
|
+ try {
|
|
|
+ List<LisRemind> lisReminds = lisRemindRepository.findByNameContaining("");
|
|
|
+
|
|
|
+ String lisname, result, unit;
|
|
|
+ Double val;
|
|
|
+
|
|
|
+ for (LisRemind lisRemind : lisReminds) {
|
|
|
+ lisname = lisRemind.getLisname();
|
|
|
+ if (null == lrmap.get(lisname)) {
|
|
|
+ lrmap.put(lisname, new ArrayList<>());
|
|
|
+ }
|
|
|
+ lrmap.get(lisname).add(lisRemind);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (Lis lis : lislist) {
|
|
|
+ lisname = lis.getUniqueName();
|
|
|
+ if (null != lrmap.get(lisname)) {
|
|
|
+ List<LisRemind> lrlist = lrmap.get(lisname);
|
|
|
+ OtherTipNeoDTO otherTipNeoDTO = new OtherTipNeoDTO();
|
|
|
+ BeanUtils.copyProperties(lis, otherTipNeoDTO);
|
|
|
+
|
|
|
+ result = lis.getOtherValue();
|
|
|
+ if (StringUtil.isBlank(result)) {
|
|
|
+ val = lis.getValue();
|
|
|
+ unit = lis.getUnits();
|
|
|
+ for (LisRemind lisRemind : lrlist) {
|
|
|
+ if (lisRemind.getRange() == 0 && /*lisRemind.getUnit().equals(unit) &&*/
|
|
|
+ (val <= lisRemind.getMaxval() && val >= lisRemind.getMinval())) {
|
|
|
+ otherTipNeoDTO.setFactor(getReminds(lisRemind));
|
|
|
+ otherTipNeoDTOS.add(otherTipNeoDTO);
|
|
|
+ } else if (lisRemind.getRange() == 1 && /*lisRemind.getUnit().equals(unit) &&*/
|
|
|
+ (val > lisRemind.getMaxval() || val < lisRemind.getMinval())) {
|
|
|
+ otherTipNeoDTO.setFactor(getReminds(lisRemind));
|
|
|
+ otherTipNeoDTOS.add(otherTipNeoDTO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (LisRemind lisRemind : lrlist) {
|
|
|
+ if (result.equals(lisRemind.getResult())) {
|
|
|
+ otherTipNeoDTO.setFactor(getReminds(lisRemind));
|
|
|
+ otherTipNeoDTOS.add(otherTipNeoDTO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex) {
|
|
|
+ ex.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return otherTipNeoDTOS;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public List<NodeNeoDTO> getReminds(LisRemind lisRemind) {
|
|
|
+ List<NodeNeoDTO> nodeNeoDTOS = new ArrayList<>();
|
|
|
+ NodeNeoDTO nodeNeoDTO;
|
|
|
+
|
|
|
+ for (YiBaoDiseaseName disease : lisRemind.getDisease()) {
|
|
|
+ nodeNeoDTO = new NodeNeoDTO();
|
|
|
+ nodeNeoDTO.setName(disease.getName());
|
|
|
+ nodeNeoDTO.setTermtype(Constants.zhenduan);
|
|
|
+ nodeNeoDTOS.add(nodeNeoDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (Medicine medicine : lisRemind.getMedicines()) {
|
|
|
+ nodeNeoDTO = new NodeNeoDTO();
|
|
|
+ nodeNeoDTO.setName(medicine.getName());
|
|
|
+ nodeNeoDTO.setTermtype(Constants.yaoping);
|
|
|
+ nodeNeoDTOS.add(nodeNeoDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ return nodeNeoDTOS;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 处理处方开单合理性
|
|
|
*/
|