A nonlinear dynamic factor model of health and medical treatment. (20th March 2022)