If the discrete variables are observed, this could be done relatively easily. If they are latent, well… good luck…