back and next button in patient records page