1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package thyyxxk.wxservice_server.dao;
- import org.apache.ibatis.annotations.*;
- import thyyxxk.wxservice_server.entity.PureCodeName;
- import thyyxxk.wxservice_server.entity.assessment.CovidQuestionnaire;
- import thyyxxk.wxservice_server.entity.appointment.DoctorInfo;
- /**
- * @author dj
- */
- @Mapper
- public interface AppointmentDao {
- /**
- * 获取医生信息
- * @param doctorCode 医生编码
- * @param openId 用户的openId,用于判断医生是否被用户收藏
- * @return 医生信息
- * */
- @Select("select " +
- "rtrim(a.code) doctorCode, " +
- "rtrim(a.name) doctorName, " +
- "rtrim(b.name) doctorTitle, " +
- "rtrim(a.dept_code) deptCode, " +
- "deptName=(select rtrim(name) from zd_unit_code with(nolock) where code=a.dept_code), " +
- "a.specialty, " +
- "a.introduction, " +
- "a.portrait, " +
- "collected=(select count(1) from t_wechat_patient_collection with(nolock) where " +
- "doctor_code=#{doctorCode} and open_id=#{openId}) " +
- "from a_employee_mi a with(nolock), zd_emp_title b with(nolock) " +
- "where a.code=#{doctorCode} and " +
- "a.emp_tit_code=b.code and " +
- "a.code not in ('00000', '00026') and " +
- "isnull(a.del_flag,0)<>1")
- DoctorInfo selectDoctorInfo(@Param("doctorCode") String doctorCode, @Param("openId") String openId);
- @Select("select top 1 * from t_covid19_assessment with(nolock) where patient_id=#{patientId} and " +
- "datediff(day, date, getdate()) <= 3 order by date desc")
- CovidQuestionnaire validCovidAssessment(@Param("patientId") String patientId);
- @Select("select rtrim(social_no) from mz_patient_mi with(nolock) where patient_id=#{patientId}")
- String selectPatientIdCard(@Param("patientId") String patientId);
- @Select("select rtrim(mz_class) from zd_unit_code with(nolock) where code=#{code}")
- String selectMzClass(@Param("code") String code);
- @Select("select isnull(portrait,'') as portrait,isnull(introduction,'') as introduction " +
- "from a_employee_mi with(nolock) where code=#{code}")
- DoctorInfo selectPortraitAndIntroduction(@Param("code") String code);
- }
|