|
@@ -24,98 +24,80 @@ public interface QueRenYiZhuShouFeiDao {
|
|
|
List<String> getKeShiLieBiao(String deptCode);
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "SELECT a.inpatient_no, " +
|
|
|
- " a.admiss_times, " +
|
|
|
- " name =b.name, " +
|
|
|
- " bed_no =b.bed_no, " +
|
|
|
- " ward_name = (select rtrim(name) name from zd_unit_code where zd_unit_code.code = a.ward_code), " +
|
|
|
- " b.sex, " +
|
|
|
- " b.admiss_date, " +
|
|
|
- " b.total_charge, " +
|
|
|
- " responce_type , " +
|
|
|
- " responce_type_name=(select rtrim(name) name from zy_zd_responce_type where responce_type = zy_zd_responce_type.code), " +
|
|
|
- " a.ward_code,exec_unit " +
|
|
|
- "FROM yz_zy_patient_fee a ,zy_actpatient b " +
|
|
|
- "where a.charge_status='3' and " +
|
|
|
- "<if test=\"inpatientNo !=null and inpatientNo != '' \"> " +
|
|
|
- "a.inpatient_no = #{inpatientNo} and " +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"admissTimes !=null and admissTimes != '' \">" +
|
|
|
- " a.admiss_times = #{admissTimes} and " +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"execUnit != null and execUnit !='' and execUnit != '3100000'\">" +
|
|
|
- " a.exec_unit in " +
|
|
|
+ "SELECT a.inpatient_no, " +
|
|
|
+ " a.admiss_times, " +
|
|
|
+ " bed_no =b.bed_no, " +
|
|
|
+ " b.name, " +
|
|
|
+ " a.ward_code , " +
|
|
|
+ " ward_name = (select name from zd_unit_code where code = ward_code) " +
|
|
|
+ "FROM yz_zy_patient_fee a ,zy_actpatient b " +
|
|
|
+ "where a.charge_status='3' and " +
|
|
|
+ " a.exec_unit in" +
|
|
|
"<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
- " #{item}" +
|
|
|
+ " #{item} " +
|
|
|
"</foreach>" +
|
|
|
- " and " +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"wardCode != null and wardCode !='' \">" +
|
|
|
- " a.ward_code = #{wardCode} and " +
|
|
|
- "</if>" +
|
|
|
- " a.inpatient_no=b.inpatient_no and " +
|
|
|
- " a.admiss_times=b.admiss_times and " +
|
|
|
- " convert(varchar(20),a.occ_time,23)<=convert(varchar(20),getdate(),23) " +
|
|
|
- "group by a.inpatient_no, a.admiss_times, b.name, b.bed_no,a.ward_code,exec_unit,b.sex,b.admiss_date,b.total_charge,responce_type" +
|
|
|
+ " and a.inpatient_no=b.inpatient_no and " +
|
|
|
+ " a.admiss_times=b.admiss_times " +
|
|
|
+ " and convert(varchar(20),a.occ_time,23)<=convert(varchar(20),getdate(),23) " +
|
|
|
+ "group by a.inpatient_no, a.admiss_times, b.bed_no, b.name, a.ward_code " +
|
|
|
+ "order by ward_code" +
|
|
|
"</script>")
|
|
|
IPage<YzActOrder> getXuQueFeiYiZhu(IPage<YzActOrder> page,
|
|
|
- @Param("inpatientNo") String inpatientNo,
|
|
|
- @Param("admissTimes") Integer admissTimes,
|
|
|
- @Param("execUnit") String execUnit,
|
|
|
- @Param("wardCode") String wardCode,
|
|
|
@Param("list") List<String> list);
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取需要确认医嘱收费的总数
|
|
|
+ *
|
|
|
+ * @param list 科室集合
|
|
|
+ * @return 返回信息
|
|
|
+ */
|
|
|
+ @Select("<script>" +
|
|
|
+ "select count(*) from (" +
|
|
|
+ "SELECT a.inpatient_no, " +
|
|
|
+ " a.admiss_times, " +
|
|
|
+ " bed_no =b.bed_no, " +
|
|
|
+ " b.name, " +
|
|
|
+ " a.ward_code , " +
|
|
|
+ " ward_name = (select name from zd_unit_code where code = ward_code) " +
|
|
|
+ "FROM yz_zy_patient_fee a ,zy_actpatient b " +
|
|
|
+ "where a.charge_status='3' and " +
|
|
|
+ " a.exec_unit in" +
|
|
|
+ "<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
+ " #{item} " +
|
|
|
+ "</foreach>" +
|
|
|
+ " and a.inpatient_no=b.inpatient_no and " +
|
|
|
+ " a.admiss_times=b.admiss_times " +
|
|
|
+ " and convert(varchar(20),a.occ_time,23)<=convert(varchar(20),getdate(),23) " +
|
|
|
+ "group by a.inpatient_no, a.admiss_times, b.bed_no, b.name, a.ward_code" +
|
|
|
+ ") temp" +
|
|
|
+ "</script>")
|
|
|
+ long getXuQueFeiYiZhuTotal(@Param("list") List<String> list);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select inpatient_no,admiss_times,bed_no,sex,admiss_date,responce_type, " +
|
|
|
+ "ledger_sn = (select max(ledger_sn) from zy_ledger_file where zy_ledger_file.inpatient_no = zy_actpatient.inpatient_no " +
|
|
|
+ "and zy_ledger_file.admiss_times = zy_actpatient.admiss_times), " +
|
|
|
+ "responce_type_name = (select rtrim(name) from zy_zd_responce_type where code = responce_type), " +
|
|
|
+ "total_charge from zy_actpatient where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} ")
|
|
|
+ YzActOrder huoQuGeRenXinXi(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes);
|
|
|
+
|
|
|
@Select("<script>" +
|
|
|
- "SELECT a.inpatient_no, " +
|
|
|
- " a.admiss_times, " +
|
|
|
- " a.charge_date, " +
|
|
|
- " a.op_id_code, " +
|
|
|
- " a.charge_code, " +
|
|
|
- " a.infant_flag, " +
|
|
|
- " a.charge_status, " +
|
|
|
- " a.charge_fee, " +
|
|
|
- " a.self_flag, " +
|
|
|
- " a.separate_flag, " +
|
|
|
- " a.suppress_flag, " +
|
|
|
- " a.occ_time, " +
|
|
|
- " a.act_order_no, " +
|
|
|
- " a.dept_code, " +
|
|
|
- " a.ward_code, " +
|
|
|
- " ward_name = (select rtrim(name) name from zd_unit_code where zd_unit_code.code = a.ward_code)," +
|
|
|
- " a.order_count, " +
|
|
|
- " a.pay_self, " +
|
|
|
- " a.exec_unit, " +
|
|
|
- " a.zy_serial_no , " +
|
|
|
- " charge_name=c.name, " +
|
|
|
- " bill_item_code=c.bill_item_zy, " +
|
|
|
- " ledger_sn=b.times_billed, " +
|
|
|
- " name =b.name, " +
|
|
|
- " bed_no =b.bed_no, " +
|
|
|
- " op_flag =isnull(a.op_flag,'0'), " +
|
|
|
- " d.order_name, " +
|
|
|
- " docotr_name=e.name, " +
|
|
|
- " op_id = a.op_id, " +
|
|
|
- " op_date = a.op_date " +
|
|
|
- "FROM yz_zy_patient_fee a ,zy_actpatient b ,zd_charge_item c,yz_act_order d,a_employee_mi e " +
|
|
|
- "where a.charge_status='3' and " +
|
|
|
- " a.inpatient_no = #{inpatientNo} and " +
|
|
|
- " a.admiss_times = #{admissTimes} and " +
|
|
|
- "<if test=\"execUnit != null and execUnit !='' and execUnit != '3100000'\">" +
|
|
|
- " a.exec_unit in " +
|
|
|
+ "select a.charge_status,e.name docotr_name,a.act_order_no,c.name order_name,a.charge_code,a.charge_fee,a.order_count,occ_time " +
|
|
|
+ "from yz_zy_patient_fee a ,zd_charge_item c,yz_act_order d,a_employee_mi e " +
|
|
|
+ "where a.inpatient_no = #{inpatientNo} and a.admiss_times = #{admissTimes} and " +
|
|
|
+ "a.charge_status = '3' and " +
|
|
|
+ "a.charge_code=c.code and " +
|
|
|
+ "a.inpatient_no=d.inpatient_no and " +
|
|
|
+ "a.admiss_times=d.admiss_times and " +
|
|
|
+ "a.act_order_no=d.act_order_no and " +
|
|
|
+ "d.physician*=e.code and " +
|
|
|
+ "convert(varchar(20),a.occ_time,23)<=convert(varchar(20),getdate(),23) and " +
|
|
|
+ "a.exec_unit in " +
|
|
|
"<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
- " #{item}" +
|
|
|
+ " #{item} " +
|
|
|
"</foreach>" +
|
|
|
- " and " +
|
|
|
- "</if>" +
|
|
|
- " a.inpatient_no=b.inpatient_no and " +
|
|
|
- " a.admiss_times=b.admiss_times and " +
|
|
|
- " a.charge_code=c.code and" +
|
|
|
- " a.inpatient_no=d.inpatient_no and " +
|
|
|
- " a.admiss_times=d.admiss_times and" +
|
|
|
- " a.act_order_no=d.act_order_no and" +
|
|
|
- " d.physician*=e.code and" +
|
|
|
- " convert(varchar(20),a.occ_time,23)<=convert(varchar(20),getdate(),23) " +
|
|
|
- "order by charge_name,order_code,charge_code" +
|
|
|
"</script>")
|
|
|
List<YzActOrder> getXuQueFeiXiangXiXinXi(@Param("inpatientNo") String inpatientNo,
|
|
|
@Param("admissTimes") Integer admissTimes,
|
|
@@ -129,7 +111,7 @@ public interface QueRenYiZhuShouFeiDao {
|
|
|
" charge_status = #{item.chargeStatus}, op_id = #{code}, op_date = GETDATE() " +
|
|
|
"</set>" +
|
|
|
"WHERE act_order_no = #{item.actOrderNo} " +
|
|
|
- "AND inpatient_no = #{inpatientNo} AND admiss_times = #{admissTimes}" +
|
|
|
+ "AND inpatient_no = #{inpatientNo} AND admiss_times = #{admissTimes} and occ_time = #{item.occTime} " +
|
|
|
"</foreach>" +
|
|
|
"</script>")
|
|
|
void baoCunYiZhuQueFei(@Param("inpatientNo") String inpatientNo,
|