fixed  a cancel url issue when registering a patient