            SELECT DISTINCT atdtl.EMDDocumentTypeLocal_id AS "EMDDocumentTypeLocal_id"
              FROM dbo.v_ARMType at
                  JOIN dbo.v_ARMTypeDocumentTypeLink atdtl ON at.ARMType_id = atdtl.ARMType_id
                  AND exists (SELECT 1
                    FROM dbo.v_DocumentsSigning ds
                    WHERE ds.EMDDocumentTypeLocal_id = atdtl.EMDDocumentTypeLocal_id
                    and ds.EMDPersonRole_id IN (14))
             WHERE at.ARMType_SysNick IN ('vk','mse','lvn','polka','regpol6','lpuadmin6')
