Skip to content
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

Fix issue where vital signs were sometimes being set to NaN #1381

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

eedrummer
Copy link
Collaborator

Synthea's simulation of height and weight under the age of 20 depends on growth charts published by CDC. The growth charts are provided with a method for transforming values into percentiles and vice-versa. It appears that for higher percentiles, this method can break down.

The case that was used for testing this issue is transforming the ~99.74th percentile BMI for females at 240 months into an actual BMI value.

This code change addresses the issue by converting any request above the 99.5th percentile to just the 99.5th percentile.

This addresses #1372.

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #1381 (34ddcb1) into master (6192ed7) will decrease coverage by 1%.
Report is 5 commits behind head on master.
The diff coverage is 100%.

@@           Coverage Diff            @@
##             master   #1381   +/-   ##
========================================
- Coverage        77%     77%   -1%     
+ Complexity     3685    3681    -4     
========================================
  Files           170     170           
  Lines         24005   24008    +3     
  Branches       3331    3332    +1     
========================================
- Hits          18524   18518    -6     
- Misses         4448    4451    +3     
- Partials       1033    1039    +6     
Files Coverage Δ
...mitre/synthea/world/concepts/GrowthChartEntry.java 77% <100%> (+8%) ⬆️

... and 27 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link
Contributor

@dehall dehall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change looks good once the function actually uses the new constant.
Do you have a sense of whether this really only affects the ~1/200 records that are > 99.5 percentile? Or in practice is it less, or more? I'm having a little trouble following the BMI <-> percentile logic as the flow seems to convert one to the other often, meanwhile the height and weight are both also changing.

Copy link
Contributor

@dehall dehall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran 200 patients against master and this branch and saw only 31 differences in the observations.csv (out of a total of 137,000 lines). Most were actually "Head Occipital-frontal circumference" but maybe that's just how the dice rolled for that population. Overall looks good

@dehall dehall merged commit 11a7411 into master Nov 9, 2023
6 checks passed
@dehall dehall deleted the fix-vital-signs-nan branch November 9, 2023 15:58
@eedrummer eedrummer restored the fix-vital-signs-nan branch November 9, 2023 16:52
@eedrummer eedrummer deleted the fix-vital-signs-nan branch November 9, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants