浏览代码

同义词转换接口优化

zhoutg 4 年之前
父节点
当前提交
34f1c1151f
共有 1 个文件被更改,包括 10 次插入5 次删除
  1. 10 5
      src/main/java/com/diagbot/facade/NeoFacade.java

+ 10 - 5
src/main/java/com/diagbot/facade/NeoFacade.java

@@ -813,12 +813,17 @@ public class NeoFacade {
         List<String> lisConList = getConvertList(standConvert.getLisList(), StandConvertEnum.lis.toString(), standConvertCrfVOList);
         List<String> transfusionConList = getConvertList(standConvert.getTransfusionList(), StandConvertEnum.transfusion.toString(), standConvertCrfVOList);
 
-        StandConvertCrfBatchDTO standConvertCrfBatchDTO = null;
-        try {
-            standConvertCrfBatchDTO = standConvertServiceClient.similarityBatch(standConvertCrfVOList);
-        } catch (Exception e) {
-            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "标准词转换【服务器】挂了!" + e.getMessage());
+        StandConvertCrfBatchDTO standConvertCrfBatchDTO = new StandConvertCrfBatchDTO();
+        if (!(ListUtil.isEmpty(clinicalConList) && ListUtil.isEmpty(operationConList) && ListUtil.isEmpty(drugConList)
+                && ListUtil.isEmpty(vitallConList) && ListUtil.isEmpty(diseaseConList) && ListUtil.isEmpty(pacsConList)
+                && ListUtil.isEmpty(lisConList) && ListUtil.isEmpty(transfusionConList))) {
+            try {
+                standConvertCrfBatchDTO = standConvertServiceClient.similarityBatch(standConvertCrfVOList);
+            } catch (Exception e) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "标准词转换【服务器】挂了!" + e.getMessage());
+            }
         }
+
         Map<String, Map<String, StandConvertCrfDTO>> crfMap = standConvertCrfBatchDTO.getData();
         getConvertMap(crfMap, StandConvertEnum.symptom.toString(), clinicalConList, standConvert.getClinicalList(), map);
         getConvertMap(crfMap, StandConvertEnum.operation.toString(), operationConList, standConvert.getOperationList(), map);