
                select
                    count(*) as cnt
                from
                    v_EvnXml ex
                    inner join (
                        select
                            pm.pmUser_id
                        from
                            v_pmUserCache pm
                            inner join v_pmUserCache pmc on pm.MedPersonal_id = pmc.MedPersonal_id
                        where
                            pmc.pmUser_id = '371824520300'
                    ) pm on pm.pmUser_id = ex.pmUser_insID
                where
                    ex.Evn_id != '890101022139168'
                    and ex.XmlType_id = 3
            
