|
@@ -1,24 +1,39 @@
|
|
package com.lantone.qc.kernel.structure.ai;
|
|
package com.lantone.qc.kernel.structure.ai;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.lantone.qc.kernel.client.CRFServiceClient;
|
|
import com.lantone.qc.kernel.client.CRFServiceClient;
|
|
-import com.lantone.qc.kernel.structure.ai.model.EntityEnum;
|
|
|
|
-import com.lantone.qc.kernel.structure.ai.model.Lemma;
|
|
|
|
-import com.lantone.qc.kernel.structure.ai.process.*;
|
|
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessClinic;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessDiag;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessFamily;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessLis;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessMarital;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessMenses;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessPacs;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessPast;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessPersonal;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.process.EntityProcessVital;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.pub.Content;
|
|
import com.lantone.qc.pub.Content;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
-import com.lantone.qc.pub.model.entity.*;
|
|
|
|
-import com.lantone.qc.pub.model.label.*;
|
|
|
|
-import com.lantone.qc.pub.model.vo.CRFVo;
|
|
|
|
|
|
+import com.lantone.qc.pub.model.entity.Diag;
|
|
|
|
+import com.lantone.qc.pub.model.entity.Lis;
|
|
|
|
+import com.lantone.qc.pub.model.entity.Pacs;
|
|
|
|
+import com.lantone.qc.pub.model.entity.Vital;
|
|
|
|
+import com.lantone.qc.pub.model.label.ChiefLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.DiagLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.FamilyLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.MaritalLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.MenstrualLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.PacsLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.PastLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.PersonalLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.PresentLabel;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -110,19 +125,23 @@ public class BeHospitalizedAI extends ModelAI {
|
|
putContent(crfContent, medicalTextType.get(3), pacs_text, Content.pacs);//辅助检查(暂用主诉现病史模型,之后会新训练单独模型再做修改)
|
|
putContent(crfContent, medicalTextType.get(3), pacs_text, Content.pacs);//辅助检查(暂用主诉现病史模型,之后会新训练单独模型再做修改)
|
|
}
|
|
}
|
|
if (beHospitalizedDoc.getInitialDiagLabel().isCrfLabel()) {
|
|
if (beHospitalizedDoc.getInitialDiagLabel().isCrfLabel()) {
|
|
- if (StringUtil.isNotBlank(initial_diag_text)) {
|
|
|
|
|
|
+ if (StringUtil.isNotBlank(initial_diag_text) && CatalogueUtil.numberExist(initial_diag_text)) {
|
|
initial_diag_text = CatalogueUtil.removeBetweenWordSpace(initial_diag_text);
|
|
initial_diag_text = CatalogueUtil.removeBetweenWordSpace(initial_diag_text);
|
|
- putContent(crfContent, medicalTextType.get(6), initial_diag_text, Content.initial_diag);//初步诊断
|
|
|
|
}
|
|
}
|
|
|
|
+ putContent(crfContent, medicalTextType.get(6), initial_diag_text, Content.initial_diag);//初步诊断
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(revised_diag_text) && beHospitalizedDoc.getRevisedDiagLabel().isCrfLabel()) {
|
|
if (StringUtils.isNotEmpty(revised_diag_text) && beHospitalizedDoc.getRevisedDiagLabel().isCrfLabel()) {
|
|
//修正诊断
|
|
//修正诊断
|
|
- revised_diag_text = CatalogueUtil.removeBetweenWordSpace(revised_diag_text);
|
|
|
|
|
|
+ if (CatalogueUtil.numberExist(initial_diag_text)) {
|
|
|
|
+ revised_diag_text = CatalogueUtil.removeBetweenWordSpace(revised_diag_text);
|
|
|
|
+ }
|
|
putContent(crfContent, medicalTextType.get(6), revised_diag_text, Content.revised_diag);
|
|
putContent(crfContent, medicalTextType.get(6), revised_diag_text, Content.revised_diag);
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(supple_diag_text) && beHospitalizedDoc.getSuppleDiagLabel().isCrfLabel()) {
|
|
if (StringUtils.isNotEmpty(supple_diag_text) && beHospitalizedDoc.getSuppleDiagLabel().isCrfLabel()) {
|
|
//补充诊断
|
|
//补充诊断
|
|
- supple_diag_text = CatalogueUtil.removeBetweenWordSpace(supple_diag_text);
|
|
|
|
|
|
+ if (CatalogueUtil.numberExist(initial_diag_text)) {
|
|
|
|
+ supple_diag_text = CatalogueUtil.removeBetweenWordSpace(supple_diag_text);
|
|
|
|
+ }
|
|
putContent(crfContent, medicalTextType.get(6), supple_diag_text, Content.supple_diag);
|
|
putContent(crfContent, medicalTextType.get(6), supple_diag_text, Content.supple_diag);
|
|
}
|
|
}
|
|
JSONObject midData = loadAI(crfContent, crfServiceClient);
|
|
JSONObject midData = loadAI(crfContent, crfServiceClient);
|