|
@@ -2,7 +2,6 @@ package thyyxxk.simzfeeoprnsystm.dao;
|
|
|
|
|
|
import thyyxxk.simzfeeoprnsystm.pojo.*;
|
|
|
import org.apache.ibatis.annotations.*;
|
|
|
-import thyyxxk.simzfeeoprnsystm.pojo.mobilepay.*;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
@@ -10,25 +9,19 @@ import java.util.List;
|
|
|
@Mapper
|
|
|
public interface SiMzDao {
|
|
|
@Select("select count(1) from t_si_pat_info where pat_no=#{patNo} and times=#{times}")
|
|
|
- int selectExistCount(@Param("patNo") String patNo,
|
|
|
- @Param("times") int times);
|
|
|
+ int selectExistCount(String patNo, int times);
|
|
|
|
|
|
@Update("update t_si_pat_info set times=#{times} where pat_no=#{patNo} and times=-1")
|
|
|
- int updateMzTimes(@Param("patNo") String patNo,
|
|
|
- @Param("times") int times);
|
|
|
+ int updateMzTimes(String patNo, int times);
|
|
|
|
|
|
@Delete("delete from t_si_pat_info where pat_no=#{patNo} and times=-1")
|
|
|
- void deleteTempPatinfo(@Param("patNo") String patNo,
|
|
|
- @Param("times") int times);
|
|
|
+ void deleteTempPatinfo(String patNo, int times);
|
|
|
|
|
|
@Select("select * from t_si_pat_info where pat_no=#{patNo} and times=#{times}")
|
|
|
- SiPatInfo selectSiPatInfoForMz(@Param("patNo") String patNo,
|
|
|
- @Param("times") int times);
|
|
|
+ SiPatInfo selectSiPatInfoForMz(String patNo, int times);
|
|
|
|
|
|
@Update("update t_si_pat_info set mdtrt_id=#{nullCtnt}, setl_id=#{nullCtnt} where pat_no=#{patientId} and times=#{times} ")
|
|
|
- void clearMdtrtIdForMz(@Param("patientId") String patientId,
|
|
|
- @Param("times") int times,
|
|
|
- @Param("nullCtnt") String nullCtnt);
|
|
|
+ void clearMdtrtIdForMz(String patientId, int times, String nullCtnt);
|
|
|
|
|
|
@Select("select a.psn_no, mdtrtCertType='02',b.visit_date as begntime, " +
|
|
|
"a.certno as mdtrtCertNo,a.psn_cert_type,a.certno,a.psn_name, " +
|
|
@@ -40,16 +33,14 @@ public interface SiMzDao {
|
|
|
"(select t.si_caty from zd_unit_code t where t.code=b.visit_dept_code)) " +
|
|
|
"from t_si_pat_info a, mz_visit_table b where a.pat_no=#{patNo} and a.times=#{times} " +
|
|
|
"and a.pat_no=b.patient_id and a.times=b.times")
|
|
|
- Regstrtn selectRegstrtn(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ Regstrtn selectRegstrtn(String patNo, int times);
|
|
|
|
|
|
@Select("select times from mz_patient_mi where patient_id=#{patientId} ")
|
|
|
- Integer selectMaxTimes(@Param("patientId") String patientId);
|
|
|
+ Integer selectMaxTimes(String patientId);
|
|
|
|
|
|
@Select("select insuplc_admdvs from t_si_pat_info where " +
|
|
|
"pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
- String selectAdmdvs(@Param("patNo") String patNo,
|
|
|
- @Param("times") int times,
|
|
|
- @Param("ledgerSn") int ledgerSn);
|
|
|
+ String selectAdmdvs(String patNo, int times, int ledgerSn);
|
|
|
|
|
|
@Update("update t_si_pat_info set insuplc_admdvs=#{insuplcAdmdvs},psn_type=#{psnType},emp_name=#{empName}," +
|
|
|
"mdtrt_id=#{mdtrtId},insutype=#{insutype},visit_datetime=#{visitDate},balc=#{balc} " +
|
|
@@ -57,7 +48,7 @@ public interface SiMzDao {
|
|
|
void afterRegistrtn(MzPatientInfo p);
|
|
|
|
|
|
@Update("update t_si_pat_info set med_type=#{medtype} where pat_no=#{patNo} and times=#{times}")
|
|
|
- void updateMedtype(@Param("medtype") String medtype, @Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ void updateMedtype(String medtype, String patNo, int times);
|
|
|
|
|
|
@Select("select feedetlSn=(patient_id + '_' + cast(times as varchar) + '_' + cast(receipt_no as varchar) + '_' + " +
|
|
|
"cast(order_no as varchar) + '_' + cast(item_no as varchar)), " +
|
|
@@ -71,27 +62,22 @@ public interface SiMzDao {
|
|
|
"ordersDrCode=(select rtrim(yb_code) from a_employee_mi where code=input_staff), " +
|
|
|
"input_man as bilgDrName,input_man as ordersDrName " +
|
|
|
"from t_mt_receipt where patient_id=#{patNo} and times=#{times} and yb_trans_flag=0 ")
|
|
|
- List<FeeDetail> selectOutpatientFees(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ List<FeeDetail> selectOutpatientFees(String patNo, int times);
|
|
|
|
|
|
@Update("update t_mt_receipt set yb_trans_flag=1,chrgitm_lv=#{chrgLv},med_chrgitm_type=#{chrgType} where " +
|
|
|
"patient_id=#{patNo} and times=#{times} and receipt_no=#{recNo} and order_no=#{odrNo} and item_no=#{itmNo}")
|
|
|
- void afterUploadFees(@Param("patNo") String patNo,
|
|
|
- @Param("times") int times,
|
|
|
- @Param("recNo") int recNo,
|
|
|
- @Param("odrNo") int odrNo,
|
|
|
- @Param("itmNo") int itmNo,
|
|
|
- @Param("chrgLv") String chrgLv,
|
|
|
- @Param("chrgType") String chrgType);
|
|
|
+ void afterUploadFees(String patNo, int times, int recNo, int odrNo,
|
|
|
+ int itmNo, String chrgLv, String chrgType);
|
|
|
|
|
|
@Update("update t_mt_receipt set yb_trans_flag=0 where patient_id=#{patNo} and times=#{times}")
|
|
|
- void afterRevokeFees(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ void afterRevokeFees(String patNo, int times);
|
|
|
|
|
|
@Select("select psn_no,insuplc_admdvs,mdtrtCertType='02',certno as mdtrtCertNo,certno, " +
|
|
|
"psn_cert_type,psn_type,psn_name,med_type,mdtrt_id,insutype, " +
|
|
|
"medfeeSumamt=(select sum(t.charge_fee) from t_mt_receipt t where " +
|
|
|
"t.patient_id=#{patNo} and t.times=#{times}) " +
|
|
|
"from t_si_pat_info where pat_no=#{patNo} and times=#{times}")
|
|
|
- MzPreSetlmt selectPreSetlmt(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ MzPreSetlmt selectPreSetlmt(String patNo, int times);
|
|
|
|
|
|
@Select("select diagType='1', " +
|
|
|
"diagSrtNo=1, " +
|
|
@@ -103,18 +89,17 @@ public interface SiMzDao {
|
|
|
"visit_date as diagTime, " +
|
|
|
"valiFlag='1' " +
|
|
|
"from mz_visit_table where patient_id=#{patNo} and times=#{times}")
|
|
|
- Diagnoses selectDiseinfo(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ Diagnoses selectDiseinfo(String patNo, int times);
|
|
|
|
|
|
@Update("update t_si_pat_info set dise_code=#{code},dise_name=#{name} where pat_no=#{patNo} and times=#{times}")
|
|
|
- void updatePatDiseinfo(@Param("patNo") String patNo, @Param("times") int times,
|
|
|
- @Param("code") String code, @Param("name") String name);
|
|
|
+ void updatePatDiseinfo(String patNo, int times, String code, String name);
|
|
|
|
|
|
@Update("update t_si_pat_info set fulamt_ownpay_amt=#{fulamtOwnpayAmt}, overlmt_amt=#{overlmtAmt}, " +
|
|
|
"preselfpay_amt=#{preselfpayAmt}, inscp_scp_amt=#{inscpScpAmt} where pat_no=#{patNo} and times=#{times}")
|
|
|
void updateSortOfAmt(SiPatInfo patInfo);
|
|
|
|
|
|
@Select("select top 1 * from t_si_setlinfo where pat_no=#{patNo} and times=#{times} and revoked=#{revoked} order by setl_time desc")
|
|
|
- SiSetlinfo selectSettledInfo(@Param("patNo") String patNo, @Param("times") int times, @Param("revoked") int revoked);
|
|
|
+ SiSetlinfo selectSettledInfo(String patNo, int times, int revoked);
|
|
|
|
|
|
@Select("select psn_no,certno as mdtrtCertNo,mdtrtCertType='02', " +
|
|
|
"psn_cert_type,certno,med_type,insuplc_admdvs, " +
|
|
@@ -122,51 +107,49 @@ public interface SiMzDao {
|
|
|
"mdtrt_id,insutype,fulamt_ownpay_amt,overlmt_amt as overlmtSelfpay, " +
|
|
|
"preselfpay_amt,inscp_scp_amt " +
|
|
|
"from t_si_pat_info where pat_no=#{patNo} and times=#{times}")
|
|
|
- Setlmt selectSetlmt(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ Setlmt selectSetlmt(String patNo, int times);
|
|
|
|
|
|
@Update("update t_si_setlinfo set revoked=1,mz_saved=0 where pat_no=#{patNo} and times=#{times}")
|
|
|
- void deleteSetlInfo(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ void deleteSetlInfo(String patNo, int times);
|
|
|
|
|
|
@Update("delete from t_si_setldetail where pat_no=#{patNo} and times=#{times}")
|
|
|
- void deleteSetlDetail(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ void deleteSetlDetail(String patNo, int times);
|
|
|
|
|
|
@Update("update t_si_pat_info set rvk_setl_msgid=#{rvkSetlMsgid} where pat_no=#{patNo} and times=#{times}")
|
|
|
- void updateRvkSetlMsgid(@Param("patNo") String patNo, @Param("times") int times, @Param("rvkSetlMsgid") String rvkSetlMsgid);
|
|
|
+ void updateRvkSetlMsgid(String patNo, int times, String rvkSetlMsgid);
|
|
|
|
|
|
@Select("select a.diag_srt_no,a.diag_type,a.diag_code,a.diag_name,a.diag_dept, " +
|
|
|
"a.dise_dor_name,a.diag_time,a.vali_flag,dise_dor_no=rtrim(b.yb_code) " +
|
|
|
"from t_si_mz_diag a, a_employee_mi b where pat_no=#{patNo} and times=#{times} and a.dise_dor_no=b.code")
|
|
|
- List<Diagnoses> selectMzDiags(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ List<Diagnoses> selectMzDiags(String patNo, int times);
|
|
|
|
|
|
@Select("select icd_code_new from mz_visit_table where patient_id=#{patNo} and times=#{times}")
|
|
|
- String selectIcdCodeNew(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ String selectIcdCodeNew(String patNo, int times);
|
|
|
|
|
|
@Select("select top 1 rtrim(yb_name) from zd_icd_code_new where yb_code=#{code}")
|
|
|
- String selectIcdTextNew(@Param("code") String code);
|
|
|
+ String selectIcdTextNew(String code);
|
|
|
|
|
|
@Select("select visit_date from mz_visit_table with(nolock) where patient_id=#{patNo} and times=#{times} ")
|
|
|
- Date selectBegntime(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ Date selectBegntime(String patNo, int times);
|
|
|
|
|
|
@Delete("delete from t_mt_receipt where patient_id=#{patNo} and times=#{times}")
|
|
|
- void deleteAllReceipts(@Param("patNo") String patNo,
|
|
|
- @Param("times") Integer times);
|
|
|
+ void deleteAllReceipts(String patNo, int times);
|
|
|
|
|
|
@Select("select b.si_caty as visitDeptCode,rtrim(c.name) as visitDeptName " +
|
|
|
"from mz_visit_table a, zd_unit_code b, t_yb_dept c where " +
|
|
|
"a.patient_id=#{patNo} and a.times=#{times} and a.visit_dept_code=b.code " +
|
|
|
"and b.si_caty=c.code")
|
|
|
- MzVisit selectMzVisitInfo(@Param("patNo") String patNo,
|
|
|
- @Param("times") Integer times);
|
|
|
+ MzVisit selectMzVisitInfo(String patNo, int times);
|
|
|
|
|
|
@Select("select rtrim(dept_code) from a_employee_mi where code=#{code} and isnull(del_flag, '0')!='1'")
|
|
|
- String selectStaffDepartment(@Param("code") String code);
|
|
|
+ String selectStaffDepartment(String code);
|
|
|
|
|
|
@Select("select his_item_code from t_mt_receipt where patient_id=#{patNo} and times=#{times}")
|
|
|
- List<String> selectHisChargeCodes(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ List<String> selectHisChargeCodes(String patNo, int times);
|
|
|
|
|
|
@Select("select acct_pay from t_si_presetlinfo where mdtrt_id=#{mdtrtId}")
|
|
|
- Double selectAcctPayInPreSettle(@Param("mdtrtId") String mdtrtId);
|
|
|
+ Double selectAcctPayInPreSettle(String mdtrtId);
|
|
|
|
|
|
@Select("select rtrim(social_no) from mz_patient_mi where patient_id=#{patNo}")
|
|
|
- String selectSocialNo(@Param("patNo") String patNo);
|
|
|
+ String selectSocialNo(String patNo);
|
|
|
}
|