Parcourir la source

病案首页修修补补

lighter il y a 3 ans
Parent
commit
9fbe292f3c

+ 3 - 10
src/main/java/thyyxxk/webserver/dao/his/casefrontsheet/CaseFrontSheetDao.java

@@ -78,7 +78,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
             "transDept=(select rtrim(name) from zd_unit_code where code=zk_ward)," +
             "dismissDept=(select rtrim(name) from zd_unit_code where code=isnull(isnull(zk_dept,zk_ward),small_dept))," +
             "dismissWard=(select rtrim(name) from zd_unit_code where code=isnull(zk_ward,ward))," +
-            "admissDate=admiss_date, " +
+            "admiss_date, med_type," +
             "dismissDate=(select start_time from yz_act_order where inpatient_no=#{bah} " +
             "and admiss_times=#{times} and status_flag > '1' and isnull (group_no,'00')='00' " +
             "and order_code in ('06025','06026','06027','06053','05973')), " +
@@ -103,14 +103,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
             "lendFlag=isnull(lend_flag, 0), " +
             "balance=(select balance+charge_yb from zy_ledger_file where inpatient_no=#{bah} " +
             "and admiss_times=#{times} and ledger_sn=(select max(ledger_sn) from zy_ledger_file " +
-            "where inpatient_no=#{bah} and admiss_times=#{times}))," +
-            "responceType=rtrim(responce_type), " +
-            "responceTypeName=(select rtrim(name) from zy_zd_responce_type where code=responce_type), " +
-            "ybType=rtrim(yb_type), " +
-            "ybTypeName=(select rtrim(name) from zy_zd_yb_type where code=yb_type " +
-            "and responce_type=zy_actpatient.responce_type), " +
-            "treatType=rtrim(treat_type), " +
-            "treatTypeName=(select rtrim(name) from zd_yb_treat_type where code=treat_type) " +
+            "where inpatient_no=#{bah} and admiss_times=#{times})) " +
             "from zy_actpatient where inpatient_no=#{bah}")
     CaseFrontsheetMain getZyActPatient(@Param("bah") String bah, @Param("times") int times);
 
@@ -127,7 +120,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
             "transDept=(select rtrim(name) from zd_unit_code where code=zk_ward)," +
             "dismissDept=(select rtrim(name) from zd_unit_code where code=isnull(isnull(zk_dept,zk_ward),small_dept))," +
             "dismissWard=(select rtrim(name) from zd_unit_code where code=isnull(zk_ward,ward))," +
-            "admissDate=admiss_date, " +
+            "admiss_date, med_type, " +
             "dismissDate=(select start_time from yz_inact_order where inpatient_no=#{bah} " +
             "and admiss_times=#{times} and status_flag > '1' and isnull (group_no,'00')='00' " +
             "and order_code in ('06025','06026','06027','06053','05973')), " +

+ 2 - 27
src/main/java/thyyxxk/webserver/entity/casefrontsheet/CaseFrontsheetMain.java

@@ -782,34 +782,9 @@ public class CaseFrontsheetMain implements Serializable {
 	private String xxeApgar;
 
 	/**
-	 * 医保身份
+	 * 医疗类别
 	 */
-	private String responceType;
-
-	/**
-	 * 医保身份名称
-	 */
-	private String responceTypeName;
-
-	/**
-	 * 医保类别
-	 */
-	private String ybType;
-
-	/**
-	 * 医保类别名称
-	 */
-	private String ybTypeName;
-
-	/**
-	 * 待遇类别
-	 */
-	private String treatType;
-
-	/**
-	 * 待遇类别名称
-	 */
-	private String treatTypeName;
+	private String medType;
 
 	/**
 	 * 是否有婴儿

+ 1 - 4
src/main/java/thyyxxk/webserver/entity/dictionary/SearchDataParam.java

@@ -12,11 +12,8 @@ public class SearchDataParam {
     private String target;
     @NotBlank(message = "查询内容不能为空")
     private String content;
+    @NotBlank(message = "医疗类别不能为空")
     private String medType;
     private Integer page;
     private boolean accurateSearch = false;
-
-    public String getMedType() {
-        return null == medType ? "" : medType;
-    }
 }

+ 4 - 3
src/main/java/thyyxxk/webserver/service/casefrontsheet/CaseFrontSheetService.java

@@ -170,8 +170,6 @@ public class CaseFrontSheetService {
         ret.setList(list);
         return ResultVoUtil.success(ret);
     }
-
-
     public ResultVo<CaseFrontsheetMain> getPatientInfo(String bah, Integer times, Integer flag) {
         log.info("病案首页获取病人信息>>> 住院号:{},住院次数:{},在院状态:{}", bah, times, flag);
         CaseFrontsheetMain sheet = dao.getAPatientMi(bah);
@@ -193,7 +191,7 @@ public class CaseFrontSheetService {
         CaseFrontsheetMain sheet3 = dao.getBatjBa1(bah, times);
         if (sheet3 == null) {
             if (dao.isBatjBa1Exist(bah, times) == 0) {
-                dao.createBatjBa1(bah, times, sheet1.getName(), sheet1.getAdmissDate(),
+                dao.createBatjBa1(bah, times, sheet.getName(), sheet2.getAdmissDate(),
                         sheet2.getAdmissDept(), sheet2.getAdmissWard());
                 log.info("insert batjBa1>>> " + bah + ", " + times);
             }
@@ -309,6 +307,9 @@ public class CaseFrontSheetService {
                     if (StringUtil.isBlank(item.getCode())) {
                         break;
                     }
+                    if (null == item.getDate()) {
+                        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "手术日期不能为空!");
+                    }
                     item.setNo(i + 1);
                     item.setBah(bah);
                     item.setTimes(times);

+ 2 - 9
src/main/java/thyyxxk/webserver/service/casefrontsheet/SheetSearchService.java

@@ -43,8 +43,8 @@ public class SheetSearchService {
                 return ResultVoUtil.success(searchHurtReason(param.getMethod(), content, param.getPage() - 1));
             case "employee":
                 return ResultVoUtil.success(searchEmployee(param.getMethod(), content, param.getPage() - 1));
-            case "ybDiag":
-                return searchYbDiag(param);
+            case "diag":
+                return service.searchYbDiag(param);
             default:
                 return ResultVoUtil.success(new ArrayList<>());
         }
@@ -128,11 +128,4 @@ public class SheetSearchService {
         }
     }
 
-    private ResultVo<List<PureCodeName>> searchYbDiag(SearchDataParam param) {
-        List<PureCodeName> list = service.executeSearch(param).getData();
-        int start = (param.getPage() - 1) * 10;
-        int end = (param.getPage() - 1) * 10 + 10;
-        return ResultVoUtil.success(list.subList(start, Math.min(list.size(), end)));
-    }
-
 }

+ 2 - 2
src/main/java/thyyxxk/webserver/service/casefrontsheet/VerifyCaseFrontSheet.java

@@ -260,7 +260,7 @@ public class VerifyCaseFrontSheet {
                 }
             }
         }
-        if (StringUtil.notBlank(info.getHasSurgery())  && "0".equals(info.getHasSurgery()) && "0".equals(info.getDiagConform3())) {
+        if (StringUtil.notBlank(info.getHasSurgery())  && "0".equals(info.getHasSurgery()) && !"0".equals(info.getDiagConform3())) {
             sb.append("无手术时,诊断符合情况中的术前与术后需要为【未做】!");
         }
         if (StringUtil.notBlank(info.getHasSurgery())) {
@@ -470,7 +470,7 @@ public class VerifyCaseFrontSheet {
 
     public Integer betweenDays(Date date1, Date date2) {
         if (null == date1 || null == date2) {
-            return null;
+            return -1;
         }
         return (int) ((date1.getTime() - date2.getTime()) / (1000L * 3600L * 24L));
     }