<?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.mzsy.mapper.MzsyShoumaReportDataViewMapper">


    <select id="findByinpNoAndTimesAndOtherCondition"
            resultType="com.docus.server.mzsy.entity.MzsyShoumaReportDataView">
        select
            住院号 as zyh,
            住院次数 as zycs,
            报告文件路径 as filePath,
            报告标题 as fileTitle,
            归档时间 as archiveTime,
            申请单号 as requestNo
        from dbo.V_病历共享
        where 住院号=#{inpatientNo}
        and 住院次数=#{admissTimes}
        <if test="ext != null and ext != ''">
            ${ext}
        </if>
        order by 归档时间 asc
    </select>
</mapper>
