|
@@ -6,6 +6,7 @@ import thyyxxk.webserver.entity.datamodify.YzActOrder;
|
|
|
import thyyxxk.webserver.entity.yibao.ZyActpatient;
|
|
|
import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.*;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
|
|
@@ -107,7 +108,6 @@ public interface YiZhuLuRuDao {
|
|
|
" order_time, " +
|
|
|
" physician, " +
|
|
|
" start_time, " +
|
|
|
- " end_time, " +
|
|
|
" drug_specification, " +
|
|
|
" drug_quan, " +
|
|
|
" drug_quan_name = (select name from yp_zd_unit with (NOLOCK) where code = mini_unit)," +
|
|
@@ -139,7 +139,6 @@ public interface YiZhuLuRuDao {
|
|
|
" serial, " +
|
|
|
" group_no, " +
|
|
|
" signer, " +
|
|
|
- " modifier, " +
|
|
|
" cl_code, " +
|
|
|
" doctor_flag, " +
|
|
|
" emergency_flag, " +
|
|
@@ -160,12 +159,16 @@ public interface YiZhuLuRuDao {
|
|
|
" kf_flag, " +
|
|
|
" refer_physician, " +
|
|
|
" consult_physician, " +
|
|
|
- " /* 开这个医嘱的医生 */ " +
|
|
|
- " physician_name = (select top(1) rtrim(name) from a_employee_mi with (NOLOCK) where code = physician), " +
|
|
|
+ " physician_name = (select top(1) rtrim(name) from a_employee_mi with (NOLOCK) where code = physician) /* 开这个医嘱的医生 */, " +
|
|
|
" exec_unit_name = (select top(1) rtrim(name) from zd_unit_code with (NOLOCK) where code = exec_unit), " +
|
|
|
" /*管床医生*/ " +
|
|
|
" refer_physician_name = (select rtrim(name) from a_employee_mi with (NOLOCK) where code = refer_physician), " +
|
|
|
- " group_no_name = (select rtrim(group_name) from yp_zd_group_name with (NOLOCK) where temp.group_no = group_no) " +
|
|
|
+ " group_no_name = (select rtrim(group_name) from yp_zd_group_name with (NOLOCK) where temp.group_no = group_no), " +
|
|
|
+ " signer_name = (select top (1) rtrim(name) from a_employee_mi with (NOLOCK) where code = signer) /*确认人*/, " +
|
|
|
+ " confirm_time /*确认时间*/, " +
|
|
|
+ " modifier, " +
|
|
|
+ " modifier_name = (select top (1) rtrim(name) from a_employee_mi with (NOLOCK) where code = modifier) /*停止人*/, " +
|
|
|
+ " end_time /*停止时间*/ " +
|
|
|
"from ( " +
|
|
|
" select top ${pageSize} * " +
|
|
|
" from (select row_number() over (order by act_order_no) rowIndex, * " +
|
|
@@ -181,6 +184,18 @@ public interface YiZhuLuRuDao {
|
|
|
"<if test=\"frequCode != null and frequCode != '' \">" +
|
|
|
" and frequ_code = #{frequCode}" +
|
|
|
"</if>" +
|
|
|
+ "<if test=\"zhuangTai != 0 and zhuangTai != 3 and zhuangTai != 6 and zhuangTai != 7 \">" +
|
|
|
+ " and status_flag = #{zhuangTai} /*触发*/" +
|
|
|
+ "</if>" +
|
|
|
+ "<if test=\"zhuangTai == 3 \">" +
|
|
|
+ " and status_flag in (3,4) " +
|
|
|
+ "</if>" +
|
|
|
+ "<if test=\"zhuangTai == 6 \">" +
|
|
|
+ " and frequ_code <> 'ONCE' and end_time is null and doctor_flag = '1' and status_flag <> '5' " +
|
|
|
+ "</if>" +
|
|
|
+ "<if test=\"zhuangTai == 7 \">" +
|
|
|
+ " and doctor_flag = '1' and status_flag >= '2' and start_time >= dateadd(hour , -24, getdate()) " +
|
|
|
+ "</if>" +
|
|
|
" ) page " +
|
|
|
" where rowIndex > (${currentPage} - 1) * ${pageSize} " +
|
|
|
" ) temp" +
|
|
@@ -192,7 +207,8 @@ public interface YiZhuLuRuDao {
|
|
|
@Param("startTime") String startTime,
|
|
|
@Param("endTime") String endTime,
|
|
|
@Param("frequCode") String frequCode,
|
|
|
- @Param("orderName") String orderName);
|
|
|
+ @Param("orderName") String orderName,
|
|
|
+ @Param("zhuangTai") Integer zhuangTai);
|
|
|
|
|
|
|
|
|
@Select("<script>" +
|
|
@@ -210,6 +226,18 @@ public interface YiZhuLuRuDao {
|
|
|
"<if test=\"orderName != null and orderName != '' \">" +
|
|
|
" and order_name = #{orderName}" +
|
|
|
"</if>" +
|
|
|
+ "<if test=\"zhuangTai != 3 and zhuangTai != 0 \">" +
|
|
|
+ " and status_flag = #{zhuangTai} " +
|
|
|
+ "</if>" +
|
|
|
+ "<if test=\"zhuangTai == 3 \">" +
|
|
|
+ " and status_flag in (3,4) " +
|
|
|
+ "</if>" +
|
|
|
+ "<if test=\"zhuangTai == 6 \">" +
|
|
|
+ " and frequ_code <> 'ONCE' and end_time is null and doctor_flag = '1' and status_flag <> '5' " +
|
|
|
+ "</if>" +
|
|
|
+ "<if test=\"zhuangTai == 7 \">" +
|
|
|
+ " and doctor_flag = '1' and status_flag >= '2' and start_time >= dateadd(hour , -24, getdate()) " +
|
|
|
+ "</if>" +
|
|
|
" and isnull(parent_no, '') = '' " +
|
|
|
"</script>")
|
|
|
long huoQuYiZhuShuJuTotal(@Param("patNo") String patNo,
|
|
@@ -217,7 +245,8 @@ public interface YiZhuLuRuDao {
|
|
|
@Param("startTime") String startTime,
|
|
|
@Param("endTime") String endTime,
|
|
|
@Param("frequCode") String frequCode,
|
|
|
- @Param("orderName") String orderName);
|
|
|
+ @Param("orderName") String orderName,
|
|
|
+ @Param("zhuangTai") Integer zhuangTai);
|
|
|
|
|
|
|
|
|
@Select("SELECT distinct py_code=a.py_code, " +
|
|
@@ -860,5 +889,15 @@ public interface YiZhuLuRuDao {
|
|
|
@Param("inputId") String inputId,
|
|
|
@Param("collectCode") String collectCode);
|
|
|
|
|
|
+ @Select("select * " +
|
|
|
+ "from yz_act_order " +
|
|
|
+ "where act_order_no = #{actOrderNo} ")
|
|
|
+ YzActOrder chaXunYiZhuXinXin(BigDecimal actOrderNo);
|
|
|
+
|
|
|
+ @Update("update yz_act_order set emergency_flag = #{emergencyFlag} " +
|
|
|
+ "where act_order_no = #{actOrderNo} ")
|
|
|
+ void sheZhiJinJi(@Param("actOrderNo") BigDecimal actOrderNo,
|
|
|
+ @Param("emergencyFlag") String emergencyFlag);
|
|
|
+
|
|
|
|
|
|
}
|