陈昶聿
昨天 2d6018d0d3a4e21ddf805d8f2eaae7260f512c1a
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -1013,6 +1013,7 @@
        where 1=1
        and del_flag = 0
        and service_type=2
        and visit_count is not null
        and visit_count = 1
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
@@ -1042,6 +1043,7 @@
        where 1=1
        and del_flag = 0
        and service_type=2
        and visit_count is not null
        and visit_count > 1
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
@@ -1089,4 +1091,16 @@
        ) AS combined_data
    </select>
    <!-- 查询三个维度任意一个未处理的出院患者 -->
    <select id="selectNeedProcessList" resultMap="PatMedInhospResult">
        SELECT * FROM pat_med_inhosp
        WHERE inhospstate = '1'
          AND fuflag = '1'
          AND del_flag = '0'
          AND (
            dept_check_flag = '0'
                OR ward_check_flag = '0'
                OR diag_check_flag = '0'
            )
    </select>
</mapper>