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

Not able to generate the data #1485

Open
surajpujari818 opened this issue Jul 10, 2024 · 1 comment
Open

Not able to generate the data #1485

surajpujari818 opened this issue Jul 10, 2024 · 1 comment
Labels

Comments

@surajpujari818
Copy link

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
Copy link
Contributor

dehall commented Jul 11, 2024

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:

  • 1049625 "Acetaminophen 325 MG / Oxycodone Hydrochloride 10 MG Oral Tablet [Percocet]"
  • 835603 "tramadol hydrochloride 50 MG Oral Tablet"
  • 856987 "Acetaminophen 300 MG / Hydrocodone Bitartrate 5 MG Oral Tablet"

(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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants