<?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.docus.server.archivemysql.mapper.TBasicMapper">
    <sql id="basicInfoColumns">
        patient_id as patientId,
            admiss_times as admissTimes,
            inpatient_no as inpatientNo,
            admiss_id as admissId,
            admiss_date as admissDate,
            dis_date as disDate,
            admiss_dept_name as admissDeptName,
            dis_dept_name as disDeptName ,
            jzh,
            name,
            emp_id as empId
    </sql>
    <select id="findTbasicByJzhs" resultType="com.docus.server.archivemysql.entity.TBasic">
        select
        <include refid="basicInfoColumns"></include>
        from
        docus_medicalrecord.t_basic
        where
        jzh in
        <foreach collection="jzhList" item="jzh" separator="," open="(" close=")">
            #{jzh}
        </foreach>
    </select>
</mapper>
