|
@@ -1,8 +1,19 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.diagbot.entity.KlConcept;
|
|
|
+import com.diagbot.enums.IsDeleteEnum;
|
|
|
+import com.diagbot.enums.LexiconEnum;
|
|
|
import com.diagbot.service.impl.KlConceptServiceImpl;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.vo.ConceptVO;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
/**
|
|
|
* @Description:
|
|
|
* @author: gaodm
|
|
@@ -10,4 +21,65 @@ import org.springframework.stereotype.Component;
|
|
|
*/
|
|
|
@Component
|
|
|
public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量校验标准术语
|
|
|
+ *
|
|
|
+ * @param conceptVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<String> getConceptNames(ConceptVO conceptVO) {
|
|
|
+ if (ListUtil.isEmpty(conceptVO.getNames())) {
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+ List<String> retList = Lists.newLinkedList();
|
|
|
+ //type: 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血
|
|
|
+ Integer type = convertType(conceptVO.getType());
|
|
|
+
|
|
|
+ List<KlConcept> concepts = this.list(new QueryWrapper<KlConcept>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("lib_name", conceptVO.getNames()));
|
|
|
+
|
|
|
+ if (ListUtil.isNotEmpty(concepts)) {
|
|
|
+ retList = concepts.stream().map(i -> i.getLibName()).distinct().collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public Integer convertType(Integer type) {
|
|
|
+ Integer retType = null;
|
|
|
+ //type: 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血
|
|
|
+ switch (type) {
|
|
|
+ case 1:
|
|
|
+ retType = LexiconEnum.LisName.getKey();
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ retType = LexiconEnum.LisSubName.getKey();
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ retType = LexiconEnum.PacsName.getKey();
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ retType = LexiconEnum.Disease.getKey();
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ retType = LexiconEnum.Medicine.getKey();
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ retType = LexiconEnum.Operation.getKey();
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ retType = LexiconEnum.Dept.getKey();
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ retType = LexiconEnum.Transfusion.getKey();
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ return retType;
|
|
|
+ }
|
|
|
}
|