Closed safaahmadian closed 2 years ago
Can you explain the rationale for why that should be the case? @safaahmadian
Some outputs depend on the state of diagnosis. When a patient has an exacerbation, she might get diagnosed immediately. In that case, we should add to the number of exacerbations in diagnosed patients, rather than undiagnosed ones. I found the bug due to the inconsistency between the event_matrix and the outputex, because the exacerbation event is pushed to the matrix after the diagnosis has been updated.
It's a compatibility issue between Cgetoutput
and get_event_matrix()
.
In model.cpp > event_exacerbation_process, the section for # (OUTPUT_EX & OUTPUT_EX_EXACERBATION)>0 should be moved to the end of the function, after diagnosis_flag is updated.