refactor registerPatient test