editpatient and registerpatient modified