|
@@ -37,11 +37,16 @@ public class ParamsDataProxy {
|
|
|
if (StringUtils.isEmpty(searchData.getResourceType())) {
|
|
|
searchData.setResourceType(BigDataConstants.resource_type_o);
|
|
|
}
|
|
|
+
|
|
|
+ //所有信息参与推送
|
|
|
+ searchData.setSymptom(searchData.getSymptom() + searchData.getVital()
|
|
|
+ + searchData.getLis() + searchData.getPacs() + searchData.getPast() + searchData.getOther());
|
|
|
+ searchData.setSymptom(searchData.getSymptom().trim());
|
|
|
//一次推送多个类别信息
|
|
|
String[] featureTypes = searchData.getFeatureType().split(",");
|
|
|
searchData.setFeatureTypes(featureTypes);
|
|
|
//featureType转算法模型类别
|
|
|
- searchData.setAlgorithmClassify(createAlgorithmClassify(searchData.getSysCode(), featureTypes, searchData.getDiag()));
|
|
|
+ searchData.setAlgorithmClassify(createAlgorithmClassify(searchData.getSysCode(), featureTypes, searchData));
|
|
|
//获取入参中的特征信息
|
|
|
FeatureAnalyze fa = new FeatureAnalyze();
|
|
|
|
|
@@ -49,68 +54,75 @@ public class ParamsDataProxy {
|
|
|
List<Map<String, Object>> featuresList = fa.start(searchData.getSymptom(), FeatureType.FEATURE);
|
|
|
paramFeatureInit(searchData, featuresList, "symptomFeatureList", FeatureType.FEATURE);
|
|
|
}
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(searchData.getDiag())) {
|
|
|
+ List<Map<String, Object>> featuresList = fa.start(searchData.getDiag(), FeatureType.DIAG);
|
|
|
+ paramFeatureInit(searchData, featuresList, "diagFeatureList", FeatureType.DIAG);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* featureType转算法模型类型
|
|
|
* @param sysCode
|
|
|
* @param featureTypes
|
|
|
- * @param diag
|
|
|
+ * @param searchData
|
|
|
*/
|
|
|
- private AlgorithmClassify[] createAlgorithmClassify(String sysCode, String[] featureTypes, String diag) {
|
|
|
+ private AlgorithmClassify[] createAlgorithmClassify(String sysCode, String[] featureTypes, BigDataSearchData searchData) {
|
|
|
AlgorithmClassify[] classifies = new AlgorithmClassify[featureTypes.length];
|
|
|
+ //下了诊断且其他信息全为空 反推标识
|
|
|
+ boolean reverse = !StringUtils.isEmpty(searchData.getDiag()) && StringUtils.isEmpty(searchData.getSymptom());
|
|
|
for (int i = 0; i < featureTypes.length; i++) {
|
|
|
featureTypes[i] = convertFeatureType(sysCode, featureTypes[i]);
|
|
|
if (featureTypes[i] != null) {
|
|
|
//模型
|
|
|
switch (FeatureType.parse(featureTypes[i])) {
|
|
|
case SYMPTOM:
|
|
|
- if (StringUtils.isEmpty(diag)) {
|
|
|
- classifies[i] = AlgorithmClassify.NEURAL_SYMPTOM;
|
|
|
- } else {
|
|
|
+ if (reverse) {
|
|
|
classifies[i] = AlgorithmClassify.NEURAL_DIAG_SYMPTOM;
|
|
|
+ } else {
|
|
|
+ classifies[i] = AlgorithmClassify.NEURAL_SYMPTOM;
|
|
|
}
|
|
|
break;
|
|
|
case DIAG:
|
|
|
- if (StringUtils.isEmpty(diag)) {
|
|
|
- classifies[i] = AlgorithmClassify.NEURAL_DIAG;
|
|
|
- } else {
|
|
|
+ if (reverse) {
|
|
|
classifies[i] = null;
|
|
|
+ } else {
|
|
|
+ classifies[i] = AlgorithmClassify.NEURAL_DIAG;
|
|
|
}
|
|
|
break;
|
|
|
case VITAL:
|
|
|
- if (StringUtils.isEmpty(diag)) {
|
|
|
- classifies[i] = AlgorithmClassify.NEURAL_VITAL;
|
|
|
- } else {
|
|
|
+ if (reverse) {
|
|
|
classifies[i] = AlgorithmClassify.NEURAL_DIAG_VITAL;
|
|
|
+ } else {
|
|
|
+ classifies[i] = AlgorithmClassify.NEURAL_VITAL;
|
|
|
}
|
|
|
break;
|
|
|
case LIS:
|
|
|
- if (StringUtils.isEmpty(diag)) {
|
|
|
- classifies[i] = AlgorithmClassify.NEURAL_LIS;
|
|
|
- } else {
|
|
|
+ if (reverse) {
|
|
|
classifies[i] = AlgorithmClassify.NEURAL_DIAG_LIS;
|
|
|
+ } else {
|
|
|
+ classifies[i] = AlgorithmClassify.NEURAL_LIS;
|
|
|
}
|
|
|
break;
|
|
|
case PACS:
|
|
|
- if (StringUtils.isEmpty(diag)) {
|
|
|
- classifies[i] = AlgorithmClassify.NEURAL_PACS;
|
|
|
- } else {
|
|
|
+ if (reverse) {
|
|
|
classifies[i] = AlgorithmClassify.NEURAL_DIAG_PACS;
|
|
|
+ } else {
|
|
|
+ classifies[i] = AlgorithmClassify.NEURAL_PACS;
|
|
|
}
|
|
|
break;
|
|
|
case TREAT:
|
|
|
- if (StringUtils.isEmpty(diag)) {
|
|
|
- classifies[i] = AlgorithmClassify.NEURAL_TREAT;
|
|
|
- } else {
|
|
|
+ if (reverse) {
|
|
|
classifies[i] = AlgorithmClassify.NEURAL_DIAG_TREAT;
|
|
|
+ } else {
|
|
|
+ classifies[i] = AlgorithmClassify.NEURAL_TREAT;
|
|
|
}
|
|
|
break;
|
|
|
case HISTORY:
|
|
|
- if (StringUtils.isEmpty(diag)) {
|
|
|
- classifies[i] = AlgorithmClassify.NEURAL_HISTORY;
|
|
|
- } else {
|
|
|
+ if (reverse) {
|
|
|
classifies[i] = AlgorithmClassify.NEURAL_DIAG_HISTORY;
|
|
|
+ } else {
|
|
|
+ classifies[i] = AlgorithmClassify.NEURAL_HISTORY;
|
|
|
}
|
|
|
break;
|
|
|
}
|