synthetichealth / synthea

Synthetic Patient Population Simulator
https://synthetichealth.github.io/synthea
Apache License 2.0
2.11k stars 633 forks source link

Not able to generate the data #1485

Open surajpujari818 opened 1 month ago

surajpujari818 commented 1 month ago

What happened?

A bug happened! Hi there, I am new to synthea. I used synthea toolkit for "Active medication" for [RxNorm] 1049221: Acetaminophen 325 MG / oxyCODONE Hydrochloride 5 MG Oral Tablet data which can be seen in below snips. I downloaded the keep.json file (which is in my downloads where i have dependency file also) and wrote command java -jar synthea-with-dependencies.jar -p 1000 -k keep.json --exporter.fhir.export=false --exporter.csv.export=true

I am not able to generate the data. also it is taking very long time to generate even a 100 sample data.

1
image

2 image 3
image

Environment

- OS:
- Java:Java JDK

Relevant log output

Running with options:
Population: 1000
Seed: 1720612014067
Provider Seed:1720612014067
Reference Time: 1720612014067
Location: Massachusetts
Min Age: 0
Max Age: 140
4 -- Jermaine675 Breitenberg711 (27 y/o M) Blackstone, Massachusetts  (38854)
Waiting for threads to finish... java.util.concurrent.ThreadPoolExecutor@31834a2b[Shutting down, pool size = 12, active threads = 12, queued tasks = 987, completed tasks = 1]
java.lang.RuntimeException: Failed to produce a matching patient after 1000 attempts. Ensure that it is possible for all requested demographics to meet the criteria. (e.g., make sure there is no age restriction that conflicts with a requested condition, such as limiting age to 0-18 and requiring all patients have a condition that only onsets after 55.) If you are confident that the constraints are possible to satisfy but rare, consider increasing the value in config setting `generate.max_attempts_to_keep_patient`
        at org.mitre.synthea.engine.Generator.generatePerson(Generator.java:493)
        at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:377)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
dehall commented 1 month ago

Hi, sorry that your first experience with Synthea wasn't positive. The short answer is, based on those settings that error looks normal. If you're looking for patients with an opioid prescription, I would recommend using a keep module with a different code, or even better, multiple codes with "ANY OF". Some suggestions:

(Or, depending on your needs, you may want to run without using the keep module at all until you're sure you need it: java -jar synthea-with-dependencies.jar -p 1000 --exporter.fhir.export=false --exporter.csv.export=true)

What happened was the code you selected is only used in one place in Synthea, and upon closer inspection it's only applicable during the simulation from 1990-2014. There's a newer opioids module that is applicable from 2014 onward that uses the other codes I mentioned above.