updated anc_visits method to include checks based on time