FHIR Chat · Generate Synthea Patients · implementers

Stream: implementers

Topic: Generate Synthea Patients


view this post on Zulip Ming D. (Aug 17 2020 at 14:52):

Hi there, is there a way to generate a patient by specifying a city(with state) and an age value?

view this post on Zulip Jason Walonoski (Aug 17 2020 at 21:24):

Yes. Something like ./run_synthea -a 10-20 Idaho Boise for ages 10 through 20.

view this post on Zulip Ming D. (Aug 18 2020 at 02:07):

@Jason Walonoski thanks. If I want to add a visit which leads to Covid-19 diagnosis, what is the best way to do that? Is there any medical coding I can use for Covid-19?

view this post on Zulip Ming D. (Aug 18 2020 at 02:08):

I mean to insert a visit for each patient to be generated.

view this post on Zulip Jason Walonoski (Aug 18 2020 at 12:05):

Covid-19 is already part of Synthea. Check out src/main/resources/modules/covid*. You don't need to do anything. Generate a thousand patients (using the -p 1000 switch) and you should see LOTS of them with covid-19 related visits.

view this post on Zulip Ming D. (Aug 18 2020 at 13:47):

@Jason Walonoski When I generate a patient, can I add an encounter when he/she was diagnosed as Covid-19 on a specified day?

view this post on Zulip Jason Walonoski (Aug 18 2020 at 14:07):

When I generate a patient, can I add an encounter when he/she was diagnosed as Covid-19 on a specified day?

No, Synthea doesn't work that way. It is a simulation and generator, not a tool for you to hand-write sample data.

view this post on Zulip René Spronk (Aug 18 2020 at 14:29):

However, I assume that once one has run it, one could add ones own resources to the generated set of resources.. (?)

view this post on Zulip Jason Walonoski (Aug 18 2020 at 20:40):

René Spronk said:

However, I assume that once one has run it, one could add ones own resources to the generated set of resources.. (?)

Sure, of course. You can do anything you want with the output. If you load it into a FHIR server, you can use the FHIR API do add, edit, or delete any information you'd like.

view this post on Zulip Ming D. (Aug 18 2020 at 20:44):

Is there any way to control the latest date of encounters in Synthea's output? I want to spare some room for adding Covid-19 encounters after having generated the patient.

view this post on Zulip Jason Walonoski (Aug 19 2020 at 12:35):

Synthea runs up until the present day. There is no out of the box parameter to do what you want. If you want to leave some space, filter the resources inside the FHIR bundles by date. But FYI, since there are already COVID-19 models, there will already be COVID-19 encounters in the data.

view this post on Zulip Jonah Benton (Aug 23 2020 at 14:44):

Hi folks, maybe a dumb question- I'm looking for sample/simulated DiagnosticReports from administered COVID tests (PCR and other). I don't anything to this end in the COVID module at the moment but could definitely be missing it. Is that something Synthea generates now or could generate?

view this post on Zulip Nilesh Pagare (Aug 23 2020 at 20:48):

Hello @Jason Walonoski and friends,
While running synthea locally on a Win 10 Pro , PC - running .\gradlew.bat build chek test - I am getting following warning which also seems to result in a null pointer exception when exporting FHIR record.
Checkstyle rule violations were found. See the report at: file:{local path}synthea/build/reports/checkstyle/test.html
Checkstyle files with violations: 4
Checkstyle violations by severity: [warning:25]

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

The test.html report shows there are 25 errors .. many of them fail with the error "Line is longer than 100 characters (found 102)."

Do I need to install Gradle 7.0 ? or downgrade it to 6.5 ? If so, how do I override this in the cloned repo ? I don't have the Gradle expertise. The current version of gradle is 6.6. Your guidance will be appreciated.

view this post on Zulip Nilesh Pagare (Aug 23 2020 at 21:16):

Generating Synthea records for Texas using command .\run_synthea.bat Texas generated only 3 records . 1 for each in Hospital, Practitioner and 1 patient.

  1. I thought the default execution will include all modules and will generate a good volume of patients mix spread across organizations and providers - like the way it does for data for Massachusetts . Is that correct ?

  2. What params should look like to generate patients for a state using all modules but spread across multiple organizations and providers ? Changing generate.default_population to 10000 did create multiple hospital orgs and providers. But, don't know how to see the mapping counts .. e.g. # of patients by oranization by provider.

  3. Do I need to execute .\run_synthea.bat --exporter.fhir.use_us_core_ig true -- to generate a population that exports FHIR according to the US Core R4 in the targe FHIR server ?

  4. Is there a way to organize output by state in its dedicated folder at runtime using parameter ? would prefer not to update output value in the config file each time..

Your thoughts will be appreciated.

view this post on Zulip Jason Walonoski (Aug 24 2020 at 14:10):

@Nilesh Pagare Those are not actual errors. Those are checkstyle errors. It is just complaining that the source code is not following the style guidelines. While they are annoying, you can safely ignore those.

view this post on Zulip Jason Walonoski (Aug 24 2020 at 14:12):

@Jonah Benton Synthea generates a ton of Diagnostic reports for covid. Look in the covid19 submodules https://github.com/synthetichealth/synthea/tree/master/src/main/resources/modules/covid19. Look at measurements_daily, measurements_frequent, and measurements_vitals.

view this post on Zulip Jason Walonoski (Aug 24 2020 at 14:14):

@Nilesh Pagare The default is to run a single patient. If you want more, use the -p option. If you want FHIR with US Core, set exporter.fhir.use_us_core_ig = true in the properties file, or by command line (e.g. --exporter.fhir.use_us_core_ig=true). You can only run a single state at a time. If you want more states, run it more times.

view this post on Zulip Nilesh Pagare (Aug 24 2020 at 15:34):

Hi @Jason Walonoski , thank you for your reponse.

  1. I generated few datasets last night. Is is possible to convert those now to us_core_ig or should rerun the Synthea ?
  2. In one of the requirements, I want to create population for a given State, City and a specific hospital. I would like 400-500 patient bundles created under a single hospital distributed across providers working there.
    Is there a parameter setting to do that ? If not, do I have to run a batch update externally ?
    Thank you,
    Nilesh

view this post on Zulip Jason Walonoski (Aug 25 2020 at 12:04):

  1. It is possible, but not by using Synthea. I would rerun it.
  2. Couple of options. Run the given state and city with enough population to given the numbers you want at that one provider. Another option is to delete the other providers from that area (edit the src/main/resources/providers/*) and rerun, then they'll be forced to go to the only provider in town.

view this post on Zulip Nilesh Pagare (Aug 26 2020 at 08:20):

@Jason Walonoski , thank you. Will keep you posted.

view this post on Zulip Nilesh Pagare (Aug 26 2020 at 21:07):

(deleted)

view this post on Zulip Nilesh Pagare (Aug 26 2020 at 21:13):

Jason Walonoski said:

Yes. Something like ./run_synthea -a 10-20 Idaho Boise for ages 10 through 20.

Hi @Jason Walonoski, thank you. Where can we find such parameter list in the wiki ?
Do we have to build a master Patient Framework model to do that ? Any step by step guide that shows how to generate that model and include in the cloned repo locally ?

Which parameter will help us control # or % of alive and/or dead population ?

Thank you for your help.

view this post on Zulip Nilesh Pagare (Aug 27 2020 at 05:05):

Jason Walonoski said:

  1. It is possible, but not by using Synthea. I would rerun it.
  2. Couple of options. Run the given state and city with enough population to given the numbers you want at that one provider. Another option is to delete the other providers from that area (edit the src/main/resources/providers/*) and rerun, then they'll be forced to go to the only provider in town.

I wish there was an option to pass id of the hospital from the csv. file to set the predicate

view this post on Zulip Jason Walonoski (Aug 28 2020 at 14:23):

Command-line parameters can be found with ./run_synthea -h and here https://github.com/synthetichealth/synthea/wiki/Basic-Setup-and-Running#running-syntheatm

view this post on Zulip Jason Walonoski (Aug 28 2020 at 14:24):

Some of the other configuration parameters are described here https://github.com/synthetichealth/synthea/wiki/Common-Configuration

view this post on Zulip Jason Walonoski (Aug 28 2020 at 14:26):

Here is a module builder tutorial that is probably getting stale, https://github.com/synthetichealth/synthea/wiki/Module-Builder-Tutorial.
After you edit a module, you have to download and copy it into the module folder. See this step: https://github.com/synthetichealth/synthea/wiki/Dev-Days#browse-the-diseases

view this post on Zulip Jason Walonoski (Aug 28 2020 at 14:26):

Which parameter will help us control # or % of alive and/or dead population ?

There is no such parameter. The system doesn't begin from a place of who is alive or dead, it begins from the place of demographics and disease models.

view this post on Zulip Jason Walonoski (Aug 28 2020 at 14:27):

I wish there was an option to pass id of the hospital from the csv. file to set the predicate

Please submit an issue https://github.com/synthetichealth/synthea/issues/new/choose, and if you are willing and able, a pull request.

view this post on Zulip Brendan Keeler (Sep 14 2020 at 19:08):

When using Synthea, there's the option to generate the patients as a CSV export. Have people been able to use this successfully? We've been able to create the FHIR JSON format but the CSV output doesn't seem to work

view this post on Zulip Jason Walonoski (Sep 14 2020 at 20:22):

Brendan Keeler said:

When using Synthea, there's the option to generate the patients as a CSV export. Have people been able to use this successfully? We've been able to create the FHIR JSON format but the CSV output doesn't seem to work

I use it successfully every day, but I'm also a project maintainer...

view this post on Zulip Jason Walonoski (Sep 14 2020 at 20:24):

If you are having trouble getting Synthea to see your properties changes, you can try ./run_synthea --exporter.csv.export=true or java -jar synthea-with-dependencies.jar --exporter.csv.export=true (depending on how you run Synthea, adding your other parameters, of course).


Last updated: Apr 12 2022 at 19:14 UTC