|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.lantone.qc.dbanaly.util.RedisUtil;
|
|
|
+import com.lantone.qc.dbanaly.util.SpecialStorageUtil;
|
|
|
import com.lantone.qc.kernel.client.CRFServiceClient;
|
|
|
import com.lantone.qc.kernel.client.ChiefPresentSimilarityServiceClient;
|
|
|
import com.lantone.qc.kernel.client.SimilarityServiceClient;
|
|
@@ -37,9 +38,11 @@ public class ModelAI {
|
|
|
protected JSONObject loadAI(boolean useCrfCache, String behospitalCode, JSONArray crfContent, CRFServiceClient crfServiceClient) {
|
|
|
JSONArray data = null;
|
|
|
RedisUtil redisUtil = SpringContextUtil.getBean("redisUtil");
|
|
|
+ SpecialStorageUtil specialStorageUtil = SpringContextUtil.getBean("specialStorageUtil");
|
|
|
+ String prex = "crf_cache:" + specialStorageUtil.getHospitalIdThreadLocal().get() + ":";
|
|
|
String classname = this.getClass().getName();
|
|
|
if (useCrfCache) {
|
|
|
- data = (JSONArray) redisUtil.hget(behospitalCode, classname);
|
|
|
+ data = (JSONArray) redisUtil.hget(prex + behospitalCode, classname);
|
|
|
}
|
|
|
if (data == null) {
|
|
|
//存储CRF完整所需结构数据
|
|
@@ -51,7 +54,7 @@ public class ModelAI {
|
|
|
long t2 = System.currentTimeMillis();
|
|
|
log.error(behospitalCode + "-----" + classname + "(CRF) 耗时:" + (t2 - t1));
|
|
|
if (data != null) {
|
|
|
- redisUtil.hset(behospitalCode, classname, data, 86400);
|
|
|
+ redisUtil.hset(prex + behospitalCode, classname, data, 86400);
|
|
|
}
|
|
|
}
|
|
|
JSONObject midData = getOutputs(data);
|