Generalized method for adaptive randomization in clinical trials | Synapse