COVI-AgentSim icon indicating copy to clipboard operation
COVI-AgentSim copied to clipboard

Precondition dependencies for "stroke"

Open plstcharles opened this issue 4 years ago • 0 comments

Originally: issue #130 on COVI-Canada. Opened by @carriepl on 2020/07/03.

Currently, in _get_preexisting_conditions(), there is the following bit of code :

        if c_name == 'stroke':
            modifier = len(conditions)

So, someone currently can't have a stroke if they don't have one of the previous preconditions (smoker, diabetes, heart_disease, cander, COPD, asthma) but they can as soon as they get any of them, even just something like "smoker".

It is definitely wrong but I don't know what the expected behavior is so I can't really fix it at the moment.

If the expected behavior is that those preconditions simply increase the likelihood of having a stroke but they are not requirements for having a stroke, then I guess something like on the order : modifier = len(conditions) + 1 would resolve the issue with minimal change.

If some of those conditions (like "heart disease") are indeed requirements for having a stroke and the other pre-conditions simply increase the likelihood, then the code should be modified to reflect that dependency. For instance something like modifier = int("heart_disease" in conditions) * len(conditions) or something to that general effect.

plstcharles avatar Jul 09 '20 21:07 plstcharles