|
@@ -6,7 +6,6 @@ import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyPatientInfo;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.inpatient.*;
|
|
|
|
|
|
import java.util.Date;
|
|
|
-import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -90,103 +89,6 @@ public interface SiZyDao {
|
|
|
Integer selectMaxLedgerSn(@Param("inpatientNo") String inpatientNo,
|
|
|
@Param("admissTimes") int admissTimes);
|
|
|
|
|
|
- /**
|
|
|
- * HIS费用接收重算
|
|
|
- *
|
|
|
- * @param inpatientNo 住院号
|
|
|
- * @param admissTimes 住院次数
|
|
|
- * @param ledgerSn 账页号
|
|
|
- */
|
|
|
- @Update("EXEC zy_calc_balance #{inpatientNo}, #{admissTimes}, #{ledgerSn}")
|
|
|
- void hisRecount(@Param("inpatientNo") String inpatientNo,
|
|
|
- @Param("admissTimes") int admissTimes,
|
|
|
- @Param("ledgerSn") int ledgerSn);
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取未上传至医保中心的收费费用明细
|
|
|
- *
|
|
|
- * @param inpatientNo 住院号
|
|
|
- * @param admissTimes 住院次数
|
|
|
- * @param ledgerSn 账页号
|
|
|
- * @return 费用明细
|
|
|
- */
|
|
|
- @Select("select detail_sn as feedetlSn, " +
|
|
|
- "order_no as drordNo, " +
|
|
|
- "initFeedetlSn=case when ori_detail_sn=-1 then null else ori_detail_sn end, " +
|
|
|
- "charge_date as feeOcurTime, " +
|
|
|
- "charge_code_mx as medinsListCodg, " +
|
|
|
- "charge_fee as detItemFeeSumamt, " +
|
|
|
- "charge_amount as cnt, " +
|
|
|
- "pric=charge_fee/charge_amount, " +
|
|
|
- "ward_code as bilgDeptCodg, " +
|
|
|
- "hospApprFlag=case when yb_self_flag='1' then '2' else '1' end," +
|
|
|
- "mdtrtId=(select mdtrt_id from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
- "psnNo=(select psn_no from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
- "medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
- "medListCodg=isnull((select max(national_code) from yp_zd_dict where code=charge_code_mx),(select max(national_code) from zd_charge_item where code=charge_code_mx)), " +
|
|
|
- "bilgDeptName=(select name from zd_unit_code where code=ward_code), " +
|
|
|
- "bilgDrCodg=isnull(isnull(doctor_code,refer_physician), op_id_code), " +
|
|
|
- "bilgDrName=isnull(isnull((select rtrim(name) from a_employee_mi where code=doctor_code), " +
|
|
|
- "(select rtrim(name) from a_employee_mi where code=refer_physician)),(select rtrim(name) from a_employee_mi where code=op_id_code)) " +
|
|
|
- "from zy_detail_charge a where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and " +
|
|
|
- "ledger_sn=#{ledgerSn} and charge_amount>0 and isnull(infant_flag,0)=0 and isnull(trans_flag_yb,0) in ('',0) " +
|
|
|
- "and charge_date<=#{today}")
|
|
|
- LinkedList<FeeDtle> selectNotUploadedPositiveFees(@Param("inpatientNo") String inpatientNo,
|
|
|
- @Param("admissTimes") int admissTimes,
|
|
|
- @Param("ledgerSn") int ledgerSn,
|
|
|
- @Param("today") String today);
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取未上传至医保中心的退费费用明细
|
|
|
- *
|
|
|
- * @param inpatientNo 住院号
|
|
|
- * @param admissTimes 住院次数
|
|
|
- * @param ledgerSn 账页号
|
|
|
- * @return 费用明细
|
|
|
- */
|
|
|
- @Select("select detail_sn as feedetlSn, " +
|
|
|
- "order_no as drordNo, " +
|
|
|
- "initFeedetlSn=case when ori_detail_sn=-1 then null else ori_detail_sn end, " +
|
|
|
- "charge_date as feeOcurTime, " +
|
|
|
- "charge_code_mx as medinsListCodg, " +
|
|
|
- "charge_fee as detItemFeeSumamt, " +
|
|
|
- "charge_amount as cnt, " +
|
|
|
- "pric=charge_fee/charge_amount, " +
|
|
|
- "ward_code as bilgDeptCodg, " +
|
|
|
- "hospApprFlag=case when yb_self_flag='1' then '2' else '1' end," +
|
|
|
- "mdtrtId=(select mdtrt_id from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
- "psnNo=(select psn_no from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
- "medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
- "medListCodg=isnull((select max(national_code) from yp_zd_dict where code=charge_code_mx),(select max(national_code) from zd_charge_item where code=charge_code_mx)), " +
|
|
|
- "bilgDeptName=(select name from zd_unit_code where code=ward_code), " +
|
|
|
- "bilgDrCodg=isnull(isnull(doctor_code,refer_physician), op_id_code), " +
|
|
|
- "bilgDrName=isnull(isnull((select rtrim(name) from a_employee_mi where code=doctor_code), " +
|
|
|
- "(select rtrim(name) from a_employee_mi where code=refer_physician)),(select rtrim(name) from a_employee_mi where code=op_id_code)) " +
|
|
|
- "from zy_detail_charge a where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and " +
|
|
|
- "ledger_sn=#{ledgerSn} and charge_amount<0 and isnull(infant_flag,0)=0 and ori_detail_sn is not null and " +
|
|
|
- "isnull(trans_flag_yb,0) in ('',0) and charge_date<=#{today}")
|
|
|
- LinkedList<FeeDtle> selectNotUploadedNegativeFees(@Param("inpatientNo") String inpatientNo,
|
|
|
- @Param("admissTimes") int admissTimes,
|
|
|
- @Param("ledgerSn") int ledgerSn,
|
|
|
- @Param("today") String today);
|
|
|
-
|
|
|
- /**
|
|
|
- * 更新住院费用表的上传状态
|
|
|
- *
|
|
|
- * @param inpatientNo 住院号
|
|
|
- * @param admissTimes 住院次数
|
|
|
- * @param fees 要更新的费用
|
|
|
- */
|
|
|
- @Update("<script>" +
|
|
|
- "update zy_detail_charge set trans_flag_yb=1 where inpatient_no=#{inpatientNo} and " +
|
|
|
- "admiss_times=#{admissTimes} and detail_sn in " +
|
|
|
- "<foreach collection='fees' item='fee' separator=',' open='(' close=')'>" +
|
|
|
- "#{fee.feedetlSn}</foreach>" +
|
|
|
- "</script>")
|
|
|
- void updateTransFlag(@Param("inpatientNo") String inpatientNo,
|
|
|
- @Param("admissTimes") int admissTimes,
|
|
|
- @Param("fees") List<FeeDtle> fees);
|
|
|
-
|
|
|
/**
|
|
|
* 撤销医保费用上传后,更改上传标志为0
|
|
|
*
|