<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.emr.dao.tCheck.TCheckMapper" >
  <resultMap id="BaseResultMap" type="com.emr.entity.tCheck.TCheck" >
  </resultMap>
  <!--根据编号或名称对应的单个对象或多个对象-->
  <select id="selectIsMedicineByPatientId" resultMap="BaseResultMap">
      SELECT
          *
      FROM
          t_check
      <where>
           medicine != ''
         AND
           medicine != '无'
         AND
           medicine != null
        <if test="patientId != null and patientId != ''">
          AND patient_id = #{patientId}
        </if>
      </where>
  </select>
</mapper>