Modeling public health and healthcare systems