|
@@ -311,31 +311,25 @@ public class NeoFacade {
|
|
|
*/
|
|
|
public Map<String, Map<String, String>> standConvertCrf(StandConvert standConvert) {
|
|
|
Map<String, Map<String, String>> map = new LinkedHashMap<>();
|
|
|
+ List<String> clinicalList = standConvert.getClinicalList();
|
|
|
+ Map<String, String> clinicalMap = getStandConvertMapBatch(clinicalList, "symptom");
|
|
|
+ map.put(StandConvertEnum.clinical.getName(), clinicalMap);
|
|
|
|
|
|
- try {
|
|
|
- List<String> clinicalList = standConvert.getClinicalList();
|
|
|
- Map<String, String> clinicalMap = getStandConvertMapBathch(clinicalList, "symptom");
|
|
|
- map.put(StandConvertEnum.clinical.getName(), clinicalMap);
|
|
|
-
|
|
|
- List<String> operationList = standConvert.getOperationList();
|
|
|
- Map<String, String> operationMap = getStandConvertMapBathch(operationList, "operation");
|
|
|
- map.put(StandConvertEnum.operation.getName(), operationMap);
|
|
|
-
|
|
|
- List<String> drugList = standConvert.getDrugList();
|
|
|
- Map<String, String> drugMap = getStandConvertMapBathch(drugList, "drug");
|
|
|
- map.put(StandConvertEnum.drug.getName(), drugMap);
|
|
|
+ List<String> operationList = standConvert.getOperationList();
|
|
|
+ Map<String, String> operationMap = getStandConvertMapBatch(operationList, "operation");
|
|
|
+ map.put(StandConvertEnum.operation.getName(), operationMap);
|
|
|
|
|
|
- List<String> vitalList = standConvert.getDrugList();
|
|
|
- Map<String, String> vitalMap = getStandConvertMapBathch(vitalList, "vital");
|
|
|
- map.put(StandConvertEnum.vital.getName(), vitalMap);
|
|
|
+ List<String> drugList = standConvert.getDrugList();
|
|
|
+ Map<String, String> drugMap = getStandConvertMapBatch(drugList, "drug");
|
|
|
+ map.put(StandConvertEnum.drug.getName(), drugMap);
|
|
|
|
|
|
- List<String> diseaseList = standConvert.getDiaglList();
|
|
|
- Map<String, String> diseaseMap = getStandConvertMapBathch(diseaseList, "disease");
|
|
|
- map.put(StandConvertEnum.disease.getName(), diseaseMap);
|
|
|
+ List<String> vitalList = standConvert.getDrugList();
|
|
|
+ Map<String, String> vitalMap = getStandConvertMapBatch(vitalList, "vital");
|
|
|
+ map.put(StandConvertEnum.vital.getName(), vitalMap);
|
|
|
|
|
|
- } catch (Exception e) {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "标准词转换服务出错!【找毕金良】" + e.getMessage());
|
|
|
- }
|
|
|
+ List<String> diseaseList = standConvert.getDiaglList();
|
|
|
+ Map<String, String> diseaseMap = getStandConvertMapBatch(diseaseList, "disease");
|
|
|
+ map.put(StandConvertEnum.disease.getName(), diseaseMap);
|
|
|
return map;
|
|
|
}
|
|
|
|
|
@@ -399,7 +393,7 @@ public class NeoFacade {
|
|
|
* @param type 类型
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<String, String> getStandConvertMapBathch(List<String> list, String type) {
|
|
|
+ public Map<String, String> getStandConvertMapBatch(List<String> list, String type) {
|
|
|
long l1 = System.currentTimeMillis();
|
|
|
Map<String, String> typeMap = redisUtil.getValueByType(type);
|
|
|
Map<String, String> standConvertMap = new LinkedHashMap<>();
|
|
@@ -424,7 +418,12 @@ public class NeoFacade {
|
|
|
standConvertCrfVO.setWord(s);
|
|
|
standConvertCrfVOList.add(standConvertCrfVO);
|
|
|
}
|
|
|
- StandConvertCrfBatchDTO standConvertCrfBatchDTO = standConvertServiceClient.similarityBatch(standConvertCrfVOList);
|
|
|
+ StandConvertCrfBatchDTO standConvertCrfBatchDTO = null;
|
|
|
+ try {
|
|
|
+ standConvertCrfBatchDTO = standConvertServiceClient.similarityBatch(standConvertCrfVOList);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "标准词转换服务出错!【找毕金良】" + e.getMessage());
|
|
|
+ }
|
|
|
if (standConvertCrfBatchDTO != null && standConvertCrfBatchDTO.getStatus()) {
|
|
|
Map<String, StandConvertCrfDTO> map1 = standConvertCrfBatchDTO.getData().get(type);
|
|
|
for (String s : notList) {
|