Statistical Mechanics Approaches To Network Meta-Analysis And Dynamic Prediction With Time-Varying Covariates