PatientMapper.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.web.work.mapper.PatientMapper">
  6. <select id="selectList" resultType="com.ruoyi.web.work.domain.Patient">
  7. select * from tb_patient
  8. <where>
  9. tb_patient.event_type='7'
  10. <if test="id != null "> and id = #{id}</if>
  11. <if test="patId != null and patId != ''"> and pat_id = #{patId}</if>
  12. <if test="patientCode != null and patientCode != ''"> and patient_code = #{patientCode}</if>
  13. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  14. <if test="birthDate != null and birthDate != ''"> and birth_date = #{birthDate}</if>
  15. <if test="sex != null and sex != ''"> and sex = #{sex}</if>
  16. <if test="address != null and address != ''"> and address = #{address}</if>
  17. <if test="phone != null and phone != ''"> and phone = #{phone}</if>
  18. <if test="workPhone != null and workPhone != ''"> and work_phone = #{workPhone}</if>
  19. <if test="marital != null and marital != ''"> and marital = #{marital}</if>
  20. <if test="nation != null and nation != ''"> and nation = #{nation}</if>
  21. <if test="career != null and career != ''"> and career = #{career}</if>
  22. <if test="nationality != null and nationality != ''"> and nationality = #{nationality}</if>
  23. <if test="eventTime != null and eventTime != ''"> and event_time = #{eventTime}</if>
  24. <if test="eventType != null and eventType != ''"> and event_type = #{eventType}</if>
  25. <if test="blh != null and blh != ''"> and blh = #{blh}</if>
  26. <if test="brkh != null and brkh != ''"> and brkh = #{brkh}</if>
  27. <if test="sfzh != null and sfzh != ''"> and sfzh = #{sfzh}</if>
  28. <if test="yexh != null and yexh != ''"> and yexh = #{yexh}</if>
  29. <if test="msgType != null and msgId != ''"> and msg_Type = #{msgType}</if>
  30. </where>
  31. </select>
  32. <select id="getPatientCardByNameOrRoomOrEntity" resultType="com.ruoyi.web.work.domain.dto.PatientCardDto">
  33. </select>
  34. <select id="getPatientByDepartment" resultType="com.ruoyi.web.work.domain.dto.PatientCardDto">
  35. SELECT
  36. tb_pv1.department,
  37. tb_pv1.physician,
  38. tb_patient.`name`,
  39. tb_pv1.discharge_method,
  40. tb_pv1.discharge_time,
  41. tb_pv1.card_id
  42. FROM
  43. tb_pv1
  44. JOIN
  45. tb_patient ON tb_pv1.patient_id = tb_patient.id
  46. where tb_pv1.department=#{department} and tb_patient.event_type='7'
  47. </select>
  48. </mapper>