|
@@ -13,7 +13,22 @@ import com.diagbot.entity.node.PacsName;
|
|
|
import com.diagbot.entity.node.YiBaoDiseaseName;
|
|
|
import com.diagbot.entity.node.YiBaoOperationName;
|
|
|
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.ListUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
@@ -69,7 +84,7 @@ public class RetrievalFacade {
|
|
|
*/
|
|
|
public RetrievalDTO index(RetrievalVO retrievalVO) {
|
|
|
RetrievalDTO retrievalDTO = new RetrievalDTO();
|
|
|
- if (StringUtil.isWord(retrievalVO.getInputStr())){
|
|
|
+ if (StringUtil.isWord(retrievalVO.getInputStr())) {
|
|
|
retrievalVO.setInputStr(retrievalVO.getInputStr().trim().toUpperCase());
|
|
|
}
|
|
|
switch (retrievalVO.getType()) {
|
|
@@ -206,13 +221,13 @@ public class RetrievalFacade {
|
|
|
public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
|
List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
|
String inputStr = staticKnowledgeIndexVO.getInputStr();
|
|
|
- if (StringUtil.isWord(staticKnowledgeIndexVO.getInputStr())){
|
|
|
+ if (StringUtil.isWord(staticKnowledgeIndexVO.getInputStr())) {
|
|
|
inputStr = staticKnowledgeIndexVO.getInputStr().trim().toUpperCase();
|
|
|
}
|
|
|
List<Integer> types = staticKnowledgeIndexVO.getTypes();
|
|
|
|
|
|
//TODO 诊断
|
|
|
- List<YiBaoDiseaseName> icdDiseaseList = icdDiseaseRepository.findByNameContaining(inputStr);
|
|
|
+ List<YiBaoDiseaseName> icdDiseaseList = icdDiseaseRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
List<StaticKnowledgeIndexDTO> disRetList = Lists.newLinkedList();
|
|
|
for (YiBaoDiseaseName icdDisease : icdDiseaseList) {
|
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
@@ -222,7 +237,7 @@ public class RetrievalFacade {
|
|
|
disRetList.add(staticDTO);
|
|
|
}
|
|
|
//TODO 药品
|
|
|
- List<Medicine> medicineList = medicineRepository.findByNameContaining(inputStr);
|
|
|
+ List<Medicine> medicineList = medicineRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> drugRetList = Lists.newLinkedList();
|
|
|
for (Medicine medicine : medicineList) {
|
|
@@ -233,7 +248,7 @@ public class RetrievalFacade {
|
|
|
drugRetList.add(staticDTO);
|
|
|
}
|
|
|
//TODO 检验套餐
|
|
|
- List<LisSet> lisSetList = lisSetRepository.findByNameContaining(inputStr);
|
|
|
+ List<LisSet> lisSetList = lisSetRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> lisSetRetList = Lists.newLinkedList();
|
|
|
for (LisSet lisSet : lisSetList) {
|
|
@@ -244,7 +259,7 @@ public class RetrievalFacade {
|
|
|
lisSetRetList.add(staticDTO);
|
|
|
}
|
|
|
//TODO 检验明细关联出检验套餐
|
|
|
- List<LisName> lisList = lisRepository.findByNameContaining(inputStr);
|
|
|
+ List<LisName> lisList = lisRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> lisSetRelatecLisRetList = Lists.newLinkedList();
|
|
|
for (LisName lis : lisList) {
|
|
@@ -272,7 +287,7 @@ public class RetrievalFacade {
|
|
|
}
|
|
|
}
|
|
|
//TODO 检验明细
|
|
|
- lisList = lisRepository.findByNameContaining(inputStr);
|
|
|
+ lisList = lisRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> lisRetList = Lists.newLinkedList();
|
|
|
for (LisName lis : lisList) {
|
|
@@ -283,7 +298,7 @@ public class RetrievalFacade {
|
|
|
lisRetList.add(staticDTO);
|
|
|
}
|
|
|
//TODO 检查
|
|
|
- List<PacsName> pacsList = pacsRepository.findByNameContaining(inputStr);
|
|
|
+ List<PacsName> pacsList = pacsRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> pacsRetList = Lists.newLinkedList();
|
|
|
for (PacsName pacs : pacsList) {
|
|
@@ -296,7 +311,7 @@ public class RetrievalFacade {
|
|
|
|
|
|
|
|
|
//TODO 手术和操作
|
|
|
- List<YiBaoOperationName> operationList = operationRepository.findByNameContaining(inputStr);
|
|
|
+ List<YiBaoOperationName> operationList = operationRepository.findByNameContainingOrPycodeContaining(inputStr, inputStr);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> operationRetList = Lists.newLinkedList();
|
|
|
|