|
|
@@ -24,7 +24,7 @@ public interface PatientDao {
|
|
|
"medType=a.med_type, " +
|
|
|
"dismissOrder=(select count(1) from yz_act_order b where b.inpatient_no=a.inpatient_no " +
|
|
|
"and b.admiss_times=a.admiss_times and status_flag > '1' and isnull(group_no,'00')='00' " +
|
|
|
- "and order_code in ('06026','06053','05973'))," +
|
|
|
+ "and order_code in (select order_code from yz_zd_order_item_confirm where item_name in (N'出院',N'死亡')))," +
|
|
|
"orderNoCount = (select count(1) " +
|
|
|
" from yz_act_order c " +
|
|
|
" where a.inpatient_no = c.inpatient_no " +
|
|
|
@@ -78,7 +78,7 @@ public interface PatientDao {
|
|
|
"admissStatus=rtrim(a.admiss_status), " +
|
|
|
"dismissOrder=(select count(1) from yz_act_order y where y.inpatient_no=b.inpatient_no " +
|
|
|
"and y.admiss_times=a.admiss_times and status_flag>'1' and isnull(group_no,'00')='00' " +
|
|
|
- "and order_code in ('06026','06053','05973')), " +
|
|
|
+ "and order_code in (select order_code from yz_zd_order_item_confirm where item_name in (N'出院',N'死亡'))), " +
|
|
|
"disDiagStatus=(select RTRIM(dis_diag_status) from zy_dis_diag_yb where inpatient_no=a.inpatient_no " +
|
|
|
"and admiss_times=a.admiss_times and dis_diag_no=1), " +
|
|
|
"operation=rtrim(a.operation),a.zy_serial_no, " +
|
|
|
@@ -218,7 +218,8 @@ public interface PatientDao {
|
|
|
|
|
|
@Select("select convert (varchar(12),dateadd (day,0,start_time),111) from yz_act_order where " +
|
|
|
"inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and status_flag > '1' " +
|
|
|
- "and isnull(group_no,'00')='00' and order_code in ('06026','06053','05973') ")
|
|
|
+ "and isnull(group_no,'00')='00' and order_code in " +
|
|
|
+ "(select order_code from yz_zd_order_item_confirm where item_name in (N'出院',N'死亡')) ")
|
|
|
String getActOrderDisDate(@Param("inpatientNo") String inpatientNo,
|
|
|
@Param("admissTimes") Integer admissTimes);
|
|
|
|
|
|
@@ -233,9 +234,11 @@ public interface PatientDao {
|
|
|
"enter_oper, start_time, end_time, infant_flag, drug_flag, performance_time, " +
|
|
|
"physician, confirm_time, signer, status_flag, status_time,drug_specification,order_name,discription, " +
|
|
|
"ward_code,dept_code,exec_unit) " +
|
|
|
- "values (#{actOrderNo}, #{inpatientNo}, #{admissTimes}, '06026', #{dismissOrderDate}, 'ONCE', #{dismissOrderDate}, " +
|
|
|
- "#{staffId}, #{dismissOrderDate}, #{dismissOrderDate}, 0, 0, #{dismissOrderDate}, #{staffId}, " +
|
|
|
- "#{dismissOrderDate}, #{staffId}, 5, #{dismissOrderDate},'诊疗项目','今日结账出院','0.00 本项目不包含费用'," +
|
|
|
+ "values (#{actOrderNo}, #{inpatientNo}, #{admissTimes}, " +
|
|
|
+ "(select top 1 order_code from yz_zd_order_item_confirm where item_name=N'出院'), " +
|
|
|
+ "#{dismissOrderDate}, 'ONCE', #{dismissOrderDate},#{staffId}, #{dismissOrderDate}, #{dismissOrderDate}, " +
|
|
|
+ "0, 0, #{dismissOrderDate}, #{staffId},#{dismissOrderDate}, #{staffId}, 5, #{dismissOrderDate}," +
|
|
|
+ "'诊疗项目','今日结账出院','0.00 本项目不包含费用'," +
|
|
|
"#{admissWard},#{admissWard},#{admissWard})")
|
|
|
void insertNewDismissActOrder(@Param("actOrderNo") float actOrderNo,
|
|
|
@Param("inpatientNo") String inpatientNo,
|
|
|
@@ -280,7 +283,8 @@ public interface PatientDao {
|
|
|
@Param("newDate") Date newDate);
|
|
|
|
|
|
@Select("select start_time from yz_act_order where inpatient_no=#{patNo} and admiss_times=#{times} " +
|
|
|
- "and status_flag > '1' and isnull(group_no, '00')='00' and order_code in ('06026','06053','05973')")
|
|
|
+ "and status_flag > '1' and isnull(group_no, '00')='00' and order_code in " +
|
|
|
+ "(select order_code from yz_zd_order_item_confirm where item_name in (N'出院',N'死亡'))")
|
|
|
Date selectActOrderDisDate(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
|
|
|
@Update("update zy_detail_charge set charge_date=#{disdate} where inpatient_no=#{zyh} " +
|