|
@@ -5,27 +5,9 @@ import com.diagbot.dto.LisDetailDTO;
|
|
import com.diagbot.dto.OperationInfoDTO;
|
|
import com.diagbot.dto.OperationInfoDTO;
|
|
import com.diagbot.dto.RetrievalDTO;
|
|
import com.diagbot.dto.RetrievalDTO;
|
|
import com.diagbot.dto.StaticKnowledgeIndexDTO;
|
|
import com.diagbot.dto.StaticKnowledgeIndexDTO;
|
|
-import com.diagbot.entity.node.ICDDisease;
|
|
|
|
-import com.diagbot.entity.node.LIS;
|
|
|
|
-import com.diagbot.entity.node.LISPack;
|
|
|
|
-import com.diagbot.entity.node.Medicine;
|
|
|
|
-import com.diagbot.entity.node.Operation;
|
|
|
|
-import com.diagbot.entity.node.PACS;
|
|
|
|
|
|
+import com.diagbot.entity.node.*;
|
|
import com.diagbot.enums.StaticTypeEnum;
|
|
import com.diagbot.enums.StaticTypeEnum;
|
|
-import com.diagbot.repository.DeptNode;
|
|
|
|
-import com.diagbot.repository.DeptRepository;
|
|
|
|
-import com.diagbot.repository.ICDDiseaseNode;
|
|
|
|
-import com.diagbot.repository.ICDDiseaseRepository;
|
|
|
|
-import com.diagbot.repository.LisNode;
|
|
|
|
-import com.diagbot.repository.LisPackNode;
|
|
|
|
-import com.diagbot.repository.LisPackRepository;
|
|
|
|
-import com.diagbot.repository.LisRepository;
|
|
|
|
-import com.diagbot.repository.MedicineNode;
|
|
|
|
-import com.diagbot.repository.MedicineRepository;
|
|
|
|
-import com.diagbot.repository.OperationNode;
|
|
|
|
-import com.diagbot.repository.OperationRepository;
|
|
|
|
-import com.diagbot.repository.PACSNode;
|
|
|
|
-import com.diagbot.repository.PacsRepository;
|
|
|
|
|
|
+import com.diagbot.repository.*;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.vo.RetrievalVO;
|
|
import com.diagbot.vo.RetrievalVO;
|
|
import com.diagbot.vo.StaticKnowledgeIndexVO;
|
|
import com.diagbot.vo.StaticKnowledgeIndexVO;
|
|
@@ -44,25 +26,23 @@ import java.util.List;
|
|
public class RetrievalFacade {
|
|
public class RetrievalFacade {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- LisPackRepository lisPackRepository;
|
|
|
|
|
|
+ LisSetRepository lisSetRepository;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- LisRepository lisRepository;
|
|
|
|
|
|
+ LisNameRepository lisRepository;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- ICDDiseaseRepository icdDiseaseRepository;
|
|
|
|
|
|
+ YiBaoDiseaseRepository icdDiseaseRepository;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- PacsRepository pacsRepository;
|
|
|
|
|
|
+ PacsNameRepository pacsRepository;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
MedicineRepository medicineRepository;
|
|
MedicineRepository medicineRepository;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- OperationRepository operationRepository;
|
|
|
|
|
|
+ YiBaoOperationNameRepository operationRepository;
|
|
|
|
|
|
- @Autowired
|
|
|
|
- DeptRepository deptRepository;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 检索
|
|
* 检索
|
|
@@ -110,8 +90,8 @@ public class RetrievalFacade {
|
|
*/
|
|
*/
|
|
public List<String> getLisPacks(String name) {
|
|
public List<String> getLisPacks(String name) {
|
|
|
|
|
|
- LisPackNode lisPackNode = new LisPackNode();
|
|
|
|
- List<String> lisPacklist = lisPackNode.getLISPackNameList(name, lisPackRepository);
|
|
|
|
|
|
+ LisSetNode lisPackNode = new LisSetNode();
|
|
|
|
+ List<String> lisPacklist = lisPackNode.getLISPackNameList(name, lisSetRepository);
|
|
|
|
|
|
return lisPacklist;
|
|
return lisPacklist;
|
|
}
|
|
}
|
|
@@ -122,7 +102,7 @@ public class RetrievalFacade {
|
|
*/
|
|
*/
|
|
public List<LisDetailDTO> getLis(String name) {
|
|
public List<LisDetailDTO> getLis(String name) {
|
|
|
|
|
|
- LisNode lisNode = new LisNode();
|
|
|
|
|
|
+ LisNameNode lisNode = new LisNameNode();
|
|
List<LisDetailDTO> lislist = lisNode.getLisDetailList(name, lisRepository);
|
|
List<LisDetailDTO> lislist = lisNode.getLisDetailList(name, lisRepository);
|
|
|
|
|
|
return lislist;
|
|
return lislist;
|
|
@@ -134,7 +114,7 @@ public class RetrievalFacade {
|
|
*/
|
|
*/
|
|
public List<String> getPACSs(String name) {
|
|
public List<String> getPACSs(String name) {
|
|
|
|
|
|
- PACSNode pacsNode = new PACSNode();
|
|
|
|
|
|
+ PacsNameNode pacsNode = new PacsNameNode();
|
|
List<String> pacslist = pacsNode.getPACSNameList(name, pacsRepository);
|
|
List<String> pacslist = pacsNode.getPACSNameList(name, pacsRepository);
|
|
|
|
|
|
return pacslist;
|
|
return pacslist;
|
|
@@ -146,8 +126,8 @@ public class RetrievalFacade {
|
|
*/
|
|
*/
|
|
public List<String> getDiseases(String name) {
|
|
public List<String> getDiseases(String name) {
|
|
|
|
|
|
- ICDDiseaseNode diseaseNode = new ICDDiseaseNode();
|
|
|
|
- List<String> diseaselist = diseaseNode.getDiseaseNameList(name, icdDiseaseRepository);
|
|
|
|
|
|
+ YiBaoDiseaseNode yiBaoDiseaseNode = new YiBaoDiseaseNode();
|
|
|
|
+ List<String> diseaselist = yiBaoDiseaseNode.getDiseaseNameList(name, icdDiseaseRepository);
|
|
|
|
|
|
return diseaselist;
|
|
return diseaselist;
|
|
}
|
|
}
|
|
@@ -170,7 +150,7 @@ public class RetrievalFacade {
|
|
*/
|
|
*/
|
|
public List<OperationInfoDTO> getOperations(String name) {
|
|
public List<OperationInfoDTO> getOperations(String name) {
|
|
|
|
|
|
- OperationNode operationNode = new OperationNode();
|
|
|
|
|
|
+ YiBaoOperationNameNode operationNode = new YiBaoOperationNameNode();
|
|
List<OperationInfoDTO> opslist = operationNode.getOperationList(name, operationRepository);
|
|
List<OperationInfoDTO> opslist = operationNode.getOperationList(name, operationRepository);
|
|
|
|
|
|
return opslist;
|
|
return opslist;
|
|
@@ -179,7 +159,7 @@ public class RetrievalFacade {
|
|
|
|
|
|
/*
|
|
/*
|
|
* 获取科室名称列表
|
|
* 获取科室名称列表
|
|
- */
|
|
|
|
|
|
+ *
|
|
public List<String> getDepts(String name) {
|
|
public List<String> getDepts(String name) {
|
|
|
|
|
|
DeptNode deptNode = new DeptNode();
|
|
DeptNode deptNode = new DeptNode();
|
|
@@ -198,15 +178,11 @@ public class RetrievalFacade {
|
|
List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
String inputStr = staticKnowledgeIndexVO.getInputStr();
|
|
String inputStr = staticKnowledgeIndexVO.getInputStr();
|
|
List<Integer> types = staticKnowledgeIndexVO.getTypes();
|
|
List<Integer> types = staticKnowledgeIndexVO.getTypes();
|
|
- List<ICDDisease> icdDiseaseList = icdDiseaseRepository.findByNameLike("*" + inputStr + "*");
|
|
|
|
- List<Medicine> medicineList = medicineRepository.findByNameLike("*" + inputStr + "*");
|
|
|
|
- List<LISPack> lisPackList = lisPackRepository.findByNameLike("*" + inputStr + "*");
|
|
|
|
- List<LIS> lisList = lisRepository.findByNameLike("*" + inputStr + "*");
|
|
|
|
- List<PACS> pacsList = pacsRepository.findByNameLike("*" + inputStr + "*");
|
|
|
|
- List<Operation> operationList = operationRepository.findByNameLike("*" + inputStr + "*");
|
|
|
|
|
|
+
|
|
//TODO 诊断
|
|
//TODO 诊断
|
|
|
|
+ List<YiBaoDiseaseName> icdDiseaseList = icdDiseaseRepository.findByNameContaining(inputStr);
|
|
List<StaticKnowledgeIndexDTO> disRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> disRetList = Lists.newLinkedList();
|
|
- for (ICDDisease icdDisease : icdDiseaseList) {
|
|
|
|
|
|
+ for (YiBaoDiseaseName icdDisease : icdDiseaseList) {
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
staticDTO.setName(icdDisease.getName());
|
|
staticDTO.setName(icdDisease.getName());
|
|
staticDTO.setType(StaticTypeEnum.DIS.getKey());
|
|
staticDTO.setType(StaticTypeEnum.DIS.getKey());
|
|
@@ -214,6 +190,8 @@ public class RetrievalFacade {
|
|
disRetList.add(staticDTO);
|
|
disRetList.add(staticDTO);
|
|
}
|
|
}
|
|
//TODO 药品
|
|
//TODO 药品
|
|
|
|
+ List<Medicine> medicineList = medicineRepository.findByNameContaining(inputStr);
|
|
|
|
+
|
|
List<StaticKnowledgeIndexDTO> drugRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> drugRetList = Lists.newLinkedList();
|
|
for (Medicine medicine : medicineList) {
|
|
for (Medicine medicine : medicineList) {
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
@@ -223,31 +201,37 @@ public class RetrievalFacade {
|
|
drugRetList.add(staticDTO);
|
|
drugRetList.add(staticDTO);
|
|
}
|
|
}
|
|
//TODO 检验套餐
|
|
//TODO 检验套餐
|
|
- List<StaticKnowledgeIndexDTO> lisPackRetList = Lists.newLinkedList();
|
|
|
|
- for (LISPack lisPack : lisPackList) {
|
|
|
|
|
|
+ List<LisSet> lisSetList = lisSetRepository.findByNameContaining(inputStr);
|
|
|
|
+
|
|
|
|
+ List<StaticKnowledgeIndexDTO> lisSetRetList = Lists.newLinkedList();
|
|
|
|
+ for (LisSet lisSet : lisSetList) {
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
- staticDTO.setName(lisPack.getName());
|
|
|
|
- staticDTO.setType(StaticTypeEnum.LISMIX.getKey());
|
|
|
|
- staticDTO.setTypeName(StaticTypeEnum.LISMIX.getName());
|
|
|
|
- lisPackRetList.add(staticDTO);
|
|
|
|
|
|
+ staticDTO.setName(lisSet.getName());
|
|
|
|
+ staticDTO.setType(StaticTypeEnum.LISSET.getKey());
|
|
|
|
+ staticDTO.setTypeName(StaticTypeEnum.LISSET.getName());
|
|
|
|
+ lisSetRetList.add(staticDTO);
|
|
}
|
|
}
|
|
//TODO 检验明细关联出检验套餐
|
|
//TODO 检验明细关联出检验套餐
|
|
- List<StaticKnowledgeIndexDTO> lisPackRelatecLisRetList = Lists.newLinkedList();
|
|
|
|
- for (LIS lis : lisList) {
|
|
|
|
- if (lis.getLisPacks_related_lis().size() > 0) {
|
|
|
|
- for (LISPack lisPack : lis.getLisPacks_related_lis()) {
|
|
|
|
|
|
+ List<LisName> lisList = lisRepository.findByNameContaining(inputStr);
|
|
|
|
+
|
|
|
|
+ List<StaticKnowledgeIndexDTO> lisSetRelatecLisRetList = Lists.newLinkedList();
|
|
|
|
+ for (LisName lis : lisList) {
|
|
|
|
+ if (lis.getLissets().size() > 0) {
|
|
|
|
+ for (LisSet lisSet : lis.getLissets()) {
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
staticDTO.setRetrievalName(lis.getName());
|
|
staticDTO.setRetrievalName(lis.getName());
|
|
- staticDTO.setName(lisPack.getName());
|
|
|
|
- staticDTO.setType(StaticTypeEnum.LISMIX.getKey());
|
|
|
|
- staticDTO.setTypeName(StaticTypeEnum.LISMIX.getName());
|
|
|
|
- lisPackRelatecLisRetList.add(staticDTO);
|
|
|
|
|
|
+ staticDTO.setName(lisSet.getName());
|
|
|
|
+ staticDTO.setType(StaticTypeEnum.LISSET.getKey());
|
|
|
|
+ staticDTO.setTypeName(StaticTypeEnum.LISSET.getName());
|
|
|
|
+ lisSetRelatecLisRetList.add(staticDTO);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//TODO 检验明细
|
|
//TODO 检验明细
|
|
|
|
+ lisList = lisRepository.findByNameContaining(inputStr);
|
|
|
|
+
|
|
List<StaticKnowledgeIndexDTO> lisRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> lisRetList = Lists.newLinkedList();
|
|
- for (LIS lis : lisList) {
|
|
|
|
|
|
+ for (LisName lis : lisList) {
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
staticDTO.setName(lis.getName());
|
|
staticDTO.setName(lis.getName());
|
|
staticDTO.setType(StaticTypeEnum.LIS.getKey());
|
|
staticDTO.setType(StaticTypeEnum.LIS.getKey());
|
|
@@ -255,29 +239,37 @@ public class RetrievalFacade {
|
|
lisRetList.add(staticDTO);
|
|
lisRetList.add(staticDTO);
|
|
}
|
|
}
|
|
//TODO 检查
|
|
//TODO 检查
|
|
|
|
+ List<PacsName> pacsList = pacsRepository.findByNameContaining(inputStr);
|
|
|
|
+
|
|
List<StaticKnowledgeIndexDTO> pacsRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> pacsRetList = Lists.newLinkedList();
|
|
- for (PACS pacs : pacsList) {
|
|
|
|
|
|
+ for (PacsName pacs : pacsList) {
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
staticDTO.setName(pacs.getName());
|
|
staticDTO.setName(pacs.getName());
|
|
staticDTO.setType(StaticTypeEnum.PACS.getKey());
|
|
staticDTO.setType(StaticTypeEnum.PACS.getKey());
|
|
staticDTO.setTypeName(StaticTypeEnum.PACS.getName());
|
|
staticDTO.setTypeName(StaticTypeEnum.PACS.getName());
|
|
pacsRetList.add(staticDTO);
|
|
pacsRetList.add(staticDTO);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
//TODO 手术和操作
|
|
//TODO 手术和操作
|
|
|
|
+ List<YiBaoOperationName> operationList = operationRepository.findByNameContaining(inputStr);
|
|
|
|
+
|
|
List<StaticKnowledgeIndexDTO> operationRetList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> operationRetList = Lists.newLinkedList();
|
|
- for (Operation operation : operationList) {
|
|
|
|
|
|
+
|
|
|
|
+ for (YiBaoOperationName operation : operationList) {
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
|
|
staticDTO.setName(operation.getName());
|
|
staticDTO.setName(operation.getName());
|
|
staticDTO.setType(StaticTypeEnum.OPT.getKey());
|
|
staticDTO.setType(StaticTypeEnum.OPT.getKey());
|
|
staticDTO.setTypeName(StaticTypeEnum.OPT.getName());
|
|
staticDTO.setTypeName(StaticTypeEnum.OPT.getName());
|
|
operationRetList.add(staticDTO);
|
|
operationRetList.add(staticDTO);
|
|
}
|
|
}
|
|
|
|
+
|
|
//0-全部、1-诊断、2-药品、3-检验套餐、4-检验明细、5-检查、6-手术和操作
|
|
//0-全部、1-诊断、2-药品、3-检验套餐、4-检验明细、5-检查、6-手术和操作
|
|
if (ListUtil.isEmpty(types) || types.contains(0)) {
|
|
if (ListUtil.isEmpty(types) || types.contains(0)) {
|
|
retList.addAll(disRetList);
|
|
retList.addAll(disRetList);
|
|
retList.addAll(drugRetList);
|
|
retList.addAll(drugRetList);
|
|
- retList.addAll(lisPackRetList);
|
|
|
|
- retList.addAll(lisPackRelatecLisRetList);
|
|
|
|
|
|
+ retList.addAll(lisSetRetList);
|
|
|
|
+ retList.addAll(lisSetRelatecLisRetList);
|
|
retList.addAll(lisRetList);
|
|
retList.addAll(lisRetList);
|
|
retList.addAll(pacsRetList);
|
|
retList.addAll(pacsRetList);
|
|
retList.addAll(operationRetList);
|
|
retList.addAll(operationRetList);
|
|
@@ -290,9 +282,9 @@ public class RetrievalFacade {
|
|
}
|
|
}
|
|
if (types.contains(3)) {
|
|
if (types.contains(3)) {
|
|
//检索的套餐
|
|
//检索的套餐
|
|
- retList.addAll(lisPackRetList);
|
|
|
|
|
|
+ retList.addAll(lisSetRetList);
|
|
//明细关联出的套餐
|
|
//明细关联出的套餐
|
|
- retList.addAll(lisPackRelatecLisRetList);
|
|
|
|
|
|
+ retList.addAll(lisSetRelatecLisRetList);
|
|
//明细
|
|
//明细
|
|
retList.addAll(lisRetList);
|
|
retList.addAll(lisRetList);
|
|
}
|
|
}
|