|
@@ -144,10 +144,13 @@ public class BeHospitalizedAI {
|
|
|
return;
|
|
|
}
|
|
|
JSONObject aiOut = jsonObject.getJSONObject(entityRelationObject).getJSONObject(BeHospitalizedAI.outputs);
|
|
|
- //放置入inputinfo
|
|
|
+ //使用现病史结构
|
|
|
+ EntityProcessClinic entityProcessClinic = new EntityProcessClinic();
|
|
|
+ PresentLabel presentLabel = entityProcessClinic.extractEntity(aiOut);
|
|
|
+
|
|
|
ChiefLabel chiefLabel = inputInfo.getBeHospitalizedDoc().getChiefLabel();
|
|
|
- chiefLabel.setClinicals(loadClinicals(aiOut));
|
|
|
- chiefLabel.setDiags(loadDiags(aiOut));
|
|
|
+ chiefLabel.setClinicals(presentLabel.getClinicals());
|
|
|
+ chiefLabel.setDiags(presentLabel.getDiags());
|
|
|
}
|
|
|
|
|
|
public void putPresentCrfData(JSONObject jsonObject, InputInfo inputInfo) {
|
|
@@ -156,23 +159,10 @@ public class BeHospitalizedAI {
|
|
|
}
|
|
|
JSONObject aiOut = jsonObject.getJSONObject(entityRelationObject).getJSONObject(BeHospitalizedAI.outputs);
|
|
|
//放置入inputinfo
|
|
|
- PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
|
|
|
- presentLabel.setClinicals(loadClinicals(aiOut));
|
|
|
- presentLabel.setGenerals(loadGeneralDes(aiOut));
|
|
|
- presentLabel.setPacses(loadPacses(aiOut));
|
|
|
- presentLabel.setDiags(loadDiags(aiOut));
|
|
|
-
|
|
|
- EntityProcess entityProcess = new EntityProcess();
|
|
|
- List<Lemma> entityTree = entityProcess.createEntityTree(aiOut, EntityEnum.CURE.toString());
|
|
|
- List<Treat> treats = new ArrayList<>();
|
|
|
- for (Lemma lemma : entityTree) {
|
|
|
- Treat treat = new Treat();
|
|
|
- treat.setName(lemma.getText());
|
|
|
- treats.add(treat);
|
|
|
- }
|
|
|
- presentLabel.setTreats(treats);
|
|
|
-
|
|
|
-
|
|
|
+ EntityProcessClinic entityProcessClinic = new EntityProcessClinic();
|
|
|
+ PresentLabel presentLabel = entityProcessClinic.extractEntity(aiOut);
|
|
|
+ presentLabel.setText(inputInfo.getBeHospitalizedDoc().getPresentLabel().getText());
|
|
|
+ inputInfo.getBeHospitalizedDoc().setPresentLabel(presentLabel);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -359,19 +349,6 @@ public class BeHospitalizedAI {
|
|
|
pacsLabel.setPacses(loadPacses(aiOut));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 关系抽取临床表现信息
|
|
|
- *
|
|
|
- * @param aiOut
|
|
|
- * @return
|
|
|
- */
|
|
|
- public List<Clinical> loadClinicals(JSONObject aiOut) {
|
|
|
- //主诉
|
|
|
- EntityProcessClinic entityProcessClinic = new EntityProcessClinic();
|
|
|
- List<Clinical> clinicals = entityProcessClinic.extractEntity(aiOut);
|
|
|
- return clinicals;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 关系抽取疾病信息
|
|
|
*
|
|
@@ -424,19 +401,6 @@ public class BeHospitalizedAI {
|
|
|
return vitals;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 关系抽取一般情况描述信息
|
|
|
- *
|
|
|
- * @param aiOut
|
|
|
- * @return
|
|
|
- */
|
|
|
- public List<GeneralDesc> loadGeneralDes(JSONObject aiOut) {
|
|
|
- //一般情况描述信息
|
|
|
- EntityProcessGenerals entityProcessGeneral = new EntityProcessGenerals();
|
|
|
- List<GeneralDesc> generals = entityProcessGeneral.extractEntity(aiOut);
|
|
|
- return generals;
|
|
|
- }
|
|
|
-
|
|
|
public void putContent(JSONArray crfContent, String medicalTextType, String text, String sign) {
|
|
|
String move_text = CatalogueUtil.removeSpecialChar(text);
|
|
|
if (StringUtil.isEmpty(move_text)) {
|