|
@@ -87,6 +87,11 @@ public class ParamsDataProxy {
|
|
|
PropertiesUtil propertiesUtil = new PropertiesUtil("nlp.properties");
|
|
|
featureNum = propertiesUtil.getProperty("push.feature.num");
|
|
|
fa.setFeatureNum(featureNum);
|
|
|
+ if (!StringUtils.isEmpty(searchData.getChief())) {
|
|
|
+ //提取主诉
|
|
|
+ featuresList = fa.start(searchData.getChief(), FeatureType.FEATURE);
|
|
|
+ paramFeatureInit(searchData, featuresList);
|
|
|
+ }
|
|
|
if (!StringUtils.isEmpty(searchData.getSymptom())) {
|
|
|
//提取现病史
|
|
|
featuresList = fa.start(searchData.getSymptom(), FeatureType.FEATURE);
|
|
@@ -145,9 +150,16 @@ public class ParamsDataProxy {
|
|
|
// }
|
|
|
//模型需要病历文本信息传入
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
- map.put("sentence", searchData.getSymptom());
|
|
|
- searchData.getInputs().put("sentence", map);
|
|
|
-
|
|
|
+ if (!StringUtils.isEmpty(searchData.getChief()) && !StringUtils.isEmpty(searchData.getSymptom())) {
|
|
|
+ map.put("sentence", searchData.getChief() + searchData.getSymptom());
|
|
|
+ } else if (!StringUtils.isEmpty(searchData.getChief())) {
|
|
|
+ map.put("sentence", searchData.getChief());
|
|
|
+ } else if (!StringUtils.isEmpty(searchData.getSymptom())) {
|
|
|
+ map.put("sentence", searchData.getSymptom());
|
|
|
+ }
|
|
|
+ if (map.get("sentence") != null) {
|
|
|
+ searchData.getInputs().put("sentence", map);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|