|
@@ -5,12 +5,14 @@ import com.diagbot.dto.ConceptBaseDTO;
|
|
|
import com.diagbot.dto.ConceptWithOrderRes;
|
|
|
import com.diagbot.entity.Concept;
|
|
|
import com.diagbot.entity.wrapper.ConceptWrapper;
|
|
|
+import com.diagbot.enums.ConceptTypeEnum;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.LexiconRSTypeEnum;
|
|
|
import com.diagbot.enums.LexiconTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.ConceptServiceImpl;
|
|
|
+import com.diagbot.util.ParamConvertUtil;
|
|
|
import com.diagbot.vo.ConceptBaseVO;
|
|
|
import com.diagbot.vo.ConceptUsualVO;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -66,6 +68,17 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<ConceptBaseDTO> getConceptUsual(ConceptUsualVO conceptUsualVO){
|
|
|
+ //入参验证
|
|
|
+ List<Integer> inputTyps = new ArrayList<>();
|
|
|
+ inputTyps.add(ConceptTypeEnum.Symptom.getKey());
|
|
|
+ inputTyps.add(ConceptTypeEnum.Vital.getKey());
|
|
|
+ inputTyps.add(ConceptTypeEnum.Lis.getKey());
|
|
|
+ inputTyps.add(ConceptTypeEnum.Pacs.getKey());
|
|
|
+
|
|
|
+ if (!inputTyps.contains(conceptUsualVO.getType())){
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS,"超出范围");
|
|
|
+ }
|
|
|
+
|
|
|
//获取标签内容
|
|
|
ConceptWrapper conceptWrapper = new ConceptWrapper();
|
|
|
conceptWrapper.setStartId(conceptUsualVO.getDeptId());//科室概念id
|
|
@@ -74,7 +87,7 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
conceptWrapper.setEndAge(conceptUsualVO.getAge());//年龄
|
|
|
conceptWrapper.setEndSex(conceptUsualVO.getSexType());//性别
|
|
|
//找出标签类型对应的类型id
|
|
|
- conceptWrapper.setEndType(getLibType(conceptUsualVO.getType()));//标签类型
|
|
|
+ conceptWrapper.setEndType(ParamConvertUtil.conceptConvert2Lib(conceptUsualVO.getType()));//标签类型
|
|
|
List<ConceptWithOrderRes> concepts = this.getConceptWithOrder(conceptWrapper);
|
|
|
List<ConceptBaseDTO> list = new ArrayList();
|
|
|
//封装
|
|
@@ -87,42 +100,4 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 标签类型转换
|
|
|
- *
|
|
|
- * @param type
|
|
|
- * @return
|
|
|
- */
|
|
|
- public Integer getLibType(Integer type){
|
|
|
- Integer typeId = null;
|
|
|
- if (type != null){
|
|
|
- switch (type){
|
|
|
- case 1:
|
|
|
- case 2:
|
|
|
- typeId = LexiconTypeEnum.SYMPTOM.getKey();//症状
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- typeId = LexiconTypeEnum.LIS_PACKAGE.getKey();//化验
|
|
|
- break;
|
|
|
- case 6:
|
|
|
- typeId = LexiconTypeEnum.PACS_PACKAGE.getKey();//辅检
|
|
|
- break;
|
|
|
- case 7:
|
|
|
- typeId = LexiconTypeEnum.DIAGNOSIS.getKey();//诊断
|
|
|
- break;
|
|
|
- default:
|
|
|
- throw new CommonException(CommonErrorCode.NOT_EXISTS,
|
|
|
- "超出范围");
|
|
|
- }
|
|
|
- }else {
|
|
|
- throw new CommonException(CommonErrorCode.NOT_EXISTS,
|
|
|
- "请输入type");
|
|
|
- }
|
|
|
- return typeId;
|
|
|
- }
|
|
|
}
|