소스 검색

MedType添加一个GCP试验,以及其相关调整

lighter 1 년 전
부모
커밋
0bafdb67f1

+ 2 - 0
src/main/java/thyyxxk/webserver/constants/sidicts/MedType.java

@@ -13,6 +13,8 @@ public enum MedType {
 
     SELF_PAY("01", "自费", "hospitalization", "01"),
 
+    GCP_EXPERIMENT("011", "GCP实验", "hospitalization", "a0"),
+
     GENERAL_CLINIC("11", "普通门诊", "clinic", "aa"),
 
     EMERGENCY_TREATMENT("13", "急诊", "clinic", "ab"),

+ 7 - 11
src/main/java/thyyxxk/webserver/dao/his/inpatient/DismissDao.java

@@ -190,8 +190,8 @@ public interface DismissDao {
 
     @Update("update zy_ledger_file set account_date=#{zjdzDatetime},settle_type='1',balance=0,dept_code=#{deptCode}," +
             "last_balance=total_charge,settle=deposit-total_charge,ward_code=#{wardCode},op_id_code=#{staffId}," +
-            "responce_type='01',charge_yb=0,fund_pay_sumamt=0,acct_pay=0 from zy_ledger_file " +
-            "where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn}")
+            "charge_yb=0,fund_pay_sumamt=0,acct_pay=0 from zy_ledger_file where " +
+            "inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn}")
     int updateZifeiCostStatus(MedinsSettleFee settleFee);
 
     @Update("update zy_ledger_file set account_date=#{zjdzDatetime},settle_type='1',balance=0,last_balance=#{xjzf}, " +
@@ -322,8 +322,8 @@ public interface DismissDao {
                             @Param("lastSn") int lastSn,
                             @Param("zjdzDate") Date zjdzDate);
 
-    @Update("update zy_actpatient set responce_type='01', visit_type='01', yb_type='', treat_type=''," +
-            "yb_register_date=#{date} where inpatient_no=#{patNo} and admiss_times=#{times}")
+    @Update("update zy_actpatient set yb_register_date=#{date} " +
+            "where inpatient_no=#{patNo} and admiss_times=#{times}")
     void clearMedinsInfo(@Param("patNo") String patNo, @Param("times") Integer times, @Param("date") Date date);
 
     @Select("select rtrim(hic_no_new) from a_patient_mi where inpatient_no=#{zyh}")
@@ -379,11 +379,8 @@ public interface DismissDao {
     @Select("select code from zy_bill_item")
     List<String> selectBillCodes();
 
-    @Select("select code from zy_zd_responce_type where med_type=(select med_type from t_si_pat_info " +
-            "where pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn} and isnull(mdtrt_id,'')!='')")
-    String selectResponceType(@Param("patNo") String patNo,
-                              @Param("times") int times,
-                              @Param("ledgerSn") int ledgerSn);
+    @Select("select responce_type from zy_actpatient where inpatient_no=#{patNo} ")
+    String selectResponceType(@Param("patNo") String patNo);
 
     @Select("select cast(isnull(sum(depo_amount),0) as varchar(16)) from zy_deposit_file where " +
             "inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn} and " +
@@ -408,7 +405,7 @@ public interface DismissDao {
                                    @Param("restype") String restype,
                                    @Param("map") Map<String, String> map);
 
-    @Update("update zy_actpatient set balance=#{balance},responce_type=#{restype}, total_charge=#{totalCost}, " +
+    @Update("update zy_actpatient set balance=#{balance}, total_charge=#{totalCost}, " +
             "charge1=#{map.001},charge2=#{map.002}, charge3=#{map.003},charge4=#{map.004},charge5=#{map.005}, " +
             "charge6=#{map.006},charge7=#{map.007}, charge8=#{map.008},charge9=#{map.009},charge10=#{map.010}, " +
             "charge11=#{map.011},charge12=#{map.012}, charge13=#{map.013},charge14=#{map.014},charge15=#{map.015}, " +
@@ -418,7 +415,6 @@ public interface DismissDao {
     void updateZyActpatientCharges(@Param("patNo") String patNo,
                                    @Param("totalCost") String totalCost,
                                    @Param("balance") String balance,
-                                   @Param("restype") String restype,
                                    @Param("map") Map<String, String> map);
 
     @Select("select isnull(sum(charge_fee),0) from zy_detail_charge where inpatient_no=#{patNo} " +

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiManageDao.java

@@ -104,7 +104,7 @@ public interface SiManageDao {
             "admiss_doctor,admiss_doctor_name,duty_nurse,duty_nurse_name,coder,coder_name,quality_control_doctor, " +
             "quality_control_doctor_name,quality_control_nurse,quality_control_nurse_name " +
             "from t_case_frontsheet_main where dismiss_date &gt;= #{begin} " +
-            "and dismiss_date &lt;= #{end} and isnull(med_type,'01') not in ('01','42') " +
+            "and dismiss_date &lt;= #{end} and isnull(med_type,'01') not in ('01','011','42') " +
             "<if test=\"status != -1 \">" +
             "and uploaded_flag=#{status} " +
             "</if> " +

+ 2 - 13
src/main/java/thyyxxk/webserver/service/inpatient/DismissService.java

@@ -395,8 +395,6 @@ public class DismissService {
                 exception.setMessage("写医保结算表失败。");
                 throw new BizException(exception);
             }
-        } else {
-            dao.clearMedinsInfo(settleFee.getInpatientNo(), settleFee.getAdmissTimes(), null);
         }
         if (writeReceiptTable(settleFee) < 1) {
             ExceptionEnum exception = ExceptionEnum.LOGICAL_ERROR;
@@ -464,16 +462,7 @@ public class DismissService {
             adultMap.replace("total", DecimalUtil.add(adultMap.get("total"), fee.getAdultFee()));
 
         }
-        String restype = dao.selectResponceType(patNo, times, ledgerSn);
-        if (StringUtil.isBlank(restype)) {
-            restype = "01";
-        }
-        if (restype.equals("01")) {
-            String injurySerialNo = dao.selectInjurySerialNo(patNo, times, ledgerSn);
-            if (StringUtil.notBlank(injurySerialNo)) {
-                restype = "al";
-            }
-        }
+        String restype = dao.selectResponceType(patNo);
         String deposit = dao.selectDepositSumamt(patNo, times, ledgerSn);
         if (StringUtil.isBlank(deposit)) {
             deposit = "0";
@@ -488,7 +477,7 @@ public class DismissService {
             entity.setInfant(infantMap);
         }
         String totalCost = dao.selectTotalCharge(patNo, times);
-        dao.updateZyActpatientCharges(patNo, totalCost, balance, restype, ledgerMap);
+        dao.updateZyActpatientCharges(patNo, totalCost, balance, ledgerMap);
         entity.setAdult(adultMap);
         return entity;
     }

+ 1 - 1
src/main/java/thyyxxk/webserver/service/medicaladvice/patientinfo/AdjustBedService.java

@@ -184,7 +184,7 @@ public class AdjustBedService {
         map.put("data", list);
         map.put("bedTotal", list.size());
         long yzBedTotal = list.stream().filter(o -> StrUtil.isNotBlank(o.getInpatientNo())).count();
-        long ybTotal = list.stream().filter(o -> StrUtil.isNotBlank(o.getInpatientNo()) && !"01".equals(o.getResponceType())).count();
+        long ybTotal = list.stream().filter(o -> StrUtil.isNotBlank(o.getInpatientNo()) && !"01".equals(o.getResponceType()) && !"011".equals(o.getResponceType())).count();
         map.put("yzBedTotal", yzBedTotal);
         map.put("ybTotal", ybTotal);
         return map;

+ 2 - 1
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiZyService.java

@@ -248,7 +248,8 @@ public class SiZyService {
 
     private boolean invalidMultipleUploadPatient(String medtype) {
         MedType medType = MedType.get(medtype);
-        return null == medType || medType == MedType.INJURY_HOSPITALIZATION || medType == MedType.SELF_PAY;
+        return null == medType || medType == MedType.INJURY_HOSPITALIZATION
+                || medType == MedType.SELF_PAY || medType == MedType.GCP_EXPERIMENT;
     }
 
     public ResultVo<String> hospitalizationPreSettlement(ZyPatientInfo p) {