|
@@ -1,6 +1,7 @@
|
|
|
package cn.hnthyy.thmz.mapper.his.zy;
|
|
|
|
|
|
import cn.hnthyy.thmz.entity.his.yz.YzYpPageNo;
|
|
|
+import cn.hnthyy.thmz.entity.his.yz.YzYpZyOrder;
|
|
|
import cn.hnthyy.thmz.entity.his.zy.YpZyPatient;
|
|
|
import cn.hnthyy.thmz.vo.YzYpPageNoVo;
|
|
|
import org.apache.ibatis.annotations.Insert;
|
|
@@ -176,7 +177,8 @@ public interface YpZyPatientMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "SELECT page_no,dept_code,ward_code,page_type,max(confirm_time)confirm_time," +
|
|
|
+ "SELECT page_no,(case WHEN ISNULL(section_code,0)=0 or rtrim(section_code)='' THEN max(ward_code) else section_code end)as ward_code," +
|
|
|
+ "page_type as page_class,max(confirm_time)confirm_time," +
|
|
|
"max(drawer) as submit_name,max(keeper) as contirm_id from yp_zy_patient WITH(NOLOCK)" +
|
|
|
" where group_no = #{groupNo} " +
|
|
|
"<when test='pageNo!=null'>",
|
|
@@ -194,7 +196,48 @@ public interface YpZyPatientMapper {
|
|
|
"<when test='submitEndDate!=null'>",
|
|
|
" and confirm_time <=#{submitEndDate,jdbcType=TIMESTAMP}",
|
|
|
"</when>" +
|
|
|
- " group by page_no,dept_code,ward_code,page_type order by confirm_time desc"
|
|
|
+ " group by page_no,section_code,page_type order by confirm_time desc"
|
|
|
, "</script>"})
|
|
|
List<YzYpPageNo> selectYzYpPageNo(YzYpPageNoVo yzYpPageNoVo);
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询药品请领单发药明细
|
|
|
+ * @param pageNo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Select({
|
|
|
+ "select charge_code=rtrim(a.charge_code) ,\n" +
|
|
|
+ " serial =a.serial ,\n" +
|
|
|
+ " amount =a.amount ,\n" +
|
|
|
+ " retprice =a.retprice,\n" +
|
|
|
+ " page_no =a.page_no,\n" +
|
|
|
+ " inpatient_no=rtrim(a.inpatient_no),\n" +
|
|
|
+ " admiss_times=a.admiss_times,\n" +
|
|
|
+ " act_order_no=a.act_order_no,\n" +
|
|
|
+ " occ_time =a.order_date,\n" +
|
|
|
+ " name =a.name,\n" +
|
|
|
+ " bed_no =a.bed_no,\n" +
|
|
|
+ " ward_code =a.ward_code,\n" +
|
|
|
+ " dept_code =a.dept_code,\n" +
|
|
|
+ " infant_flag =a.infant_flag,\n" +
|
|
|
+ " drawer =a.drawer,\n" +
|
|
|
+ " always_flag =a.always_flag,\n" +
|
|
|
+ " self_flag =a.self_flag,\n" +
|
|
|
+ " separate_flag=a.separate_flag,\n" +
|
|
|
+ " suprice_flag =a.suprice_flag,\n" +
|
|
|
+ " drug_flag =a.drug_flag,\n" +
|
|
|
+ " pay_self =a.pay_self,\n" +
|
|
|
+ " doctor_name =a.doctor_name,\n" +
|
|
|
+ " zy_serial_no =a.zy_serial_no,\n" +
|
|
|
+ " group_no=a.group_no,\n" +
|
|
|
+ " doctor_name=a.doctor_name,\n" +
|
|
|
+ " page_class=a.page_type,\n" +
|
|
|
+ " drug_class=a.drug_class\n" +
|
|
|
+ "from yp_zy_patient a WITH(NOLOCK)" +
|
|
|
+ " where a.page_no =#{pageNo} " +
|
|
|
+ "order by a.inpatient_no,a.occ_time,a.admiss_times,a.charge_code"
|
|
|
+ })
|
|
|
+ List<YzYpZyOrder> selectYpZyPatientFyDetail(@Param("pageNo") String pageNo);
|
|
|
+
|
|
|
}
|