|
@@ -13,9 +13,25 @@ import com.diagbot.entity.node.PacsName;
|
|
import com.diagbot.entity.node.YiBaoDiseaseName;
|
|
import com.diagbot.entity.node.YiBaoDiseaseName;
|
|
import com.diagbot.entity.node.YiBaoOperationName;
|
|
import com.diagbot.entity.node.YiBaoOperationName;
|
|
import com.diagbot.enums.StaticTypeEnum;
|
|
import com.diagbot.enums.StaticTypeEnum;
|
|
-import com.diagbot.repository.*;
|
|
|
|
|
|
+import com.diagbot.repository.BaseNodeRepository;
|
|
|
|
+import com.diagbot.repository.DeptNode;
|
|
|
|
+import com.diagbot.repository.DeptRepository;
|
|
|
|
+import com.diagbot.repository.LisNameNode;
|
|
|
|
+import com.diagbot.repository.LisNameRepository;
|
|
|
|
+import com.diagbot.repository.LisSetNode;
|
|
|
|
+import com.diagbot.repository.LisSetRepository;
|
|
|
|
+import com.diagbot.repository.MedicineNode;
|
|
|
|
+import com.diagbot.repository.MedicineRepository;
|
|
|
|
+import com.diagbot.repository.PacsNameNode;
|
|
|
|
+import com.diagbot.repository.PacsNameRepository;
|
|
|
|
+import com.diagbot.repository.TransfusionRemindRepository;
|
|
|
|
+import com.diagbot.repository.YiBaoDiseaseNode;
|
|
|
|
+import com.diagbot.repository.YiBaoDiseaseRepository;
|
|
|
|
+import com.diagbot.repository.YiBaoOperationNameNode;
|
|
|
|
+import com.diagbot.repository.YiBaoOperationNameRepository;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
|
|
+import com.diagbot.util.StringUtil;
|
|
import com.diagbot.vo.RetrievalVO;
|
|
import com.diagbot.vo.RetrievalVO;
|
|
import com.diagbot.vo.StaticKnowledgeIndexVO;
|
|
import com.diagbot.vo.StaticKnowledgeIndexVO;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
@@ -68,7 +84,9 @@ public class RetrievalFacade {
|
|
*/
|
|
*/
|
|
public RetrievalDTO index(RetrievalVO retrievalVO) {
|
|
public RetrievalDTO index(RetrievalVO retrievalVO) {
|
|
RetrievalDTO retrievalDTO = new RetrievalDTO();
|
|
RetrievalDTO retrievalDTO = new RetrievalDTO();
|
|
- retrievalVO.setInputStr(retrievalVO.getInputStr().trim().toUpperCase());
|
|
|
|
|
|
+ if (StringUtil.isWord(retrievalVO.getInputStr())) {
|
|
|
|
+ retrievalVO.setInputStr(retrievalVO.getInputStr().trim().toUpperCase());
|
|
|
|
+ }
|
|
switch (retrievalVO.getType()) {
|
|
switch (retrievalVO.getType()) {
|
|
case 1:
|
|
case 1:
|
|
retrievalDTO.setLisNames(getLisPacks(retrievalVO.getInputStr()));
|
|
retrievalDTO.setLisNames(getLisPacks(retrievalVO.getInputStr()));
|
|
@@ -202,11 +220,14 @@ public class RetrievalFacade {
|
|
*/
|
|
*/
|
|
public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
- String inputStr = staticKnowledgeIndexVO.getInputStr().trim().toUpperCase();
|
|
|
|
|
|
+ String inputStr = staticKnowledgeIndexVO.getInputStr();
|
|
|
|
+ if (StringUtil.isWord(staticKnowledgeIndexVO.getInputStr())) {
|
|
|
|
+ inputStr = staticKnowledgeIndexVO.getInputStr().trim().toUpperCase();
|
|
|
|
+ }
|
|
List<Integer> types = staticKnowledgeIndexVO.getTypes();
|
|
List<Integer> types = staticKnowledgeIndexVO.getTypes();
|
|
|
|
|
|
//TODO 诊断
|
|
//TODO 诊断
|
|
- List<YiBaoDiseaseName> icdDiseaseList = icdDiseaseRepository.findByNameContaining(inputStr);
|
|
|
|
|
|
+ List<YiBaoDiseaseName> icdDiseaseList = icdDiseaseRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
List<StaticKnowledgeIndexDTO> disRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> disRetList = Lists.newLinkedList();
|
|
for (YiBaoDiseaseName icdDisease : icdDiseaseList) {
|
|
for (YiBaoDiseaseName icdDisease : icdDiseaseList) {
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
@@ -216,7 +237,7 @@ public class RetrievalFacade {
|
|
disRetList.add(staticDTO);
|
|
disRetList.add(staticDTO);
|
|
}
|
|
}
|
|
//TODO 药品
|
|
//TODO 药品
|
|
- List<Medicine> medicineList = medicineRepository.findByNameContaining(inputStr);
|
|
|
|
|
|
+ List<Medicine> medicineList = medicineRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> drugRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> drugRetList = Lists.newLinkedList();
|
|
for (Medicine medicine : medicineList) {
|
|
for (Medicine medicine : medicineList) {
|
|
@@ -227,7 +248,7 @@ public class RetrievalFacade {
|
|
drugRetList.add(staticDTO);
|
|
drugRetList.add(staticDTO);
|
|
}
|
|
}
|
|
//TODO 检验套餐
|
|
//TODO 检验套餐
|
|
- List<LisSet> lisSetList = lisSetRepository.findByNameContaining(inputStr);
|
|
|
|
|
|
+ List<LisSet> lisSetList = lisSetRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> lisSetRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> lisSetRetList = Lists.newLinkedList();
|
|
for (LisSet lisSet : lisSetList) {
|
|
for (LisSet lisSet : lisSetList) {
|
|
@@ -238,7 +259,7 @@ public class RetrievalFacade {
|
|
lisSetRetList.add(staticDTO);
|
|
lisSetRetList.add(staticDTO);
|
|
}
|
|
}
|
|
//TODO 检验明细关联出检验套餐
|
|
//TODO 检验明细关联出检验套餐
|
|
- List<LisName> lisList = lisRepository.findByNameContaining(inputStr);
|
|
|
|
|
|
+ List<LisName> lisList = lisRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> lisSetRelatecLisRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> lisSetRelatecLisRetList = Lists.newLinkedList();
|
|
for (LisName lis : lisList) {
|
|
for (LisName lis : lisList) {
|
|
@@ -266,7 +287,7 @@ public class RetrievalFacade {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//TODO 检验明细
|
|
//TODO 检验明细
|
|
- lisList = lisRepository.findByNameContaining(inputStr);
|
|
|
|
|
|
+ lisList = lisRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> lisRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> lisRetList = Lists.newLinkedList();
|
|
for (LisName lis : lisList) {
|
|
for (LisName lis : lisList) {
|
|
@@ -277,7 +298,7 @@ public class RetrievalFacade {
|
|
lisRetList.add(staticDTO);
|
|
lisRetList.add(staticDTO);
|
|
}
|
|
}
|
|
//TODO 检查
|
|
//TODO 检查
|
|
- List<PacsName> pacsList = pacsRepository.findByNameContaining(inputStr);
|
|
|
|
|
|
+ List<PacsName> pacsList = pacsRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> pacsRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> pacsRetList = Lists.newLinkedList();
|
|
for (PacsName pacs : pacsList) {
|
|
for (PacsName pacs : pacsList) {
|
|
@@ -290,7 +311,7 @@ public class RetrievalFacade {
|
|
|
|
|
|
|
|
|
|
//TODO 手术和操作
|
|
//TODO 手术和操作
|
|
- List<YiBaoOperationName> operationList = operationRepository.findByNameContaining(inputStr);
|
|
|
|
|
|
+ List<YiBaoOperationName> operationList = operationRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> operationRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> operationRetList = Lists.newLinkedList();
|
|
|
|
|