Limiting to an age range efficiently #1624
Replies: 2 comments 3 replies
-
| "Design flaw" is in the eye of the beholder. You can try using  Sometimes the simulated patients die, due to the stochastic elements of the models. You call this a design flaw, but it is a central part of the system. If we just forced everyone to survive and live through everything, then it wouldn't be a very good model of disease. | 
Beta Was this translation helpful? Give feedback.
-
| Hi Jason,
Thanks for the suggestion, this may work, assuming the alive filter filters
at the point of the defined start date rather than the end date. We are
modelling claims data, so death and the surrounding costs is still relevant
and needs capturing. I'd like to work on this more when I have more time
over the next few weeks. There are probably a few ways to insert a
workaround for this, I'd like to try and resolve it and will share if I
come up with anything useful.
Best wishes,
Heather… On Wed, Oct 15, 2025 at 9:52 PM Jason Walonoski ***@***.***> wrote:
 If you omit only_alive_patients you will get a mix of alive and dead
 patients. With only a specified age range over 65 (e.g., -a 65-110), you
 should see a distribution something like this (for the chart, I rounded all
 the ages down to the nearest decade):
 ages.png (view on web)
 <https://github.com/user-attachments/assets/71fa7211-1725-41f2-9336-74dc76cfe86d>
 Yes, there will be some dead patients under 65 that you'll have to discard
 (less than 15% of the total). You should be able to filter them out by
 post-processing the data based on the birth date and whether or not they
 are alive.
 We could provide a method to strictly filter based on provided age ranges,
 but that is not currently supported, unless you want to specify that
 criteria in a keep module
 <https://github.com/synthetichealth/synthea/wiki/Keep-Patients-Module>.
 Apologies if this doesn't meet your requirements.
 —
 Reply to this email directly, view it on GitHub
 <#1624 (reply in thread)>,
 or unsubscribe
 <https://github.com/notifications/unsubscribe-auth/A6CZ7GVE4KIKWHCZSHITOD33X2XYRAVCNFSM6AAAAACJI3AG72VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINRZGE2DQMY>
 .
 You are receiving this because you authored the thread.Message ID:
 ***@***.***
 com>
 | 
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Every attempt our group has made to limit to an age range fails to circumvent a design flaw that Synthea will still generate patients outside of that age range and just discard them as it goes along. We need to fulfil a computationally large (and therefore expensive) generation task monthly, has anyone found a way to coerce patient generation within an age range at the point of generation? We have tried removing columns from demographics.csv, editing the synthea.properties file and editing generator.html but nothing has resolved this so far. All suggestions very welcome.
Beta Was this translation helpful? Give feedback.
All reactions