LIJU 1 month ago
parent
commit
8b4d5bc372

+ 11 - 0
src/main/java/thyyxxk/webserver/dao/his/inpatient/PatientDao.java

@@ -364,4 +364,15 @@ public interface PatientDao {
     @Select("select insuplc_admdvs from t_si_pat_info where pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn}")
     String selectInsuplcAdmdvs(@Param("patNo") String patNo, @Param("times") Integer times, @Param("ledgerSn") Integer ledgerSn);
 
+    /**
+     * 查询患者的取消入院登记次数
+     *
+     * @param patNo 住院号
+     * @param times 住院次数
+     * @param ledgerSn 账页号
+     * @return 取消入院登记次数
+     */
+    @Select("select cance_admiss_count from t_si_pat_info where pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn}")
+    String selectCanceAdmissCount(@Param("patNo") String patNo, @Param("times") Integer times, @Param("ledgerSn") Integer ledgerSn);
+
 }

+ 1 - 0
src/main/java/thyyxxk/webserver/entity/inpatient/patient/Patient.java

@@ -208,6 +208,7 @@ public class Patient {
      * 医保参保地行政区划
      */
     private String insuplcAdmdvs;
+    private String canceAdmissCount;
 
     public String getSexName() {
         if (sex == null) {

+ 3 - 0
src/main/java/thyyxxk/webserver/service/inpatient/PatientService.java

@@ -79,6 +79,9 @@ public class PatientService {
         Integer ledgerSn = data.getLedgerSn() != null ? data.getLedgerSn() : 0;
         String insuplcAdmdvs = dao.selectInsuplcAdmdvs(data.getInpatientNo(), data.getAdmissTimes(), ledgerSn);
         data.setInsuplcAdmdvs(insuplcAdmdvs);
+        // 新增:查取消入院登记次数
+        String canceAdmissCount = dao.selectCanceAdmissCount(data.getInpatientNo(), data.getAdmissTimes(), ledgerSn);
+        data.setCanceAdmissCount(canceAdmissCount);
         if (null != data.getAdmdvs()) {
             Integer parentRegion = dao.selectParentRegion(data.getAdmdvs());
             if (null != parentRegion) {