1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- package thyyxxk.webserver.dao.his.casefrontsheet;
- import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
- import com.baomidou.mybatisplus.core.toolkit.Constants;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Select;
- import org.apache.ibatis.annotations.Update;
- import thyyxxk.webserver.entity.casefrontsheet.JieShouHuiZhenPojo;
- import java.math.BigDecimal;
- import java.util.List;
- /**
- * <p>
- * 描述: 接收会诊申请
- * </p>
- *
- * @author xc
- * @date 2021-07-27 10:29
- */
- @Mapper
- public interface JieShouHuiZhenDao {
- @Select("select bed_no,name,a.admiss_times,a.inpatient_no,req_times,hz_type," +
- "dept_code_name = (select rtrim(name) from zd_unit_code with (nolock) where code = dept_code), " +
- "req_dept1_name = (select rtrim(name) from zd_unit_code with (nolock) where code = req_dept1)," +
- " admiss_date " +
- "from ysh_hz_record a with(nolock) " +
- " inner join zy_actpatient b with(nolock) on " +
- " (b.inpatient_no = a.inpatient_no)" +
- " ${ew.customSqlSegment} ")
- List<JieShouHuiZhenPojo> getHuiZhenData(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
- /**
- * 根据职称获取医嘱的编码
- *
- * @param code 职称
- * @return 医嘱码
- */
- @Select("SELECT order_code FROM zd_emp_title where code = #{code} ")
- String getOrderCodeByEmpTit(String code);
- @Select("select a.inpatient_no, " +
- " b.admiss_date, " +
- " rtrim(name) name, " +
- " bed_no, " +
- " a.admiss_times, " +
- " sex, " +
- " req_date," +
- " req_dept1, " +
- " (select rtrim(name) name from zd_unit_code with (nolock) where code = req_dept1) req_dept1_name, " +
- " (select birth_date from a_patient_mi with (nolock) where a.inpatient_no = a_patient_mi.inpatient_no) birth_date, " +
- " (select rtrim(name) name from zd_unit_code with (nolock) where code = req_dept2) req_dept2, " +
- " req_times, " +
- " (select rtrim(name) name from a_employee_mi with (nolock) where input_id = code) req_doctor, " +
- " hz_type, " +
- " (select rtrim(name) name " +
- " from zd_unit_code with (nolock) " +
- " where code = dept_code) dept_code_name, " +
- " req_comment, " +
- " hz_zd, " +
- " hz_md, " +
- " hz_comment," +
- " hz_doctor2, " +
- " (select rtrim(name) name " +
- " from a_employee_mi with (nolock) " +
- " where code = hz_doctor2) hz_doctor2_name, " +
- " hz_doctor2, " +
- " hz_date," +
- " hz_level," +
- " hz_level_name = (select rtrim(name) from ysh_zd_hz_level where code = hz_level)," +
- " cast(act_order_no AS decimal) as act_order_no " +
- "from ysh_hz_record a with(nolock) inner join zy_actpatient b with(nolock) on " +
- "(b.inpatient_no = a.inpatient_no) where a.admiss_times = #{admissTimes} and a.inpatient_no = #{inpatientNo} and a.req_times = #{reqTimes}")
- JieShouHuiZhenPojo getHuanZheXinXi(@Param("admissTimes") Integer admissTimes,
- @Param("reqTimes") Integer reqTimes,
- @Param("inpatientNo") String inpatientNo);
- @Update("<script>" +
- "update ysh_hz_record " +
- "<trim prefix = 'set' suffixOverrides=','>" +
- "status_flag = #{statusFlag} , hz_comment = #{hzComment},hz_type = #{hzType}," +
- "<if test=\"statusFlag == 2 \">" +
- "hz_date = getdate() , hz_id = hz_doctor1 , hz_doctor2 = #{hzDoctor2} " +
- "</if> " +
- "</trim>" +
- "where admiss_times = #{admissTimes} and inpatient_no = #{inpatientNo} and req_times = #{reqTimes}" +
- "</script>")
- void wanChenHuiZhen(JieShouHuiZhenPojo param);
- @Update("update yz_act_order set order_code = #{code} where act_order_no = #{orderNo} ")
- void updateOrderConsultationCode(String code, BigDecimal orderNo);
- @Select("select name from zd_unit_code with(nolock) where code = #{deptCode}")
- String getDeptName(String deptCode);
- }
|