|
@@ -86,7 +86,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
@Select("select [dbo].[judge_infant](#{bah}, #{times})")
|
|
|
int getInfant(@Param("bah") String bah, @Param("times") int times);
|
|
|
|
|
|
- @Select("select start_time from ${table} with(nolock) where inpatient_no=#{bah} " +
|
|
|
+ @Select("select max(start_time) from ${table} with(nolock) where inpatient_no=#{bah} " +
|
|
|
"and admiss_times=#{times} and status_flag > '1' and isnull (group_no,'00')='00' " +
|
|
|
"and order_code in ('06025','06026','06027','06053','05973')")
|
|
|
Date getDismissDateFromYzActOrder(@Param("table") String table, @Param("bah") String bah, @Param("times") int times);
|
|
@@ -101,7 +101,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"dismissWard=(select rtrim(name) from zd_unit_code with(nolock) where code=ward)," +
|
|
|
"medType=(select top 1 med_type from t_si_pat_info with(nolock) where pat_no=#{bah} and times=#{times} order by ledger_sn desc), " +
|
|
|
"insutype=(select top 1 insutype from t_si_pat_info with(nolock) where pat_no=#{bah} and times=#{times} order by ledger_sn desc), " +
|
|
|
- "dismissDate=(select start_time from ${yzTable} with(nolock) where inpatient_no=#{bah} " +
|
|
|
+ "dismissDate=(select max(start_time) from ${yzTable} with(nolock) where inpatient_no=#{bah} " +
|
|
|
"and admiss_times=#{times} and status_flag > '1' and isnull (group_no,'00')='00' " +
|
|
|
"and order_code in ('06025','06026','06027','06053','05973')), " +
|
|
|
"rtrim(small_dept) as admissDeptCode, " +
|