|
@@ -68,7 +68,7 @@ public interface MedicalManagementDao {
|
|
|
" new_order_name = rtrim(a.order_name) + (case when a.group_no <> '00' then (case when isnull(a.drug_specification,'')=''then '' else '(' + isnull(a.drug_specification,'')+')' end) + ' ' +\n" +
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else rtrim(a.dose) + (select name from yp_zd_unit where code=a.dose_unit) end) + ' ' +\n" +
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else '共'+ rtrim(a.drug_quan) + (select name from yp_zd_unit where code=a.mini_unit) end) else isnull(a.drug_specification,'') end )"+
|
|
|
- " FROM yz_act_order a, yz_order_item b , view_zy_patient_all c\n" +
|
|
|
+ " FROM ${tableName} a, yz_order_item b , view_zy_patient_all c\n" +
|
|
|
" WHERE a.inpatient_no = #{patNo} and\n" +
|
|
|
" a.admiss_times = #{times} AND\n" +
|
|
|
" ${pageCondition} and \n" +
|
|
@@ -128,7 +128,7 @@ public interface MedicalManagementDao {
|
|
|
" new_order_name = rtrim(a.order_name) + (case when a.group_no <> '00' then (case when isnull(a.drug_specification,'')=''then '' else '(' + isnull(a.drug_specification,'')+')' end) + ' ' +\n" +
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else rtrim(a.dose) + (select name from yp_zd_unit where code=a.dose_unit) end) + ' ' +\n" +
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else '共'+ rtrim(a.drug_quan) + (select name from yp_zd_unit where code=a.mini_unit) end) else isnull(a.drug_specification,'') end )"+
|
|
|
- " FROM yz_act_order a, view_zy_patient_all c\n" +
|
|
|
+ " FROM ${tableName} a, view_zy_patient_all c\n" +
|
|
|
" WHERE a.inpatient_no = #{patNo} and\n" +
|
|
|
" a.admiss_times = #{times} AND\n" +
|
|
|
" ${pageCondition} and" +
|
|
@@ -139,7 +139,7 @@ public interface MedicalManagementDao {
|
|
|
" a.group_no <> '00' and\n" +
|
|
|
" a.doctor_flag='1'\n" +
|
|
|
"order by page_no,confirm_time,act_order_no_b,act_order_no")
|
|
|
- List<YzPrintVO> getcqYzPrint(@Param("patNo") String patNo, @Param("times")Integer times,@Param("pageCondition")String pageCondition);
|
|
|
+ List<YzPrintVO> getcqYzPrint(@Param("patNo") String patNo, @Param("times")Integer times,@Param("pageCondition")String pageCondition,@Param("tableName")String tableName);
|
|
|
@Select("SELECT act_order_no=a.act_order_no,\n" +
|
|
|
" inpatient_no=a.inpatient_no,\n" +
|
|
|
" name =c.name,\n" +
|
|
@@ -190,7 +190,7 @@ public interface MedicalManagementDao {
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else rtrim(a.dose) + (select name from yp_zd_unit where code=a.dose_unit) end) + ' ' +\n" +
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else '共'+ rtrim(a.drug_quan) + (select name from yp_zd_unit where code=a.mini_unit) end) else ' ' end),\n" +
|
|
|
" a.confirm_time\n" +
|
|
|
- " FROM yz_act_order a, yz_order_item b,view_zy_patient_all c\n" +
|
|
|
+ " FROM ${tableName} a, yz_order_item b,view_zy_patient_all c\n" +
|
|
|
" WHERE a.inpatient_no = #{patNo} and\n" +
|
|
|
" a.admiss_times = #{times} AND\n" +
|
|
|
" ${pageCondition} and\n" +
|
|
@@ -253,7 +253,7 @@ public interface MedicalManagementDao {
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else rtrim(a.dose) + (select name from yp_zd_unit where code=a.dose_unit) end) + ' ' +\n" +
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else '共'+ rtrim(a.drug_quan) + (select name from yp_zd_unit where code=a.mini_unit) end) else isnull(a.drug_specification,'') end ),\n" +
|
|
|
" a.confirm_time\n" +
|
|
|
- " FROM yz_act_order a, view_zy_patient_all c\n" +
|
|
|
+ " FROM ${tableName} a, view_zy_patient_all c\n" +
|
|
|
" WHERE a.inpatient_no = #{patNo} and\n" +
|
|
|
" a.admiss_times = #{times} AND\n" +
|
|
|
" ${pageCondition} and\n" +
|
|
@@ -314,7 +314,7 @@ public interface MedicalManagementDao {
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else rtrim(a.dose) + (select name from yp_zd_unit where code=a.dose_unit) end) + ' ' +\n" +
|
|
|
" (case when isnull(a.dose_unit,'') = '' then '' else '共'+ rtrim(a.drug_quan) + (select name from yp_zd_unit where code=a.mini_unit) end) else isnull(a.drug_specification,'') end ),\n" +
|
|
|
" a.confirm_time\n" +
|
|
|
- " FROM yz_act_order a, view_zy_patient_all c\n" +
|
|
|
+ " FROM ${tableName} a, view_zy_patient_all c\n" +
|
|
|
" WHERE a.inpatient_no = #{patNo} and\n" +
|
|
|
" a.admiss_times = #{times} AND\n" +
|
|
|
" ${pageCondition} and\n" +
|
|
@@ -326,7 +326,7 @@ public interface MedicalManagementDao {
|
|
|
" a.group_no = '00' and\n" +
|
|
|
" (a.order_name like '%草药%' or a.order_name like '%会诊%')\n" +
|
|
|
"order by page_no,confirm_time,act_order_no_b")
|
|
|
- List<YzPrintVO> getlsYzPrint(@Param("patNo") String patNo, @Param("times")Integer times,@Param("pageCondition")String pageCondition);
|
|
|
+ List<YzPrintVO> getlsYzPrint(@Param("patNo") String patNo, @Param("times")Integer times,@Param("pageCondition")String pageCondition,@Param("tableName") String tableName);
|
|
|
@Select("select\n" +
|
|
|
" RTRIM(a.bed_no) bedNo,\n" +
|
|
|
" RTRIM(a.inpatient_no) inpatientNo,\n" +
|
|
@@ -338,7 +338,7 @@ public interface MedicalManagementDao {
|
|
|
List<Patient> queryPatientInfo(@Param(Constants.WRAPPER)QueryWrapper<?> query,@Param("tableName")String tableName);
|
|
|
@Select("select top 1 1 from op_record where inpatient_no=#{patNo} and admiss_times=#{times}")
|
|
|
Integer existOprt(@Param("patNo") String patNo, @Param("times")Integer times);
|
|
|
- @Select(" select max(print_page) print_page,max(print_page_once) print_page_once from yz_act_order where inpatient_no=#{patNo} and admiss_times =#{times} ")
|
|
|
+ @Select(" select max(print_page) print_page,max(print_page_once) print_page_once from ${tableName} where inpatient_no=#{patNo} and admiss_times =#{times} ")
|
|
|
YzPrintVO selectMaxPagaNo(YzOrderParam param);
|
|
|
@Update(" UPDATE yz_act_order SET ${printPageWhere} = #{pageNo} WHERE act_order_no in (${orderNoList})")
|
|
|
void updatePrintPageNo(@Param("orderNoList") String orderNoList,@Param("pageNo")Integer pageNo, @Param("printPageWhere")String printPageWhere);
|