|
@@ -3,10 +3,7 @@ package com.diagbot.facade;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.diagbot.client.ChiefPresentSimilarityServiceClient;
|
|
|
import com.diagbot.client.StandConvertServiceClient;
|
|
|
-import com.diagbot.dto.BillNeoDTO;
|
|
|
-import com.diagbot.dto.PushDTO;
|
|
|
-import com.diagbot.dto.StandConvertCrfBatchDTO;
|
|
|
-import com.diagbot.dto.StandConvertCrfDTO;
|
|
|
+import com.diagbot.dto.*;
|
|
|
import com.diagbot.entity.node.Disease;
|
|
|
import com.diagbot.entity.node.Medicine_Code;
|
|
|
import com.diagbot.entity.node.OralMedicine;
|
|
@@ -14,24 +11,11 @@ import com.diagbot.enums.StandConvertEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.model.ai.ModelAI;
|
|
|
-import com.diagbot.repository.DiseaseNode;
|
|
|
-import com.diagbot.repository.DiseaseRepository;
|
|
|
-import com.diagbot.repository.LisNode;
|
|
|
-import com.diagbot.repository.LisPackNode;
|
|
|
-import com.diagbot.repository.LisPackRepository;
|
|
|
-import com.diagbot.repository.LisRepository;
|
|
|
-import com.diagbot.repository.MedicineCodeRepository;
|
|
|
-import com.diagbot.repository.MedicineNode;
|
|
|
-import com.diagbot.repository.MedicineRepository;
|
|
|
-import com.diagbot.repository.PACSNode;
|
|
|
-import com.diagbot.repository.PacsRepository;
|
|
|
+import com.diagbot.repository.*;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.RedisUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
-import com.diagbot.vo.BillNeoVO;
|
|
|
-import com.diagbot.vo.PushNeoVO;
|
|
|
-import com.diagbot.vo.StandConvert;
|
|
|
-import com.diagbot.vo.StandConvertCrfVO;
|
|
|
+import com.diagbot.vo.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -63,6 +47,8 @@ public class NeoFacade {
|
|
|
@Autowired
|
|
|
DiseaseRepository diseaseRepository;
|
|
|
@Autowired
|
|
|
+ OperationRepository operationRepository;
|
|
|
+ @Autowired
|
|
|
MedicineCodeRepository medicineCodeRepository;
|
|
|
@Autowired
|
|
|
ChiefPresentSimilarityServiceClient chiefPresentSimilarityServiceClient;
|
|
@@ -144,7 +130,7 @@ public class NeoFacade {
|
|
|
List<BillNeoDTO> billNeoDTOs = new ArrayList<>();
|
|
|
|
|
|
billNeoDTOs.addAll(getDrugBill(billNeoVO.getDrugList()));
|
|
|
- // billNeoDTOs.addAll(getPacsBill(billNeoVO.getPacsList()));
|
|
|
+ billNeoDTOs.addAll(getPacsBill(billNeoVO.getPacsList()));
|
|
|
billNeoDTOs.addAll(getLisDetailBill(billNeoVO.getLisDetailList()));
|
|
|
billNeoDTOs.addAll(getLisBill(billNeoVO.getLisList()));
|
|
|
|
|
@@ -153,6 +139,21 @@ public class NeoFacade {
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 处理高危项目图谱数据
|
|
|
+ * @param highRiskNeoVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<HighRiskNeoDTO> getHighRiskNeo(HighRiskNeoVO highRiskNeoVO) {
|
|
|
+ List<HighRiskNeoDTO> highRiskNeoDTOS = new ArrayList<>();
|
|
|
+
|
|
|
+ highRiskNeoDTOS.addAll(getHighRiskDrugList(highRiskNeoVO.getDrugList()));
|
|
|
+ highRiskNeoDTOS.addAll(getHighRiskOperationList(highRiskNeoVO.getOperationList()));
|
|
|
+ return highRiskNeoDTOS;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 处理处方开单合理性
|
|
|
*/
|
|
@@ -226,6 +227,32 @@ public class NeoFacade {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 处理高危药品数据
|
|
|
+ * @param drugs
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<HighRiskNeoDTO> getHighRiskDrugList(Map<String, String> drugs) {
|
|
|
+ MedicineNode medicineNode = new MedicineNode();
|
|
|
+ List<HighRiskNeoDTO> highRiskNeoDTOS = medicineNode.getHighRiskDrug(drugs, medicineRepository);
|
|
|
+
|
|
|
+ return highRiskNeoDTOS;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理高危手术和操作数据
|
|
|
+ * @param operations
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<HighRiskNeoDTO> getHighRiskOperationList(Map<String, String> operations) {
|
|
|
+ OperationNode operationNode = new OperationNode();
|
|
|
+ List<HighRiskNeoDTO> highRiskNeoDTOS = operationNode.getHighRiskOperation(operations, operationRepository);
|
|
|
+
|
|
|
+ return highRiskNeoDTOS;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 标准词转换
|
|
|
*
|