RTIInternational / virtual-opioid-user

Continuous model of an individual's opioid user over time
Other
1 stars 1 forks source link

added compliance/non-compliance logic #35

Closed berghammeraj closed 2 years ago

berghammeraj commented 2 years ago

The goal of this small PR is to add logic for including compliance throughout the simulation. This current iteration doesn't keep the record of compliance, but this could easily be added if needed. The current logic just looks at the source and if the source is not PRIMARY_DOCTOR then the compliant indicator is false.

sandypreiss commented 2 years ago

I think it's worth it to go ahead and keep a record of compliance over time, because the end goal here is to visualize (non)compliance, and we'll need a record for that.

In fact, we might as well just keep a record of dose_source over time rather than deriving compliance from that variable. That way we can add more detail to the viz if we want to. E.g., could envision visualizing "non-compliant (dealer)" vs "non-compliant (second prescription)", etc.

berghammeraj commented 2 years ago

Good call, I added logic in the latest commit to keep track of dose source over time. I kept compliance as an attribute just in case we want to keep it later, but happy to discuss further! Let me know your thoughts on the keeping track logic!

sandypreiss commented 2 years ago

Looks good.