Procházet zdrojové kódy

CRF处理修改bug:空指针

hujing před 5 roky
rodič
revize
644d21776d

+ 15 - 0
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/FirstCourseRecordAI.java

@@ -113,6 +113,9 @@ public class FirstCourseRecordAI extends ModelAI {
     public void putCaseCharacteristicCrfData(JSONObject jsonObject, InputInfo inputInfo) {
         JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
         //使用现病史结构来处理病历特点
+        if (aiOut == null) {
+            return;
+        }
         EntityProcessClinic entityProcessClinic = new EntityProcessClinic();
         PresentLabel presentLabel = entityProcessClinic.extractEntity(aiOut);
         //临床表现
@@ -138,6 +141,9 @@ public class FirstCourseRecordAI extends ModelAI {
      */
     public void putInitialDiagCrfData(JSONObject jsonObject, InputInfo inputInfo) {
         JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
+        if (aiOut == null) {
+            return;
+        }
         //诊断信息
         EntityProcessDiag entityProcessDiag = new EntityProcessDiag();
         List<Diag> diags = entityProcessDiag.extractEntity(aiOut);
@@ -152,6 +158,9 @@ public class FirstCourseRecordAI extends ModelAI {
      */
     public void putDiagnosisCrfData(JSONObject jsonObject, InputInfo inputInfo) {
         JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
+        if (aiOut == null) {
+            return;
+        }
         //使用现病史结构来处理诊断依据
         EntityProcessClinic entityProcessClinic = new EntityProcessClinic();
         PresentLabel presentLabel = entityProcessClinic.extractEntity(aiOut);
@@ -167,6 +176,9 @@ public class FirstCourseRecordAI extends ModelAI {
      */
     public void putDifferentialDiagCrfData(JSONObject jsonObject, InputInfo inputInfo) {
         JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
+        if (aiOut == null) {
+            return;
+        }
         //诊断信息
         EntityProcessDiag entityProcessDiag = new EntityProcessDiag();
         List<Diag> diags = entityProcessDiag.extractEntity(aiOut);
@@ -181,6 +193,9 @@ public class FirstCourseRecordAI extends ModelAI {
      */
     public void putTreatPlanCrfData(JSONObject jsonObject, InputInfo inputInfo) {
         JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
+        if (aiOut == null) {
+            return;
+        }
         //诊疗计划
         EntityProcessTreatPlan entityProcessTreatPlan = new EntityProcessTreatPlan();
         TreatPlanLabel treatPlanLabel = entityProcessTreatPlan.extractEntity(aiOut);

+ 3 - 0
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/LeaveHospitalAI.java

@@ -69,6 +69,9 @@ public class LeaveHospitalAI extends ModelAI {
      */
     public void putDischargeCrfData(JSONObject jsonObject, InputInfo inputInfo) {
         JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
+        if (aiOut == null) {
+            return;
+        }
         //使用现病史结构来处理病历特点
         EntityProcessLeaveHospital entityProcessLeaveHospital = new EntityProcessLeaveHospital();
         LeaveHospitalLabel leaveHospitalLabel = entityProcessLeaveHospital.extractEntity(aiOut);

+ 3 - 0
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/OperationAI.java

@@ -59,6 +59,9 @@ public class OperationAI extends ModelAI {
      */
     public void putOperationDiscussionCrfData(JSONObject jsonObject, InputInfo inputInfo) {
         JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
+        if (aiOut == null) {
+            return;
+        }
         String originalText = jsonObject.getString("originalText");
         //使用现病史结构来处理病历特点
         EntityProcessOperationDiscussion entityProcessOperationDiscussion = new EntityProcessOperationDiscussion();

+ 3 - 0
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/ThreeLevelWardAI.java

@@ -138,6 +138,9 @@ public class ThreeLevelWardAI extends ModelAI {
      */
     public void putWardRoundCrfData(JSONObject jsonObject, InputInfo inputInfo, int serious) {
         JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
+        if (aiOut == null) {
+            return;
+        }
         String wardDate = jsonObject.getString("wardDate");
         String detailTitle = jsonObject.getString("detail_title");
         //使用现病史结构来处理病历特点