|
@@ -0,0 +1,109 @@
|
|
|
+package thyyxxk.webserver.dao.his.zhuyuanyisheng;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
+import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.JcZdClass;
|
|
|
+import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
|
|
|
+import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.PatientTemp;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 描述: 检查申请
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author xc
|
|
|
+ * @date 2022-02-10 15:42
|
|
|
+ */
|
|
|
+@Mapper
|
|
|
+public interface JianChaShenQingDao {
|
|
|
+
|
|
|
+
|
|
|
+ @Select("<script>" +
|
|
|
+ "select order_name,req_no,act_order_no, start_time " +
|
|
|
+ "from ysh_yj_req " +
|
|
|
+ "where inpatient_no = #{patNo}" +
|
|
|
+ " and admiss_times = #{times} " +
|
|
|
+ " and req_type = '3' " +
|
|
|
+ "<if test=\" orderName != null and orderName != '' \">" +
|
|
|
+ " and order_name like #{orderName} " +
|
|
|
+ "</if>" +
|
|
|
+ "</script>")
|
|
|
+ IPage<YshYjReq> huoQuJianChaShenQing(IPage<YshYjReq> page,
|
|
|
+ @Param("patNo") String patNo,
|
|
|
+ @Param("times") String times,
|
|
|
+ @Param("orderName") String orderName);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select *, " +
|
|
|
+ " req_dept_name = (select rtrim(name) from zd_unit_code where code = req_dept), " +
|
|
|
+ " req_doctor_name = (select rtrim(name) from a_employee_mi where code = req_doctor) " +
|
|
|
+ "from ysh_yj_req " +
|
|
|
+ "where req_no = #{reqNo}")
|
|
|
+ YshYjReq huoQuShengQingXiangQing(@Param("reqNo") Integer reqNo);
|
|
|
+
|
|
|
+ @Select("select sex, " +
|
|
|
+ " home_street," +
|
|
|
+ " home_tel " +
|
|
|
+ "from a_patient_mi " +
|
|
|
+ "where inpatient_no = #{patNo}")
|
|
|
+ PatientTemp huoQuHuanZheXinXi(@Param("patNo") String patNo);
|
|
|
+
|
|
|
+ @Select("select responce_type_name = (select rtrim(name) from zy_zd_responce_type where code = responce_type) " +
|
|
|
+ "from zy_actpatient " +
|
|
|
+ "where inpatient_no = #{patNo}")
|
|
|
+ String huoQuHuanZheShenFen(@Param("patNo") String patNo);
|
|
|
+
|
|
|
+ @Select("select rtrim(comm) comm, " +
|
|
|
+ " comment1, " +
|
|
|
+ " comment2, " +
|
|
|
+ " comment3, " +
|
|
|
+ " comment4, " +
|
|
|
+ " comment5, " +
|
|
|
+ " comment6, " +
|
|
|
+ " comment7, " +
|
|
|
+ " comment8 " +
|
|
|
+ "from jc_zd_class " +
|
|
|
+ "where code = #{code}")
|
|
|
+ JcZdClass daYingXiangQing(@Param("code") String code);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select top 20 * " +
|
|
|
+ "from ( " +
|
|
|
+ " SELECT ROW_NUMBER() over (order by a.code ) rowIndex, " +
|
|
|
+ " code = rtrim(a.code), " +
|
|
|
+ " name = isnull(d.name + '(' + rtrim(a.name) + ')', rtrim(a.name)), " +
|
|
|
+ " bw_code= isnull(d.code, 0) " +
|
|
|
+ " FROM jc_zd_class a with (NOLOCK), " +
|
|
|
+ " yz_order_item b with (NOLOCK), " +
|
|
|
+ " jc_zd_item c with (NOLOCK), " +
|
|
|
+ " ysh_zd_part_code d with (NOLOCK) " +
|
|
|
+ " where a.code = b.order_type " +
|
|
|
+ " and isnull(b.del_flag, '') <> '1' " +
|
|
|
+ " and c.bw_code *= d.code " +
|
|
|
+ " and a.code = c.class " +
|
|
|
+ " group by a.name, d.code, d.name, a.code " +
|
|
|
+ " ) temp " +
|
|
|
+ "where rowIndex > (${currentPage} - 1) * 20")
|
|
|
+ List<JcZdClass> jianChaMing(long currentPage);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select count(*) " +
|
|
|
+ "from ( " +
|
|
|
+ " SELECT a.name, d.code, d.name d_name, a.code a_code " +
|
|
|
+ " FROM jc_zd_class a with (NOLOCK), " +
|
|
|
+ " yz_order_item b with (NOLOCK), " +
|
|
|
+ " jc_zd_item c with (NOLOCK), " +
|
|
|
+ " ysh_zd_part_code d with (NOLOCK) " +
|
|
|
+ " where a.code = b.order_type " +
|
|
|
+ " and isnull(b.del_flag, '') <> '1' " +
|
|
|
+ " and c.bw_code *= d.code " +
|
|
|
+ " and a.code = c.class " +
|
|
|
+ " group by a.name, d.code, d.name, a.code " +
|
|
|
+ " ) temp")
|
|
|
+ long jianChaMingTiaoShu();
|
|
|
+
|
|
|
+}
|