123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?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.ruoyi.web.work.mapper.Pv1Mapper">
- <select id="selectList" resultType="com.ruoyi.web.work.domain.Pv1">
- select * from tb_pv1
- <where>
- <if test="id != null "> and id = #{id}</if>
- <if test="patientId != null "> and patient_id = #{patientId}</if>
- <if test="cardId != null "> and card_id = #{cardId}</if>
- <if test="patientCategory != null and patientCategory != ''"> and patient_category = #{patientCategory}</if>
- <if test="bed != null and bed != ''"> and bed = #{bed}</if>
- <if test="physician != null and physician != ''"> and physician = #{physician}</if>
- <if test="nurseCode != null and nurseCode != ''"> and nurse_code = #{nurseCode}</if>
- <if test="hospitalizedNumber != null and hospitalizedNumber != ''"> and hospitalized_number = #{hospitalizedNumber}</if>
- <if test="feeCategory != null and feeCategory != ''"> and fee_category = #{feeCategory}</if>
- <if test="dischargeMethod != null and dischargeMethod != ''"> and discharge_method = #{dischargeMethod}</if>
- <if test="medicalCode != null and medicalCode != ''"> and medical_code = #{medicalCode}</if>
- <if test="hospitalStatus != null and hospitalStatus != ''"> and hospital_status = #{hospitalStatus}</if>
- <if test="registrationStatus != null and registrationStatus != ''"> and registration_status = #{registrationStatus}</if>
- <if test="admissionTime != null and admissionTime != ''"> and admission_time = #{admissionTime}</if>
- <if test="dischargeTime != null and dischargeTime != ''"> and discharge_time = #{dischargeTime}</if>
- <if test="msgId != null "> and msg_id = #{msgId}</if>
- <if test="department != null and department != ''"> and department = #{department}</if>
- <if test="wardCode != null and wardCode != ''"> and ward_code = #{wardCode}</if>
- <if test="wardName != null and wardName != ''"> and ward_name = #{wardName}</if>
- </where>
- </select>
- <select id="getPatientCardByNameOrDepartment" resultType="com.ruoyi.web.work.domain.PatientCard">
- SELECT
- tb_pv1.department,
- tb_pv1.physician,
- tb_patient.`name`,
- tb_pv1.discharge_method,
- tb_pv1.discharge_time,
- tb_pv1.id,
- tb_pv1.patient_id,
- tb_pv1.card_id
- FROM
- tb_pv1
- JOIN
- tb_patient ON tb_pv1.patient_id = tb_patient.id
- <where>
- <if test="patientName!='' and patientName!=null">
- tb_patient.`name` like concat('%', #{patientName}, '%')
- </if>
- <if test="departmentName!='' and departmentName!= null">
- AND tb_pv1.department =#{departmentName}
- </if>
- <if test="physician!='' and physician!= null">
- AND tb_pv1.physician like concat('%', #{physician}, '%')
- </if>
- </where>
- </select>
- <select id="getAllDepartment" resultType="com.ruoyi.web.work.domain.PatientCard">
- select department from tb_pv1 GROUP BY department
- </select>
- </mapper>
|