-
Notifications
You must be signed in to change notification settings - Fork 742
Physiology Models #1347
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
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?)
"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.
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.
Ok I think this is really close but still a few things that should be cleaned up before we merge. I recognize these new modules are meant to be quick demos that get the physiology content into records, rather than comprehensive modules of the conditions in question, but since they'll be part of every synthea population going forward I do want to make sure what these new modules create is as good as we can make it.
"range": { | ||
"low": 13, | ||
"high": 19, | ||
"unit": "years" |
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 state is going to be hit immediately after birth so the range here doesn't match the name of the state. Maybe call it Age_13-19
?
], | ||
"name": "Sedentary_Lifestyle" | ||
}, | ||
"Symptom_Onset_Delay": { |
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 symptoms that get added in this sequence are immediately ended right after, so they don't really do anything. Then the ConditionEnds after that aren't going to work because they point to a Guard instead of a ConditionOnset. I'd suggest just having this whole branch (the "80%" after the guard) go directly to Terminal
…h/synthea into wearables-rebuild
Wearables ECG Module (wearables_cardiac_monitoring.json) ✅ Fixed Critical Issues: Sleep Apnea Module (wearables_sleepapnea.json) ✅ Fixed Critical Logic Error: Removed problematic Guard condition that prevented sleep apnea onset modeling ✅ Key Improvements Made: Runtime Stability - All modules now execute without crashes |
Take a look at the updated changes? |
Added to my backlog... |
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