rails patient/doctor portal