synthetichealth / module-builder

Synthea Generic Module Builder
https://synthetichealth.github.io/module-builder/
Apache License 2.0
29 stars 30 forks source link

Attribute-based Distributions #135

Open jawalonoski opened 6 years ago

jawalonoski commented 6 years ago

Distributions can be based off attribute values (the wiki was wrong):

For example:

"distribution": { "attribute" : "probability_of_fall_injury", "default" : 0.06 },

See https://github.com/synthetichealth/synthea/issues/289

jawalonoski commented 6 years ago

https://github.com/synthetichealth/synthea/wiki/Generic-Module-Framework%3A-Transitions#named-probabilities

arscan commented 6 years ago

Interesting, this is a powerful feature and enables some pretty cool system-dynamics type modeling.

arscan commented 6 years ago

@jawalonoski it looks like this already exists. When looking at a distributed transition, click on 'Change to named transition', and you get a view like this (on the second transition):

screen shot 2018-05-21 at 2 27 50 pm

It appears to show up in the JSON correctly too. Am I missing something?

I should change 'Weight' to 'Default Weight', and remove hte 'not adding up to 100%' warning, as that value is expected to change over time though.

arscan commented 6 years ago

And I guess if any of the transitions are named, we should allow any number, instead of constraining to 0-1, right?

jawalonoski commented 6 years ago

Correct, if any transitions are named, you could say something like "Weights might not add up to 100% when using named transitions." Otherwise, you can use the current warning language.

arscan commented 6 years ago

Changed Weight to Default Weight in #181

Will leave open to handle the 'not add up to 100' case, but will set to 'low priority enhancement' as it doesn't prevent usage.