Closed skroiss-idm closed 4 years ago
Should already be possible -- example solution:
prognoses = cv.get_prognoses()
prognoses['comorbidities'] = np.array([1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 2.00, 3.00, 4.00])
pars = {'prognoses': prognoses}
sim = cv.Sim(pars)
The prognoses are currently hard coded into the get_prognoses function in parameters.py. A better option would be to move those definitions into the pars section in make_pars. This would allow users to specify those variables during model initialization.
Specific recommendation is to add these lines within make_pars: `
Set disease prognoses
Then replace the associated lines in get_prognoses with:
if not by_age: prognoses = pars['prognoses_noage'] else: prognoses = pars['prognoses_byage']