Modelling population and disease dynamics in complex ecological systems