|  | @@ -270,7 +270,7 @@ public interface YbStatDao {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Select("<script> " +
 | 
	
		
			
				|  |  |              "select count(t.setl_id) value, 0 pid, rtrim(t.id) as id, rtrim(isnull(d.name, '其他')) name from " +
 | 
	
		
			
				|  |  | -            "(select a.setl_id, isnull(zy.small_dept, zya.small_dept) id " +
 | 
	
		
			
				|  |  | +            "(select a.setl_id, isnull(isnull( zy.small_dept, zya.small_dept ), 999) id " +
 | 
	
		
			
				|  |  |              "from t_si_setlinfo a " +
 | 
	
		
			
				|  |  |              "left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
 | 
	
		
			
				|  |  |              "left join zy_actpatient zya on (zya.inpatient_no = a.pat_no and zya.admiss_times = a.times) " +
 | 
	
	
		
			
				|  | @@ -284,7 +284,7 @@ public interface YbStatDao {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Select("<script> " +
 | 
	
		
			
				|  |  |              "select count(t.setl_id) as value, rtrim(t.pid) as pid, rtrim(t.id) as id, rtrim(isnull(e.name, '其他')) as name from " +
 | 
	
		
			
				|  |  | -            "(select a.setl_id, isnull(zy.small_dept, zya.small_dept) pid, isnull(isnull(zy.refer_physician, zya.refer_physician), 9999) id " +
 | 
	
		
			
				|  |  | +            "(select a.setl_id, isnull(isnull( zy.small_dept, zya.small_dept ), 999) pid, isnull(isnull(zy.refer_physician, zya.refer_physician), 9999) id " +
 | 
	
		
			
				|  |  |              "from t_si_setlinfo a " +
 | 
	
		
			
				|  |  |              "left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
 | 
	
		
			
				|  |  |              "left join zy_actpatient zya on (zya.inpatient_no = a.pat_no and zya.admiss_times = a.times) " +
 | 
	
	
		
			
				|  | @@ -312,7 +312,7 @@ public interface YbStatDao {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Select("<script> " +
 | 
	
		
			
				|  |  |              "select count(t.setl_id) as rs, rtrim(isnull(t.medins_type, '其他')) as insurName, rtrim(isnull(e.name, '其他')) as doctorName, rtrim(isnull(d.name, '其他')) as deptName  from " +
 | 
	
		
			
				|  |  | -            "(select a.setl_id, a.medins_type, isnull(zy.small_dept, zya.small_dept) pid, isnull(isnull(zy.refer_physician, zya.refer_physician), 9999) id " +
 | 
	
		
			
				|  |  | +            "(select a.setl_id, a.medins_type, isnull(isnull(zy.small_dept, zya.small_dept), 999) pid, isnull(isnull(zy.refer_physician, zya.refer_physician), 9999) id " +
 | 
	
		
			
				|  |  |              "from t_si_setlinfo a " +
 | 
	
		
			
				|  |  |              "left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
 | 
	
		
			
				|  |  |              "left join zy_actpatient zya on (zya.inpatient_no = a.pat_no and zya.admiss_times = a.times) " +
 |