Added filters and made further modifications for verifying patients