refactored query for pulling anc visits for dashboard display