|
@@ -10,6 +10,40 @@ import java.util.List;
|
|
|
@Mapper
|
|
|
public interface DashboardDao {
|
|
|
|
|
|
+ @Select("select rtrim(bed_no) as bedNo,\n" +
|
|
|
+ " rtrim(name) as name,\n" +
|
|
|
+ " sex as gender,\n" +
|
|
|
+ " rtrim(inpatient_no) as patNo,\n" +
|
|
|
+ " birthDate=(select t.birth_date from a_patient_mi t where t.inpatient_no = a.inpatient_no),\n" +
|
|
|
+ " admiss_date,\n" +
|
|
|
+ " convertAdmissDate=admiss_date,\n" +
|
|
|
+ " physician=(select rtrim(t.name) from a_employee_mi t where t.code = a.refer_physician),\n" +
|
|
|
+ " a.med_type,\n" +
|
|
|
+ " surgery=(select top 1 rtrim(op_scale) + N'级'\n" +
|
|
|
+ " from op_record t\n" +
|
|
|
+ " where t.inpatient_no = a.inpatient_no\n" +
|
|
|
+ " and t.admiss_times = a.admiss_times\n" +
|
|
|
+ " and t.status != 'd'\n" +
|
|
|
+ " and datediff(day, getdate(), t.op_datetime) = 0),\n" +
|
|
|
+ " nursingLevel=(select top 1 rtrim(order_name)\n" +
|
|
|
+ " from yz_act_order t\n" +
|
|
|
+ " where t.order_code in ('05298','05299','05300','05301','08879','08880','08881','08882')\n" +
|
|
|
+ " and t.group_no = '00'\n" +
|
|
|
+ " and t.status_flag in ('3', '4')\n" +
|
|
|
+ " and t.inpatient_no = a.inpatient_no\n" +
|
|
|
+ " order by t.start_time desc),\n" +
|
|
|
+ " sickLevelOrderName=(select top 1 rtrim(order_name)\n" +
|
|
|
+ " from yz_act_order t\n" +
|
|
|
+ " where t.order_code in ('05887', '05888')\n" +
|
|
|
+ " and t.group_no = '00'\n" +
|
|
|
+ " and t.status_flag in ('3', '4')\n" +
|
|
|
+ " and t.inpatient_no = a.inpatient_no\n" +
|
|
|
+ " order by t.start_time desc)\n" +
|
|
|
+ "from zy_actpatient a where (zk_ward=#{dept} or zk_ward in " +
|
|
|
+ "(select small_dept from zd_dept_all t where t.dept=#{dept})) " +
|
|
|
+ "order by cast(bed_no as int)")
|
|
|
+ List<InpatientBrief> selectInpatientBrief(@Param("dept") String dept);
|
|
|
+
|
|
|
@Select("select rtrim(bed_no) as bedNo,\n" +
|
|
|
" rtrim(name) as name,\n" +
|
|
|
" sex as gender,\n" +
|
|
@@ -42,7 +76,7 @@ public interface DashboardDao {
|
|
|
"from zy_actpatient a\n" +
|
|
|
"where (ward = #{dept} or dept= #{dept} )\n" +
|
|
|
"order by cast(bed_no as int)")
|
|
|
- List<InpatientBrief> selectInpatientBrief(@Param("dept") String dept);
|
|
|
+ List<InpatientBrief> selectInpatientBriefV2(@Param("dept") String dept);
|
|
|
|
|
|
|
|
|
@Select("select count(*)\n" +
|