-
Notifications
You must be signed in to change notification settings - Fork 659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Physiology Models #1347
base: master
Are you sure you want to change the base?
Physiology Models #1347
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1347 +/- ##
=========================================
Coverage 76% 77%
- Complexity 3850 4095 +245
=========================================
Files 178 178
Lines 24997 25473 +476
Branches 3535 3700 +165
=========================================
+ Hits 19136 19693 +557
+ Misses 4735 4674 -61
+ Partials 1126 1106 -20 ☔ View full report in Codecov by Sentry. |
3f356f3
to
a9d1c1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The details of the new simulations and models are a little bit over my head so I can't comment too much on those. In general they look fine to me. The 4 new modules though, I'm not super clear on the intent of those and I think that needs to be clear before we decide where to go with this. 3 of the 4 new modules are named "wearables" but wearable devices are only a piece of what's in the module. All of them assign a new Condition to an individual which I see is meant to be the reason an individual uses a wearable but I would want to see more detail in the subsequent clinical progression of the modules. Are they intended to be top-level modules? (ie, are these meant to be run for the entire population?)
"remarks": [ | ||
"About one-in-five Americans use a smart watch or fitness tracker. \n https://www.pewresearch.org/short-reads/2020/01/09/about-one-in-five-americans-use-a-smart-watch-or-fitness-tracker/" | ||
], | ||
"distributed_transition": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the first module in the list so I'm putting the notes here, but some of these comments apply to all 4 of the new modules. Here this distributed transition doesn't add up to 100%, but also the flow of this module means that every female in the population will get endometriosis eventually. I don't think that was the goal here - is the .21 meant to mean 21% of the population gets the condition? Or maybe this was just copy&pasted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All distributions now adding up to 100%. Still working on making sure only the correct % in the overall population get the symptom.
"symptom": "Cramps", | ||
"cause": "Endometriosis", | ||
"direct_transition": "Menstrual_Cramps_Symptom_Ends", | ||
"codes": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recognize you're in a tricky spot here since most of the "physiology" features are not available in the module builder, but I would strongly encourage using the module builder as much as possible anyway, rather than handcrafting things. Trying to view this state actually crashes the builder since Symptom
states don't have codes
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrmmm. There were a few non-terminated paths in earlier versions of the modules (~July), although all of the new modules currently compile in the Module Builder for me. I'm not able to replicate the builder crash based on the codes
field. :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed codes
field from Symptom states.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm ok a couple things here. Looking closer at it now, I may have been wrong about the root cause (codes shouldn't break anything but they don't do anything either), but the state still doesn't load in the module builder. The module overall does load, but when you click on the Menstrual_Cramps_Symptom state to view/edit it in the sidebar, the app crashes to a white page. Synthea proper is also going to crash here if it reaches this state so please make sure the unit tests run and try running synthea separately to make sure nothing breaks and the output results look reasonable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I overhauled the entire module, and it's now simply an Endometriosis module. I went through and rebuilt most all of the states, using the editor. Turns out the Symptom didn't have a probability %, which was what was causing it to crash. Encounters and Conditions end gracefully. No crashes, recently. Unit tests running good.
}, | ||
|
||
"Endometriosis_Risk": { | ||
"type": "ConditionOnset", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These "Risk" states either need to have codes
defined, or they need to be a different state type. As it stands they cause exceptions when running, see the unit tests: https://github.com/synthetichealth/synthea/actions/runs/6397186772/job/17364591481
If you don't intend for any record artifact to be added for this, you probably just want these to be Simple states
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely overhauled the entire module. Refactored from Endometriosis_Risk
to simply Endometriosis
. Has a matching ConditionEnd. Unit tests passing. No crashing recently.
Rebuild of PR #1254
Synthea Physiology Simulations
The simulation configuration files in this directory can be used to execute a single run of a Synthea physiology model via the gradle command line interface. The configuration allows manipulation of the differential equation solver, step size, sim duration, and configuration for output charts if desired. Output files will be in the
output/physiology
directory.Note that these are only utilized for the physiology gradle command and are not part of the normal Synthea execution procedure.
Configuration
You will need to set the following two fields to
true
in thesrc/main/resources/synthea.properties
file.Usage
./gradlew physiology --args="config/simulations/[config name].yml"
Examples
Output
Graphs and raw data in CVS files will be found in
output/physiology
folder.You may also wish to create a large population of 10,000 or more individuals, and search for gallblader patients (which are currently the only patients that have ECG physiology data attached to them.)
References