CrmPatientMiDao.java 1.7 KB

1234567891011121314151617181920212223242526272829303132
  1. package thyyxxk.webserver.dao.his.chronicDisease;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import org.apache.ibatis.annotations.Delete;
  4. import org.apache.ibatis.annotations.Param;
  5. import org.apache.ibatis.annotations.Select;
  6. import thyyxxk.webserver.entity.chronicDisease.CrmPatientMi;
  7. public interface CrmPatientMiDao extends BaseMapper<CrmPatientMi> {
  8. @Select(" select top 1 mi.*, tz.height, tz.weight, tz.temperature, tz.respiratory_rate, tz.heart_rate, " +
  9. " tz.blood_sugar, tz.blood_pressure_high, tz.blood_pressure_low, tz.blood_oxygen, rtrim(p.name) as referPhysicianName " +
  10. " from crm_patient_mi mi" +
  11. " left join crm_patient_tzxx tz on (mi.p_id = tz.p_id collate Chinese_PRC_BIN) and mi.visit_times = tz.visit_times " +
  12. " left join a_employee_mi p on mi.refer_physician = p.code collate Chinese_PRC_BIN " +
  13. " where mi.social_no = #{keyCode} or mi.his_mz_no = #{keyCode} or mi.his_zy_no = #{keyCode} or mi.his_tj_no = #{keyCode}" +
  14. " or mi.p_name = #{keyCode} or mi.p_id = #{keyCode} ")
  15. CrmPatientMi selectCrmPatientMiByCode(@Param("keyCode") String keyCode);
  16. @Select(" select * from crm_patient_mi where social_no = #{socialNo} ")
  17. CrmPatientMi selectCrmPatientMiBySocialNo(@Param("socialNo") String socialNo);
  18. @Select(" select * from crm_patient_mi where p_id = #{pId} ")
  19. CrmPatientMi selectCrmPatientMiByPId(@Param("pId") String pId);
  20. @Delete(" delete from crm_patient_mi where social_no = #{socialNo} ")
  21. void deleteCrmPatientMiBySocialNo(@Param("socialNo") String socialNo);
  22. @Delete(" delete from crm_patient_mi where p_id = #{pId} ")
  23. void deleteCrmPatientMiByPId(@Param("pId") String pId);
  24. }