|
@@ -5,6 +5,7 @@ import com.lantone.qc.kernel.structure.ai.model.EntityEnum;
|
|
|
import com.lantone.qc.kernel.structure.ai.model.Lemma;
|
|
|
import com.lantone.qc.pub.model.entity.*;
|
|
|
import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import java.util.*;
|
|
@@ -211,7 +212,7 @@ public class EntityProcessThreeLevelWard extends EntityProcess {
|
|
|
continue;
|
|
|
}
|
|
|
Drug drug = new Drug();
|
|
|
- drug.setName(lemma.getText());
|
|
|
+ drug.setName(lemma.getText().replaceAll("[“”]",""));
|
|
|
drug.setConsumption(findTAfter(lemma, new Consumption(), EntityEnum.CONSUMPTION.toString().split("-")[0]));
|
|
|
drug.setUsageWardRound(findTAfter(lemma, new UsageWardRound(), EntityEnum.USAGE_WARD_ROUND.toString()));
|
|
|
drug.setFrequency(findTAfter(lemma, new Frequency(), EntityEnum.FREQUENCY.toString()));
|
|
@@ -269,8 +270,10 @@ public class EntityProcessThreeLevelWard extends EntityProcess {
|
|
|
}
|
|
|
} else {
|
|
|
//将倒数第二个标题存入结构
|
|
|
- subContentIndex = start + "," + Integer.parseInt(lemma.getPosition());
|
|
|
- putSubContent(titleText, title, subContentIndex);
|
|
|
+ if (StringUtil.isNotBlank(title)) {
|
|
|
+ subContentIndex = start + "," + Integer.parseInt(lemma.getPosition());
|
|
|
+ putSubContent(titleText, title, subContentIndex);
|
|
|
+ }
|
|
|
//如果是最后一个Lemma,文本就从当前lemma的position开始取,取到结束
|
|
|
title = lemma.getProperty();//截取的这一段文本的标题
|
|
|
if (titleList.contains(title)) {
|