Non-parametric Bayesian Dirichlet Process on frailty model with time to event data

Hi all! I am currently doing a model with the time to event data. I use a shared frailty model, where the frailty component is set to be random.
The hazard model looks like
h(t) = h_0(t)u_j
The u_j is assumed to come from a mixture Gamma, and I set a Dirichlet process as the prior to the mixture Gamma, which is
u_j|theta_j ~ Gamma(theta_j, theta_j)
theta_j|G ~ G
G|alpha, G_0 ~ DP(alphaG_0)

I wonder whether it is possible to sample from Dirichlet process with Rstan. Thanks!

I seem to recall nonparametrics coming up a few times in the forum before. This seems to be a good starting point. I think the TL;DR is that it is sometimes possible with some computational/analytical tricks but not necessarily what Stan is built for.

Thanks for the info!