|
@@ -18,6 +18,23 @@ import java.util.stream.Collectors;
|
|
|
public class EntityProcessPacs extends EntityProcess {
|
|
|
|
|
|
public void extractEntity(JSONObject aiOut, PacsLabel pacsLabel) {
|
|
|
+ // 辅检项目
|
|
|
+ List<Lemma> pacsAll = createEntityTree(aiOut, EntityEnum.AUXILIARY_EXAMINATION.toString());
|
|
|
+ // 如果辅检项目为空,就不存在辅检提取的其他内容
|
|
|
+ if (ListUtil.isEmpty(pacsAll)) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ List<Item> collect = Lists.newArrayList();
|
|
|
+ if(ListUtil.isNotEmpty(pacsAll)) {
|
|
|
+ collect = pacsAll.stream().map(x -> {
|
|
|
+ Item item = new Item();
|
|
|
+ item.setName(x.getText());
|
|
|
+ item.setUniqueName(x.getText());
|
|
|
+ return item;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ pacsLabel.setItem(collect);
|
|
|
+
|
|
|
// 获取描述和部位、修饰的关系
|
|
|
List<Pacs> pacsResults = new ArrayList<>(); // 辅检提取的描述信息
|
|
|
List<Lemma> pacsLemmas = createEntityTree(aiOut, EntityEnum.AUXILIARY_DESCRIPT.toString());
|
|
@@ -48,18 +65,7 @@ public class EntityProcessPacs extends EntityProcess {
|
|
|
}
|
|
|
pacsLabel.setPacsResults(pacsResults);
|
|
|
|
|
|
- // 辅检项目
|
|
|
- List<Lemma> pacsAll = createEntityTree(aiOut, EntityEnum.AUXILIARY_EXAMINATION.toString());
|
|
|
- List<Item> collect = Lists.newArrayList();
|
|
|
- if(ListUtil.isNotEmpty(pacsAll)) {
|
|
|
- collect = pacsAll.stream().map(x -> {
|
|
|
- Item item = new Item();
|
|
|
- item.setName(x.getText());
|
|
|
- item.setUniqueName(x.getText());
|
|
|
- return item;
|
|
|
- }).collect(Collectors.toList());
|
|
|
- }
|
|
|
- pacsLabel.setItem(collect);
|
|
|
+
|
|
|
|
|
|
// 辅检诊断
|
|
|
List<Lemma> pacsDisease = createEntityTree(aiOut, EntityEnum.DIEASE.toString());
|