陈昶聿
昨天 c1f47dd490c6c8d69708eb7cda2330bb89623257
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -1013,7 +1013,8 @@
        where 1=1
        and del_flag = 0
        and service_type=2
        and is_visit_again = 0
        and visit_count is not null
        and visit_count = 1
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
        </if>
@@ -1042,7 +1043,8 @@
        where 1=1
        and del_flag = 0
        and service_type=2
        and is_visit_again = 1
        and visit_count is not null
        and visit_count > 1
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
        </if>
@@ -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>