Przeglądaj źródła

根据31天再入院报表获取患者年龄

chengyao 4 lat temu
rodzic
commit
62ec2d7911

+ 2 - 0
src/main/java/com/diagbot/dto/ReBeHosDetailDTO.java

@@ -67,4 +67,6 @@ public class ReBeHosDetailDTO {
     @Excel(name = "住院费用", width = 15, orderNum = "9")
     private String totleFee;
 
+    private String age;
+
 }

+ 2 - 0
src/main/java/com/diagbot/dto/ReBeHosMergeDTO.java

@@ -43,6 +43,8 @@ public class ReBeHosMergeDTO {
     private String totleFee;
     private String behospitalDayNum;
     private String againBehospitalPlan;//31天再入院计划(是/否)
+    private String age;//年龄
+    private String lastAge;//年龄
     private String lastTotleFee;
     private String lastBehospitalDayNum;
     private String lastAgainBehospitalPlan;//31天再入院计划(是/否)

+ 2 - 2
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -238,8 +238,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历已删除!");
             }
             BeanUtil.copyProperties(behospitalInfo, behosDTO);
-            if(null != homePage){
-                behosDTO.setAge(homePage.getAge());
+            if(null != homePage && StringUtils.isNotEmpty(homePage.getAge()) && StringUtils.isNotEmpty(homePage.getAgeUnit())){
+                behosDTO.setAge(homePage.getAge()+homePage.getAgeUnit());
             }
             res.put("beHospital", behosDTO);
         }

+ 1 - 0
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -3017,6 +3017,7 @@ public class ConsoleFacade {
                 details.add(detailRecord);
                 ReBeHosDetailDTO lastDetailRecord = new ReBeHosDetailDTO();
                 lastDetailRecord.setName(record.getName());
+                lastDetailRecord.setAge(record.getLastAge());
                 lastDetailRecord.setBehDeptId(record.getLastBehDeptId());
                 lastDetailRecord.setBehDeptName(record.getLastBehDeptName());
                 lastDetailRecord.setBehospitalCode(record.getLastBehospitalCode());

+ 2 - 0
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -13959,7 +13959,9 @@
         mhp.total_fee AS totleFee,
         mhp.behospital_day_num AS behospitalDayNum,
         mhp.again_behospital_plan AS againBehospitalPlan,
+        IF(mhp.age is null, null,CONCAT( ifnull(mhp.age,'') ,ifnull(mhp.age_unit,'') ))as age,
         mhp_last.again_behospital_plan AS lastAgainBehospitalPlan,
+        IF(mhp_last.age is null, null,CONCAT( ifnull(mhp_last.age,'') ,ifnull(mhp_last.age_unit,'') ))as lastAge,
         mhp_last.total_fee AS lastTotleFee,
         mhp_last.behospital_day_num AS lastBehospitalDayNum
         FROM