Преглед на файлове

添加输血开单合理性的查询方法

MarkHuang преди 4 години
родител
ревизия
069df71a38

+ 3 - 0
src/main/java/com/diagbot/dto/TransfusionBillNeoDTO.java

@@ -50,4 +50,7 @@ public class TransfusionBillNeoDTO {
 
     // 禁用辅助检查描述
     private List<NodeNeoDTO> pacsDesc = new ArrayList<>();
+
+    // 禁用手术和操作
+    private List<NodeNeoDTO> operations = new ArrayList<>();
 }

+ 3 - 0
src/main/java/com/diagbot/entity/node/TransfusionRemind.java

@@ -27,6 +27,9 @@ public class TransfusionRemind extends BaseNode  {
 	@Property(name = "指标标签")
 	private String node_label;
 
+	@Property(name = "指标名称")
+	private String index_name;
+
 	@Property(name = "输注类型")
     private String transfusion_type;
 

+ 16 - 2
src/main/java/com/diagbot/facade/NeoFacade.java

@@ -81,6 +81,8 @@ public class NeoFacade {
     String standConvertRate;
     @Autowired
     SymptomNameRepository symptomNameRepository;
+    @Autowired
+    TransfusionRemindRepository transfusionRemindRepository;
 
     /**
      * 返回药品缓存信息
@@ -254,6 +256,7 @@ public class NeoFacade {
             billNeoDTOs.addAll(getLisBill(billNeoVO.getLisList()));
             billNeoDTOs.addAll(getOperationBill(billNeoVO.getOperationList()));
             billNeoDTOs.addAll(getCombiOpBill(billNeoVO.getCombiopList()));
+            billNeoDTOs.addAll(getTransfusionBill(billNeoVO.getTransfusionList()));
         }
         catch (Exception ex) {
             ex.printStackTrace();
@@ -449,10 +452,10 @@ public class NeoFacade {
     /**
      * 处理手术开单合理性
      */
-    public List<BillNeoDTO> getOperationBill(Map<String, String> listerm) {
+    public List<BillNeoDTO> getOperationBill(Map<String, String> opterm) {
 
         YiBaoOperationNameNode yiBaoOpNode = new YiBaoOperationNameNode();
-        List<BillNeoDTO> billNeoDTOs = yiBaoOpNode.getOperationBill(listerm, yiBaoOperationRepository);
+        List<BillNeoDTO> billNeoDTOs = yiBaoOpNode.getOperationBill(opterm, yiBaoOperationRepository);
 
         return billNeoDTOs;
     }
@@ -470,6 +473,17 @@ public class NeoFacade {
     }
 
 
+    /**
+     * 处理输血开单合理性
+     */
+    public List<BillNeoDTO> getTransfusionBill(Map<String, String> term) {
+        TransfusionRemindNode transfusionRemindNode = new TransfusionRemindNode();
+        List<BillNeoDTO> billNeoDTOS = transfusionRemindNode.getTransfusionBill(term, transfusionRemindRepository);
+
+        return billNeoDTOS;
+    }
+
+
     /**
      * 推送疾病信息
      *

+ 96 - 0
src/main/java/com/diagbot/repository/TransfusionRemindNode.java

@@ -0,0 +1,96 @@
+package com.diagbot.repository;
+
+import com.diagbot.dto.BillNeoDTO;
+import com.diagbot.dto.CombiOpBillNeoDTO;
+import com.diagbot.dto.NodeNeoDTO;
+import com.diagbot.dto.TransfusionBillNeoDTO;
+import com.diagbot.entity.node.*;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.NeoUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class TransfusionRemindNode {
+
+	public TransfusionBillNeoDTO TransfusionRemindtoTransfusionDTO(List<TransfusionRemind> transfusionReminds) {
+
+		TransfusionBillNeoDTO transfusionBillNeoDTO = new TransfusionBillNeoDTO();
+		NodeInfo nodeInfo;
+		NodeNeoDTO nodeNeoDTO;
+		String typelbl = "";
+
+		for (TransfusionRemind tr : transfusionReminds) {
+			nodeNeoDTO = new NodeNeoDTO();
+			nodeInfo = new NodeInfo();
+			nodeInfo.setName(tr.getIndex_name());
+
+			String label = tr.getNode_label();
+			switch (label) {
+				case "医保手术和操作名称":
+					typelbl = Constants.shoushu;
+					nodeInfo.setTypeval(typelbl);
+					nodeNeoDTO = NeoUtil.updateNodeInfo(nodeInfo);
+					transfusionBillNeoDTO.getOperations().add(nodeNeoDTO);
+					break;
+				case "医保疾病名称":
+					typelbl = Constants.zhenduan;
+					nodeInfo.setTypeval(typelbl);
+					nodeNeoDTO = NeoUtil.updateNodeInfo(nodeInfo);
+					transfusionBillNeoDTO.getDisease().add(nodeNeoDTO);
+					break;
+				case "实验室检查名称":
+					typelbl = Constants.huayan;
+					nodeInfo.setTypeval(typelbl);
+					nodeInfo.setMinval(NeoUtil.DoubletoBigDecimal(tr.getMinval()));
+					nodeInfo.setMaxval(NeoUtil.DoubletoBigDecimal(tr.getMaxval()));
+					nodeInfo.setUnit(tr.getUnit());
+					nodeNeoDTO = NeoUtil.updateNodeInfo(nodeInfo);
+					transfusionBillNeoDTO.getLis().add(nodeNeoDTO);
+					break;
+			}
+
+		}
+
+
+
+		return transfusionBillNeoDTO;
+	}
+
+
+	/**
+	 * 获取输血开单合理性
+	 */
+	public List<BillNeoDTO> getTransfusionBill(Map<String, String> transfusion, TransfusionRemindRepository transfusionRepository) {
+
+		List<BillNeoDTO> billNeoDTOs = new ArrayList<>();
+		BillNeoDTO billNeoDTO;
+
+		TransfusionBillNeoDTO transfusionBillNeoDTO;
+
+		List<TransfusionRemind> trlist;
+		String transfsname;
+
+		for (String term : transfusion.keySet()) {
+			billNeoDTO = new BillNeoDTO();
+			transfsname = transfusion.get(term);
+			billNeoDTO.setName(term);
+			billNeoDTO.setStandname(transfsname);
+
+			trlist = transfusionRepository.findByTransfusionName(transfsname);
+
+			if (ListUtil.isNotEmpty(trlist)) {
+				transfusionBillNeoDTO = TransfusionRemindtoTransfusionDTO(trlist);
+
+				billNeoDTO.setTransfusionBillNeoDTO(transfusionBillNeoDTO);
+
+				billNeoDTOs.add(billNeoDTO);
+			}
+		}
+
+		return billNeoDTOs;
+	}
+}
+

+ 3 - 0
src/main/java/com/diagbot/repository/TransfusionRemindRepository.java

@@ -17,5 +17,8 @@ public interface TransfusionRemindRepository extends Neo4jRepository<Transfusion
     @Query("MATCH (n:输血提醒指标) where n.输注类型 contains {name} return distinct(n.输注类型)")
     List<String> findTransfusionByName(@Param("name") String name);
 
+    @Query("MATCH (n:输血提醒指标) where n.输注类型 contains {name} return n")
+    List<TransfusionRemind> findByTransfusionName(@Param("name") String name);
+
 }