Code cleanup for patient page.