|
@@ -5,7 +5,9 @@ import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
import org.apache.ibatis.annotations.Update;
|
|
|
import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
|
|
|
-import thyyxxk.webserver.entity.medicalinsurance.query.SiPatInfo;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.inpatient.BatjBa4;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyDisDiagYb;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyInactpatient;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.setllistupload.*;
|
|
|
import thyyxxk.webserver.entity.querydata.TSiSetlinfo;
|
|
|
|
|
@@ -43,7 +45,8 @@ public interface UpIdCollectionDao {
|
|
|
" psnCashpay=cast(a.psn_cash_pay as decimal(16,2)) , " + // -- 个人现金支付
|
|
|
" hiPaymtd='3', " + // -- 医保支付方式
|
|
|
" a.clr_optins as hsorg, " + // -- 医保机构
|
|
|
- " a.insutype as hi_type " + // -- 枚举 MdcsType
|
|
|
+ " a.insutype as hi_type," +
|
|
|
+ " a.setl_time as setl_end_date " + // -- 枚举 MdcsType
|
|
|
"from t_si_setlinfo a, t_si_pat_info b " +
|
|
|
"where a.pat_no=b.pat_no and a.times=b.times " +
|
|
|
"and a.pat_no = #{patNo} and a.times = #{times} " +
|
|
@@ -137,7 +140,7 @@ public interface UpIdCollectionDao {
|
|
|
|
|
|
// 这里是 住院诊断消息
|
|
|
@Select("select si_diag_type as diag_type, " +
|
|
|
- " rtrim(dis_diag) as diag_code, " +
|
|
|
+ " rtrim(dis_diag) as diag_code, " +
|
|
|
" rtrim(dis_diag_comment) as diag_name, " +
|
|
|
" case when dis_diag_no = 1 then 1 else 0 end as maindiag_flag " +
|
|
|
"from zy_dis_diag_yb " +
|
|
@@ -212,19 +215,6 @@ public interface UpIdCollectionDao {
|
|
|
void fanHuiLiuShuiHao(@Param("setlListId") String setlListId,
|
|
|
@Param("setlId") String setlId);
|
|
|
|
|
|
- @Select("<script>" +
|
|
|
- "select a.pat_no,a.times,a.ledger_sn from t_si_setlinfo a,t_si_pat_info b where a.pat_no = b.pat_no " +
|
|
|
- "and a.times = b.times and a.ledger_sn = b.ledger_sn and revoked = 0 and setl_type = 21 and " +
|
|
|
- "b.insuplc_admdvs like '4301%' and b.insuplc_admdvs != '430182' and setl_list_id is null " +
|
|
|
- "and a.setl_time >= #{startTime} and a.setl_time <= #{endTime} " +
|
|
|
- "<if test=\"insutype!=null and insutype!=''\">" +
|
|
|
- "and a.insutype=#{insutype}" +
|
|
|
- "</if>" +
|
|
|
- "</script>")
|
|
|
- List<SiPatInfo> getHuanZheXinXi(@Param("startTime") String startTime,
|
|
|
- @Param("endTime") String endTime,
|
|
|
- @Param("insutype") String insutype);
|
|
|
-
|
|
|
@Select("<script>" +
|
|
|
"select top ${pageSize} * from (" +
|
|
|
"select " +
|
|
@@ -233,10 +223,12 @@ public interface UpIdCollectionDao {
|
|
|
" a.med_type,medfee_sumamt,fund_pay_sumamt, " +
|
|
|
" acct_pay,psn_cash_pay,clr_optins,clr_optins_name = (select name from t_region where code=clr_optins), " +
|
|
|
" outDeptName=(select rtrim(name) from zd_unit_code where code=small_dept), " +
|
|
|
- " setl_list_id " +
|
|
|
+ " setl_list_id,datediff(day ,b.admiss_date ,b.dis_date) as act_ipt_days,b.operation " +
|
|
|
"from t_si_setlinfo a left join zy_inactpatient b on (a.pat_no = b.inpatient_no and a.times = b.admiss_times) " +
|
|
|
- "where " +
|
|
|
- " setl_time >= #{startTime} and setl_time <= #{endTime} " +
|
|
|
+ "where 1=1 " +
|
|
|
+ "<if test=\"startTime !=null and startTime != '' \">" +
|
|
|
+ " and setl_time >= #{startTime} and setl_time <= #{endTime} " +
|
|
|
+ "</if>" +
|
|
|
"<if test=\"setlType !=null and setlType != '' \">" +
|
|
|
" and setl_type = #{setlType} " +
|
|
|
"</if>" +
|
|
@@ -273,10 +265,10 @@ public interface UpIdCollectionDao {
|
|
|
"#{item}" +
|
|
|
"</foreach>" +
|
|
|
"</if>" +
|
|
|
- "<if test=\"flag == false \">" +
|
|
|
+ "<if test=\"flag == 1 \">" +
|
|
|
" and a.setl_list_id is null " +
|
|
|
"</if>" +
|
|
|
- "<if test=\"flag == true \">" +
|
|
|
+ "<if test=\"flag == 2 \">" +
|
|
|
" and a.setl_list_id is not null " +
|
|
|
"</if>" +
|
|
|
" ) temp where rowNumber > ${pageSize} * (${currentPage} - 1)" +
|
|
@@ -290,7 +282,7 @@ public interface UpIdCollectionDao {
|
|
|
@Param("medTypes") List<String> medTypes,
|
|
|
@Param("psnTypes") List<String> psnTypes,
|
|
|
@Param("clrOptins") List<String> clrOptins,
|
|
|
- @Param("flag") boolean flag,
|
|
|
+ @Param("flag") Integer flag,
|
|
|
@Param("currentPage") long currentPage,
|
|
|
@Param("pageSize") long pageSize);
|
|
|
|
|
@@ -298,8 +290,10 @@ public interface UpIdCollectionDao {
|
|
|
@Select("<script>" +
|
|
|
"select count(*) " +
|
|
|
"from t_si_setlinfo a left join zy_inactpatient b on (a.pat_no = b.inpatient_no and a.times = b.admiss_times) " +
|
|
|
- "where " +
|
|
|
- " setl_time >= #{startTime} and setl_time <= #{endTime} " +
|
|
|
+ "where 1=1 " +
|
|
|
+ "<if test=\"startTime !=null and startTime != '' \">" +
|
|
|
+ " and setl_time >= #{startTime} and setl_time <= #{endTime} " +
|
|
|
+ "</if>" +
|
|
|
"<if test=\"setlType !=null and setlType != '' \">" +
|
|
|
" and setl_type = #{setlType} " +
|
|
|
"</if>" +
|
|
@@ -336,10 +330,10 @@ public interface UpIdCollectionDao {
|
|
|
"#{item}" +
|
|
|
"</foreach>" +
|
|
|
"</if>" +
|
|
|
- "<if test=\"flag == false \">" +
|
|
|
+ "<if test=\"flag == 1 \">" +
|
|
|
" and a.setl_list_id is null " +
|
|
|
"</if>" +
|
|
|
- "<if test=\"flag == true \">" +
|
|
|
+ "<if test=\"flag == 2 \">" +
|
|
|
" and a.setl_list_id is not null " +
|
|
|
"</if>" +
|
|
|
"</script>")
|
|
@@ -352,6 +346,24 @@ public interface UpIdCollectionDao {
|
|
|
@Param("medTypes") List<String> medTypes,
|
|
|
@Param("psnTypes") List<String> psnTypes,
|
|
|
@Param("clrOptins") List<String> clrOptins,
|
|
|
- @Param("flag") boolean flag);
|
|
|
+ @Param("flag") Integer flag);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select opName = (select top(1) rtrim(name) from a_employee_mi where code = op_id_code),* " +
|
|
|
+ "from zy_dis_diag_yb where inpatient_no = #{patNo} and admiss_times = #{times} ")
|
|
|
+ List<ZyDisDiagYb> zhenDuanXinXi(@Param("patNo") String patNo,
|
|
|
+ @Param("times") Integer times);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select * from batj_ba4 where zyh = #{patNo} and zycs = #{times} ")
|
|
|
+ List<BatjBa4> shouShuXinXi(@Param("patNo") String patNo,
|
|
|
+ @Param("times") Integer times);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select inpatient_no,admiss_times,name,admiss_date,dis_date,responce_type,operation, " +
|
|
|
+ " responce_type_name = (select rtrim(name) from zy_zd_responce_type where code = responce_type),sex " +
|
|
|
+ "from zy_inactpatient where inpatient_no = #{patNo} and admiss_times = #{times}")
|
|
|
+ ZyInactpatient huanZheXinXi(@Param("patNo") String patNo,
|
|
|
+ @Param("times") Integer times);
|
|
|
|
|
|
}
|