Asymptotic results for a generalized Pòlya urn with delay and an applications to clinical trials