|
@@ -56,7 +56,7 @@ public class ThreeLevelWardAI extends ModelAI {
|
|
Map<String, String> lastCourseRecord = getLastCourseRecord(threeLevelWardDocs);
|
|
Map<String, String> lastCourseRecord = getLastCourseRecord(threeLevelWardDocs);
|
|
if (lastCourseRecord != null && lastCourseRecord.containsKey("病情记录")) {
|
|
if (lastCourseRecord != null && lastCourseRecord.containsKey("病情记录")) {
|
|
//主任医师最后一次查房记录
|
|
//主任医师最后一次查房记录
|
|
- putContent(crfContent, medicalTextType.get(1), lastCourseRecord.get("病情记录"), "最后一次" + Content.director);
|
|
|
|
|
|
+ putContent(crfContent, medicalTextType.get(1), lastCourseRecord.get("病情记录"), Content.director + "最后一次");
|
|
}
|
|
}
|
|
|
|
|
|
List<Map<String, String>> directorDifficultRecord = new ArrayList<>();
|
|
List<Map<String, String>> directorDifficultRecord = new ArrayList<>();
|
|
@@ -86,7 +86,10 @@ public class ThreeLevelWardAI extends ModelAI {
|
|
if (midData.get(Content.director) != null) {
|
|
if (midData.get(Content.director) != null) {
|
|
putWardRoundCrfData(midData.getJSONObject(Content.director), inputInfo, Content.director, 0);//查房记录
|
|
putWardRoundCrfData(midData.getJSONObject(Content.director), inputInfo, Content.director, 0);//查房记录
|
|
}
|
|
}
|
|
- putWardRoundCrfData(midData.getJSONObject("最后一次" + Content.director), inputInfo, "最后一次" + Content.director, 0);//最后一次查房记录
|
|
|
|
|
|
+ //主任医师最后一次查房记录模型输出
|
|
|
|
+ if (midData.get(Content.director + "最后一次") != null) {
|
|
|
|
+ putWardRoundCrfData(midData.getJSONObject(Content.director + "最后一次"), inputInfo, Content.director + "最后一次", 0);//最后一次查房记录
|
|
|
|
+ }
|
|
//疑难患者副高及以上查房记录模型输出
|
|
//疑难患者副高及以上查房记录模型输出
|
|
if (inputInfo.getDifficultCaseDiscussDocs().size() > 0 && ListUtil.isNotEmpty(directorDifficultRecord)) {
|
|
if (inputInfo.getDifficultCaseDiscussDocs().size() > 0 && ListUtil.isNotEmpty(directorDifficultRecord)) {
|
|
for (int i = 0; i < directorDifficultRecord.size(); i++) {
|
|
for (int i = 0; i < directorDifficultRecord.size(); i++) {
|
|
@@ -108,6 +111,19 @@ public class ThreeLevelWardAI extends ModelAI {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ protected void putContent(JSONArray crfContent, String medicalTextType, String text, String sign) {
|
|
|
|
+ String move_text = CatalogueUtil.removeSpecialChar(text);
|
|
|
|
+ if (StringUtil.isEmpty(move_text)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ JSONObject detailContent = new JSONObject();
|
|
|
|
+ detailContent.put("medical_text_type", medicalTextType);
|
|
|
|
+ detailContent.put("content", move_text);
|
|
|
|
+ detailContent.put("detail_title", sign);
|
|
|
|
+ detailContent.put("originalText", text);
|
|
|
|
+ crfContent.add(detailContent);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 处理查房记录
|
|
* 处理查房记录
|
|
*
|
|
*
|
|
@@ -116,15 +132,20 @@ public class ThreeLevelWardAI extends ModelAI {
|
|
*/
|
|
*/
|
|
public void putWardRoundCrfData(JSONObject jsonObject, InputInfo inputInfo, String detailTitle, int serious) {
|
|
public void putWardRoundCrfData(JSONObject jsonObject, InputInfo inputInfo, String detailTitle, int serious) {
|
|
JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
|
|
JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
|
|
|
|
+ String originalText = jsonObject.getString("originalText");
|
|
//使用现病史结构来处理病历特点
|
|
//使用现病史结构来处理病历特点
|
|
EntityProcessThreeLevelWard entityProcessThreeLevelWard = new EntityProcessThreeLevelWard();
|
|
EntityProcessThreeLevelWard entityProcessThreeLevelWard = new EntityProcessThreeLevelWard();
|
|
ThreeLevelWardLabel threeLevelWardLabel = entityProcessThreeLevelWard.extractEntity(aiOut);
|
|
ThreeLevelWardLabel threeLevelWardLabel = entityProcessThreeLevelWard.extractEntity(aiOut);
|
|
threeLevelWardLabel.setTitle(detailTitle);
|
|
threeLevelWardLabel.setTitle(detailTitle);
|
|
threeLevelWardLabel.setSerious(serious);
|
|
threeLevelWardLabel.setSerious(serious);
|
|
- ThreeLevelWardDoc threeLevelWardDoc = new ThreeLevelWardDoc();
|
|
|
|
- threeLevelWardDoc.setThreeLevelWardLabel(threeLevelWardLabel);
|
|
|
|
- //临床表现
|
|
|
|
- inputInfo.getThreeLevelWardDocs().add(threeLevelWardDoc);
|
|
|
|
|
|
+ List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs();
|
|
|
|
+ for (ThreeLevelWardDoc threeLevelWardDoc : threeLevelWardDocs) {
|
|
|
|
+ String text = threeLevelWardDoc.getText();
|
|
|
|
+ if (StringUtil.isNotBlank(text) && StringUtil.isNotBlank(originalText) && text.equals(originalText)) {
|
|
|
|
+ threeLevelWardDoc.setThreeLevelWardLabel(threeLevelWardLabel);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -303,7 +324,7 @@ public class ThreeLevelWardAI extends ModelAI {
|
|
dateRecord.put(recordDate, rescueStructureMap);
|
|
dateRecord.put(recordDate, rescueStructureMap);
|
|
}
|
|
}
|
|
List<Map<String, String>> dateRecordList = new ArrayList<>(dateRecord.values());
|
|
List<Map<String, String>> dateRecordList = new ArrayList<>(dateRecord.values());
|
|
- if (ListUtil.isEmpty(dateRecordList)){
|
|
|
|
|
|
+ if (ListUtil.isEmpty(dateRecordList)) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
return dateRecordList.get(0);
|
|
return dateRecordList.get(0);
|