
            select
                substring(EvnLabSample_Num, 5, 8) as "EvnLabSample_Num"
            from
                v_EvnLabSample ELS
            where
                LabSampleStatus_id in (1,2,3,7)
                and length(ELS.EvnLabSample_Num) = 12
                and ELS.MedService_id = '550101000004039'
                and (ELS.EvnLabSample_setDate > ((localtimestamp) - interval '1 day' * 90)::date)
        
