Browse Source

代码优化

zhoutg 4 years ago
parent
commit
c5d44e84be
1 changed files with 9 additions and 9 deletions
  1. 9 9
      src/main/java/com/diagbot/model/ai/BeHospitalizedAI.java

+ 9 - 9
src/main/java/com/diagbot/model/ai/BeHospitalizedAI.java

@@ -211,39 +211,39 @@ public class BeHospitalizedAI extends ModelAI {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "调用CRF模型出错!" + e.getMessage());
             }
             /* 处理主诉 */
-            if (wordCrfDTO.getChiefLabel() != null ) {
+            if (StringUtil.isNotBlank(wordCrfDTO.getChiefLabel().getText())) {
                 putChiefCrfData(midData.getJSONObject(Content.chief), wordCrfDTO);
             }
             /* 处理现病史 */
-            if (wordCrfDTO.getPresentLabel() != null ) {
+            if (StringUtil.isNotBlank(wordCrfDTO.getPresentLabel().getText()) ) {
                 putPresentCrfData(midData.getJSONObject(Content.present), wordCrfDTO);
             }
             /* 处理既往史 */
-            if (wordCrfDTO.getPastLabel() != null) {
+            if (StringUtil.isNotBlank(wordCrfDTO.getPastLabel().getText())) {
                 putPastCrfData(midData.getJSONObject(Content.past), wordCrfDTO);
             }
             /* 处理个人史 */
-            if (wordCrfDTO.getPersonalLabel() != null) {
+            if (StringUtil.isNotBlank(wordCrfDTO.getPersonalLabel().getText())) {
                 putPersonalCrfData(midData.getJSONObject(Content.personal), wordCrfDTO);
             }
             /* 处理月经史 */
-            if (wordCrfDTO.getMenstrualLabel() != null) {
+            if (StringUtil.isNotBlank(wordCrfDTO.getMenstrualLabel().getText())) {
                 putMensesCrfData(midData.getJSONObject(Content.menses), wordCrfDTO);
             }
             /* 处理家族史 */
-            if (wordCrfDTO.getFamilyLabel() != null) {
+            if (StringUtil.isNotBlank(wordCrfDTO.getFamilyLabel().getText())) {
                 putFamilyCrfData(midData.getJSONObject(Content.family), wordCrfDTO);
             }
             /* 处理婚育史 */
-            if (wordCrfDTO.getMaritalLabel() != null ) {
+            if (StringUtil.isNotBlank(wordCrfDTO.getMaritalLabel().getText())) {
                 putMaritalCrfData(midData.getJSONObject(Content.marriage), wordCrfDTO);
             }
              //处理初步诊断
-            if (wordCrfDTO.getDiagLabel() != null) {
+            if (StringUtil.isNotBlank(wordCrfDTO.getDiagLabel().getText())) {
                 putInitialDiagCrfData(midData.getJSONObject(Content.initial_diag), wordCrfDTO);
             }
             // 查体数据
-            if (wordCrfDTO.getVitalLabel() != null) {
+            if (StringUtil.isNotBlank(wordCrfDTO.getVitalLabel().getText())) {
                 putInitialVitalCrfData(midData.getJSONObject(Content.phys_exam), wordCrfDTO);
             }
              /*//处理修正诊断