|
@@ -78,19 +78,37 @@ public interface IllegalChargesAnalysisDao {
|
|
|
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select rtrim(inpatient_no) inpatient_no,admiss_times,rtrim(name) name,admiss_date,dis_date,rtrim(responce_type) responce_type from zy_inactpatient where 1=1" +
|
|
|
+ "select rtrim(a.inpatient_no) inpatient_no,rtrim(a.name) name,a.admiss_times,a.admiss_date,b.dis_date,DATEDIFF(day,b.dis_date,a.admiss_date) differ_date," +
|
|
|
+ " (select name from zd_unit_code where code=isnull(a.small_dept,a.admiss_dept)) dept_name," +
|
|
|
+ " a.responce_type " +
|
|
|
+ "from zy_inactpatient a ,zy_inactpatient b " +
|
|
|
+ "where a.inpatient_no=b.inpatient_no" +
|
|
|
+ " and a.admiss_times=b.admiss_times+1" +
|
|
|
+ " and a.inpatient_no not like 'JT%'" +
|
|
|
+ " and DATEDIFF(day,b.dis_date,a.admiss_date)<2 " +
|
|
|
"<if test=\"start !=null and start != '' \">" +
|
|
|
- "and admiss_date >= #{start} and admiss_date <= #{end} " +
|
|
|
+ " and a.admiss_date >= #{start} and a.admiss_date <= #{end} " +
|
|
|
"</if>" +
|
|
|
"<if test=\"responces.size > 0\" >" +
|
|
|
- "and responce_type in " +
|
|
|
+ "and a.responce_type in " +
|
|
|
"<foreach collection='responces' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
"#{item}" +
|
|
|
"</foreach>" +
|
|
|
"</if>" +
|
|
|
- "order by inpatient_no,name" +
|
|
|
+ "order by a.inpatient_no,a.admiss_times" +
|
|
|
"</script>")
|
|
|
List<IllegalChargeData> queryHuanZheLiangCiRuYuanRiQi(@Param("start") String start,
|
|
|
@Param("end") String end,
|
|
|
@Param("responces") List<String> responces);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("<script>" +
|
|
|
+ "select rtrim(inpatient_no) inpatient_no,admiss_times,dis_diag_comment,dis_diag from ba_first_page1 where " +
|
|
|
+ "inpatient_no in " +
|
|
|
+ "<foreach collection='inpatientNoList' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
+ "#{item.inpatientNo}" +
|
|
|
+ "</foreach>" +
|
|
|
+ "and dis_diag_no = 1" +
|
|
|
+ "</script>")
|
|
|
+ List<IllegalChargeData> queryZhenDuan(@Param("inpatientNoList") List<IllegalChargeData> inpatientNoList);
|
|
|
}
|