worked on nested form
converted queries to scopes in patient model