synthetichealth / synthea

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

config file error #1334

Open kirankumarduddu opened 11 months ago

kirankumarduddu commented 11 months ago

What happened?

after i change generate.only_dead_patients = false to true and run synthia during run process config file changes to false automatically and doesnt create any dead patients

Environment

- OS:windows
- Java:

Relevant log output

No response

dehall commented 11 months ago

Please make sure that you are editing the synthea.properties that exists in src/main/resources, not a version under the bin or build directories. The gradle build process will overwrite the bin and build directories, so if you modify files in those then you'll see this issue of files changing back unexpectedly. Make your changes in the src version instead and they will stick.

Other than that, nothing in Synthea has the ability to write to that config file. If you're 100% sure you're editing the right version there is something else on your system that is reverting it somehow.

kirankumarduddu commented 11 months ago

@dehall Thanks for your response , I am getting below error after changing properties under main

PS C:\Visual Code\synthea> ./run_synthea -p 10 -m "hospice_treatment"
ARG = -p
ARG = 10 ARG = -m ARG = hospice_treatment ARG = syntheaArgs = '-p','10','-m','hospice_treatment',

Task :run SLF4J: No SLF4J providers were found. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details. Scanned 84 modules and 140 submodules. Loading submodule modules\allergies\allergy_panel.json Loading submodule modules\allergies\drug_allergy_incidence.json Loading submodule modules\allergies\environmental_allergy_incidence.json Loading submodule modules\allergies\food_allergy_incidence.json Loading submodule modules\allergies\immunotherapy.json Loading submodule modules\allergies\outgrow_env_allergies.json Loading submodule modules\allergies\outgrow_food_allergies.json Loading submodule modules\allergies\severe_allergic_reaction.json Loading submodule modules\anemia\anemia_sub.json Loading submodule modules\breast_cancer\chemotherapy_breast.json Loading submodule modules\breast_cancer\hormone_diagnosis.json Loading submodule modules\breast_cancer\hormonetherapy_breast.json Loading submodule modules\breast_cancer\surgery_therapy_breast.json Loading submodule modules\breast_cancer\tnm_diagnosis.json Loading submodule modules\contraceptives\clear_contraceptive.json Loading submodule modules\contraceptives\female_sterilization.json Loading submodule modules\contraceptives\implant_contraceptive.json Loading submodule modules\contraceptives\injectable_contraceptive.json Loading submodule modules\contraceptives\intrauterine_device.json Loading submodule modules\contraceptives\male_sterilization.json Loading submodule modules\contraceptives\oral_contraceptive.json Loading submodule modules\contraceptives\patch_contraceptive.json Loading submodule modules\contraceptives\ring_contraceptive.json Loading submodule modules\covid19\admission.json Loading submodule modules\covid19\determine_risk.json Loading Lookup Table: covid-19-severity-outcomes.csv Loading Lookup Table: covid-19-survival-outcomes.csv Loading submodule modules\covid19\diagnose_bacterial_infection.json Loading submodule modules\covid19\diagnose_blood_clot.json Loading submodule modules\covid19\end_outcomes.json Loading submodule modules\covid19\end_symptoms.json Loading submodule modules\covid19\infection.json Loading submodule modules\covid19\measurements_daily.json Loading submodule modules\covid19\measurements_frequent.json Loading submodule modules\covid19\measurements_vitals.json Loading submodule modules\covid19\medications.json Loading submodule modules\covid19\nonsurvivor_lab_values.json Loading submodule modules\covid19\outcomes.json Loading submodule modules\covid19\supplies_hospitalization.json Loading submodule modules\covid19\supplies_icu.json Loading submodule modules\covid19\supplies_intubation.json Loading submodule modules\covid19\survivor_lab_values.json Loading submodule modules\covid19\symptoms.json Loading submodule modules\covid19\treat_blood_clot.json Loading submodule modules\dermatitis\early_moderate_eczema_obs.json Loading submodule modules\dermatitis\early_severe_eczema_obs.json Loading submodule modules\dermatitis\mid_moderate_eczema_obs.json Loading submodule modules\dermatitis\mid_severe_eczema_obs.json Loading submodule modules\dermatitis\moderate_cd_obs.json Loading submodule modules\dermatitis\severe_cd_obs.json Loading submodule modules\dme\wheelchair.json Loading submodule modules\dme\wheelchair_end.json Loading submodule modules\encounter\anxiety_screening.json Loading submodule modules\encounter\depression_screening.json Loading submodule modules\encounter\fall_risk_screening.json Loading submodule modules\encounter\hark_screening.json Loading submodule modules\encounter\hospital_basic_labs.json Loading submodule modules\encounter\sdoh_hrsn.json Loading submodule modules\encounter\substance_use_screening.json Loading submodule modules\encounter\vitals.json Loading submodule modules\heart\acs_anticoagulant.json Loading submodule modules\heart\acs_antiplatelet.json Loading submodule modules\heart\acs_arrival_medications.json Loading submodule modules\heart\acs_discharge_meds.json Loading submodule modules\heart\avrr\antithrombotic.json Loading submodule modules\heart\avrr\intraop_meds_blood.json Loading submodule modules\heart\avrr\outcomes.json Loading submodule modules\heart\avrr\preoperative.json Loading submodule modules\heart\avrr\referral.json Loading submodule modules\heart\avrr\savrr_operation.json Loading submodule modules\heart\avrr\savrr_postop.json Loading submodule modules\heart\avrr\sequence.json Loading submodule modules\heart\cabg\details.json Loading Lookup Table: cabg_details_operative_approach.csv Loading Lookup Table: cabg_details_num_grafts.csv Loading Lookup Table: cabg_details_num_art_cond.csv Loading submodule modules\heart\cabg\icu_meds_devices.json Loading submodule modules\heart\cabg\labs_common.json Loading submodule modules\heart\cabg\operation.json Loading submodule modules\heart\cabg\or_intraop.json Loading submodule modules\heart\cabg\or_labs_meds.json Loading submodule modules\heart\cabg\outcomes.json Loading submodule modules\heart\cabg\postop.json Loading submodule modules\heart\cabg\postop_blood.json Loading submodule modules\heart\cabg\preoperative.json Loading submodule modules\heart\cabg\referral.json Loading submodule modules\heart\cabg_sequence.json Loading submodule modules\heart\cardiac_labs.json Loading submodule modules\heart\chf_lab_work.json Loading submodule modules\heart\chf_lvad.json Loading submodule modules\heart\chf_meds.json Loading submodule modules\heart\chf_meds_hfmef.json Loading submodule modules\heart\chf_meds_hfref_nyha2.json Loading submodule modules\heart\chf_meds_hfref_nyha3.json Loading submodule modules\heart\chf_meds_hfref_nyha4.json Loading submodule modules\heart\chf_nyha_panel.json Loading submodule modules\heart\chf_transplant.json Loading submodule modules\heart\nsteacs_pathway.json Loading submodule modules\heart\operative_status.json Loading submodule modules\heart\or_blood.json Loading Lookup Table: or_blood_anemia_check.csv Loading Lookup Table: or_blood_platelet_check.csv Loading Lookup Table: or_blood_plasma_check.csv Loading submodule modules\heart\savrepair\operative_status.json Loading submodule modules\heart\savreplace\operative_status.json Loading submodule modules\heart\stemi_fibrinolytic.json Loading submodule modules\heart\stemi_pathway.json Loading submodule modules\heart\tavr\alt_access.json Loading submodule modules\heart\tavr\operation.json Loading submodule modules\heart\tavr\operative_status.json Loading submodule modules\heart\tavr\outcomes.json Loading submodule modules\heart\tavr\postop.json Loading submodule modules\heart\vhd_risks.json Loading submodule modules\hiv\art_sequence.json Loading submodule modules\hiv\art_sequence_1987_1994.json Loading submodule modules\hiv\art_sequence_1995_1996.json Loading submodule modules\hiv\art_sequence_1997_2002.json Loading submodule modules\hiv\art_sequence_2003_2005.json Loading submodule modules\hiv\art_sequence_2006_2014.json Loading submodule modules\hiv\art_sequence_2015.json Loading submodule modules\hiv\hiv_baseline.json Loading submodule modules\hiv\hiv_cd4.json Loading Lookup Table: hiv_stage.csv Loading submodule modules\hiv\hiv_oi_prophylaxis.json Loading submodule modules\hiv\hiv_screening.json Loading submodule modules\hiv\hiv_viral_load.json Loading submodule modules\hiv\stop_all_art_meds.json Loading submodule modules\lung_cancer\lung_cancer_probabilities.json Loading submodule modules\medications\ace_arb.json Loading Lookup Table: ace_arb_ingredient_distribution.csv Loading Lookup Table: ace_arb_amlodipine_benazepril_product_distribution.csv Loading Lookup Table: ace_arb_benazepril_product_distribution.csv Loading Lookup Table: ace_arb_benazepril_hydrochlorothiazide_product_distribution.csv Loading Lookup Table: ace_arb_enalapril_product_distribution.csv Loading Lookup Table: ace_arb_hydrochlorothiazide_lisinopril_product_distribution.csv Loading Lookup Table: ace_arb_hydrochlorothiazide_losartan_product_distribution.csv Loading Lookup Table: ace_arb_hydrochlorothiazide_valsartan_product_distribution.csv Loading Lookup Table: ace_arb_irbesartan_product_distribution.csv Loading Lookup Table: ace_arb_lisinopril_product_distribution.csv Loading Lookup Table: ace_arb_losartan_product_distribution.csv Loading Lookup Table: ace_arb_quinapril_product_distribution.csv Loading Lookup Table: ace_arb_ramipril_product_distribution.csv Loading Lookup Table: ace_arb_sacubitril_valsartan_product_distribution.csv Loading Lookup Table: ace_arb_telmisartan_product_distribution.csv Loading Lookup Table: ace_arb_valsartan_product_distribution.csv Loading submodule modules\medications\beta_blocker.json Loading Lookup Table: beta_blocker_ingredient_distribution.csv Loading Lookup Table: beta_blocker_atenolol_product_distribution.csv Loading Lookup Table: beta_blocker_bisoprolol_product_distribution.csv Loading Lookup Table: beta_blocker_bisoprolol_hydrochlorothiazide_product_distribution.csv Loading Lookup Table: beta_blocker_carvedilol_product_distribution.csv Loading Lookup Table: beta_blocker_labetalol_product_distribution.csv Loading Lookup Table: beta_blocker_metoprolol_product_distribution.csv Loading Lookup Table: beta_blocker_nebivolol_product_distribution.csv Loading Lookup Table: beta_blocker_propranolol_product_distribution.csv Loading submodule modules\medications\ear_infection_antibiotic.json Loading submodule modules\medications\emergency_inhaler.json Loading Lookup Table: emergency_inhaler_ingredient_distribution.csv Loading Lookup Table: emergency_inhaler_albuterol_product_distribution.csv Loading Lookup Table: emergency_inhaler_levalbuterol_product_distribution.csv Loading submodule modules\medications\hypertension_medication.json Loading submodule modules\medications\maintenance_inhaler.json Loading Lookup Table: maintenance_inhaler_ingredient_distribution.csv Loading Lookup Table: maintenance_inhaler_beclomethasone_product_distribution.csv Loading Lookup Table: maintenance_inhaler_budesonide_product_distribution.csv Loading Lookup Table: maintenance_inhaler_fluticasone_product_distribution.csv Loading Lookup Table: maintenance_inhaler_mometasone_product_distribution.csv Loading submodule modules\medications\moderate_opioid_pain_reliever.json Loading submodule modules\medications\otc_antihistamine.json Loading submodule modules\medications\otc_pain_reliever.json Loading submodule modules\medications\statin.json Loading Lookup Table: statin_ingredient_distribution.csv Loading Lookup Table: statin_atorvastatin_product_distribution.csv Loading Lookup Table: statin_ezetimibe_simvastatin_product_distribution.csv Loading Lookup Table: statin_lovastatin_product_distribution.csv Loading Lookup Table: statin_pitavastatin_product_distribution.csv Loading Lookup Table: statin_pravastatin_product_distribution.csv Loading Lookup Table: statin_rosuvastatin_product_distribution.csv Loading Lookup Table: statin_simvastatin_product_distribution.csv Loading submodule modules\medications\strong_opioid_pain_reliever.json Loading submodule modules\metabolic_syndrome\amputations.json Loading submodule modules\metabolic_syndrome\dme_supplies.json Loading submodule modules\metabolic_syndrome\eye_conditions.json Loading submodule modules\metabolic_syndrome\kidney_conditions.json Loading submodule modules\metabolic_syndrome\medications.json Loading submodule modules\snf\skilled_nursing_facility.json Loading submodule modules\surgery\general_anesthesia.json Loading submodule modules\total_joint_replacement\functional_status_assessments.json Loading submodule modules\veterans\veteran_suicide_probabilities.json Loading submodule modules\weight_loss\mend_week.json Loading module modules\hospice_treatment.json Running with options: Population: 10 Seed: 1689863202140 Provider Seed:1689863202140 Reference Time: 1689863202140 Location: Massachusetts Min Age: 0 Max Age: 140 Modules: Hospice Treatment Module [1 loaded] Waiting for threads to finish... java.util.concurrent.ThreadPoolExecutor@7f5b9db[Shutting down, pool size = 10, active threads = 10, queued tasks = 0, completed tasks = 0] 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Waiting for threads to finish... java.util.concurrent.ThreadPoolExecutor@7f5b9db[Shutting down, pool size = 4, active threads = 4, queued tasks = 0, completed tasks = 6] 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Records: total=0, alive=0, dead=0 RNG=10 Clinician RNG=5643

BUILD SUCCESSFUL in 1m 37s 4 actionable tasks: 2 executed, 2 up-to-date

dehall commented 11 months ago

It looks like you're trying to get a population of only deceased hospice patients, is that right?

First, do not use the -m flag. It doesn't mean "all patients must go through this module", it means "only load this module and not any others". In the case of the hospice module, nothing happens unless another module sends the patient into hospice, and when you use the -m flag there are no other modules that can do that. ( More on that here: https://github.com/synthetichealth/synthea/wiki/The--M-Feature )

Instead, I would recommend using a "keep" module to only keep patients that have a particular condition or attribute of interest. For example, breast cancer or lung cancer might send a patient to hospice, so you can create a keep module to only keep those patients. Or, if you inspect the hospice module you'll see it uses the attribute hospice which you can filter on. More on keep modules here: https://github.com/synthetichealth/synthea/wiki/Keep-Patients-Module

Here's a simple keep module to keep patients with that attribute hospice: keep_hospice.json.txt

You can use this by putting it in the synthea folder and running with ./run_synthea -p 10 -k keep_hospice.json You may also want to specify an age range, otherwise it will try generating patients of all ages, and it may not be possible for people under a certain age to enter hospice in Synthea, and you'll see some of those same errors again

kirankumarduddu commented 11 months ago

@dehall Thank you so much for your help and response ( I am looking for FHIR bundles of hospice patients with multiple conditions who are dead, as per recommendation updated keep module to below - { "name": "keep_hospice", "states": { "Initial": { "type": "Initial", "conditional_transition": [ { "transition": "Keep", "condition": { "condition_type": "Attribute", "attribute": "hospice_treatment", "operator": "is not nil" } }, { "transition": "Terminal" } ] }, "Terminal": { "type": "Terminal" }, "Keep": { "type": "Terminal" } }, "gmf_version": 2 }

and added keep module to src/main/resources/module and still getting error below PS C:\Visual Code\synthea> ./run_synthea -p 10 -k keep_hospice.json
ARG = -p
ARG = 10 ARG = -k ARG = keep_hospice.json ARG = syntheaArgs = '-p','10','-k','keep_hospice.json',

Task :run java.io.FileNotFoundException: Specified keep-patients file (keep_hospice.json) does not exist at App.main(App.java:199) Usage: run_synthea [options] [state [city]] Options: [-s seed] [-cs clinicianSeed] [-p populationSize] [-ps singlePersonSeed] [-r referenceDate as YYYYMMDD] [-e endDate as YYYYMMDD] [-g gender] [-a minAge-maxAge] [-o overflowPopulation] [-c localConfigFilePath] [-d localModulesDirPath] [-i initialPopulationSnapshotPath] [-u updatedPopulationSnapshotPath] [-t updateTimePeriodInDays] [-f fixedRecordPath] [-k keepMatchingPatientsPath] [--config*=value]

  • any setting from src/main/resources/synthea.properties Examples: run_synthea Massachusetts run_synthea Alaska Juneau run_synthea -s 12345 run_synthea -p 1000 run_synthea -s 987 Washington Seattle run_synthea -s 21 -p 100 Utah "Salt Lake City" run_synthea -g M -a 60-65 run_synthea -p 10 --exporter.fhir.export=true run_synthea --exporter.baseDirectory="./output_tx/" Texas

BUILD SUCCESSFUL in 5s 4 actionable tasks: 3 executed, 1 up-to-date

dehall commented 11 months ago

The path used with -k is relative to the current directory not the modules directory, so the best place for keep_hospice.json is the base synthea/ directory. (Alternatively you could put it somewhere else and reference it as -k ./path/to/keep_hospice.json)

kirankumarduddu commented 11 months ago

@dehall That worked !! but is this normal ?? I need to genrate 1000's of patients !!!

PS C:\Visual Code\synthea> ./run_synthea -p 10 -k keep_hospice.json ARG = -p ARG = 10 ARG = -k ARG = keep_hospice.json ARG = syntheaArgs = '-p','10','-k','keep_hospice.json',

Task :run SLF4J: No SLF4J providers were found. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details. Scanned 84 modules and 140 submodules. Loading submodule modules\allergies\allergy_panel.json Loading submodule modules\allergies\drug_allergy_incidence.json Loading submodule modules\allergies\environmental_allergy_incidence.json Loading submodule modules\allergies\food_allergy_incidence.json Loading submodule modules\allergies\immunotherapy.json Loading submodule modules\allergies\outgrow_env_allergies.json Loading submodule modules\allergies\outgrow_food_allergies.json Loading submodule modules\allergies\severe_allergic_reaction.json Loading submodule modules\anemia\anemia_sub.json Loading submodule modules\breast_cancer\chemotherapy_breast.json Loading submodule modules\breast_cancer\hormone_diagnosis.json Loading submodule modules\breast_cancer\hormonetherapy_breast.json Loading submodule modules\breast_cancer\surgery_therapy_breast.json Loading submodule modules\breast_cancer\tnm_diagnosis.json Loading submodule modules\contraceptives\clear_contraceptive.json Loading submodule modules\contraceptives\female_sterilization.json Loading submodule modules\contraceptives\implant_contraceptive.json Loading submodule modules\contraceptives\injectable_contraceptive.json Loading submodule modules\contraceptives\intrauterine_device.json Loading submodule modules\contraceptives\male_sterilization.json Loading submodule modules\contraceptives\oral_contraceptive.json Loading submodule modules\contraceptives\patch_contraceptive.json Loading submodule modules\contraceptives\ring_contraceptive.json Loading submodule modules\covid19\admission.json Loading submodule modules\covid19\determine_risk.json Loading Lookup Table: covid-19-severity-outcomes.csv Loading Lookup Table: covid-19-survival-outcomes.csv Loading submodule modules\covid19\diagnose_bacterial_infection.json Loading submodule modules\covid19\diagnose_blood_clot.json Loading submodule modules\covid19\end_outcomes.json Loading submodule modules\covid19\end_symptoms.json Loading submodule modules\covid19\infection.json Loading submodule modules\covid19\measurements_daily.json Loading submodule modules\covid19\measurements_frequent.json Loading submodule modules\covid19\measurements_vitals.json Loading submodule modules\covid19\medications.json Loading submodule modules\covid19\nonsurvivor_lab_values.json Loading submodule modules\covid19\outcomes.json Loading submodule modules\covid19\supplies_hospitalization.json Loading submodule modules\covid19\supplies_icu.json Loading submodule modules\covid19\supplies_intubation.json Loading submodule modules\covid19\survivor_lab_values.json Loading submodule modules\covid19\symptoms.json Loading submodule modules\covid19\treat_blood_clot.json Loading submodule modules\dermatitis\early_moderate_eczema_obs.json Loading submodule modules\dermatitis\early_severe_eczema_obs.json Loading submodule modules\dermatitis\mid_moderate_eczema_obs.json Loading submodule modules\dermatitis\mid_severe_eczema_obs.json Loading submodule modules\dermatitis\moderate_cd_obs.json Loading submodule modules\dermatitis\severe_cd_obs.json Loading submodule modules\dme\wheelchair.json Loading submodule modules\dme\wheelchair_end.json Loading submodule modules\encounter\anxiety_screening.json Loading submodule modules\encounter\depression_screening.json Loading submodule modules\encounter\fall_risk_screening.json Loading submodule modules\encounter\hark_screening.json Loading submodule modules\encounter\hospital_basic_labs.json Loading submodule modules\encounter\sdoh_hrsn.json Loading submodule modules\encounter\substance_use_screening.json Loading submodule modules\encounter\vitals.json Loading submodule modules\heart\acs_anticoagulant.json Loading submodule modules\heart\acs_antiplatelet.json Loading submodule modules\heart\acs_arrival_medications.json Loading submodule modules\heart\acs_discharge_meds.json Loading submodule modules\heart\avrr\antithrombotic.json Loading submodule modules\heart\avrr\intraop_meds_blood.json Loading submodule modules\heart\avrr\outcomes.json Loading submodule modules\heart\avrr\preoperative.json Loading submodule modules\heart\avrr\referral.json Loading submodule modules\heart\avrr\savrr_operation.json Loading submodule modules\heart\avrr\savrr_postop.json Loading submodule modules\heart\avrr\sequence.json Loading submodule modules\heart\cabg\details.json Loading Lookup Table: cabg_details_operative_approach.csv Loading Lookup Table: cabg_details_num_grafts.csv Loading Lookup Table: cabg_details_num_art_cond.csv Loading submodule modules\heart\cabg\icu_meds_devices.json Loading submodule modules\heart\cabg\labs_common.json Loading submodule modules\heart\cabg\operation.json Loading submodule modules\heart\cabg\or_intraop.json Loading submodule modules\heart\cabg\or_labs_meds.json Loading submodule modules\heart\cabg\outcomes.json Loading submodule modules\heart\cabg\postop.json Loading submodule modules\heart\cabg\postop_blood.json Loading submodule modules\heart\cabg\preoperative.json Loading submodule modules\heart\cabg\referral.json Loading submodule modules\heart\cabg_sequence.json Loading submodule modules\heart\cardiac_labs.json Loading submodule modules\heart\chf_lab_work.json Loading submodule modules\heart\chf_lvad.json Loading submodule modules\heart\chf_meds.json Loading submodule modules\heart\chf_meds_hfmef.json Loading submodule modules\heart\chf_meds_hfref_nyha2.json Loading submodule modules\heart\chf_meds_hfref_nyha3.json Loading submodule modules\heart\chf_meds_hfref_nyha4.json Loading submodule modules\heart\chf_nyha_panel.json Loading submodule modules\heart\chf_transplant.json Loading submodule modules\heart\nsteacs_pathway.json Loading submodule modules\heart\operative_status.json Loading submodule modules\heart\or_blood.json Loading Lookup Table: or_blood_anemia_check.csv Loading Lookup Table: or_blood_platelet_check.csv Loading Lookup Table: or_blood_plasma_check.csv Loading submodule modules\heart\savrepair\operative_status.json Loading submodule modules\heart\savreplace\operative_status.json Loading submodule modules\heart\stemi_fibrinolytic.json Loading submodule modules\heart\stemi_pathway.json Loading submodule modules\heart\tavr\alt_access.json Loading submodule modules\heart\tavr\operation.json Loading submodule modules\heart\tavr\operative_status.json Loading submodule modules\heart\tavr\outcomes.json Loading submodule modules\heart\tavr\postop.json Loading submodule modules\heart\vhd_risks.json Loading submodule modules\hiv\art_sequence.json Loading submodule modules\hiv\art_sequence_1987_1994.json Loading submodule modules\hiv\art_sequence_1995_1996.json Loading submodule modules\hiv\art_sequence_1997_2002.json Loading submodule modules\hiv\art_sequence_2003_2005.json Loading submodule modules\hiv\art_sequence_2006_2014.json Loading submodule modules\hiv\art_sequence_2015.json Loading submodule modules\hiv\hiv_baseline.json Loading submodule modules\hiv\hiv_cd4.json Loading Lookup Table: hiv_stage.csv Loading submodule modules\hiv\hiv_oi_prophylaxis.json Loading submodule modules\hiv\hiv_screening.json Loading submodule modules\hiv\hiv_viral_load.json Loading submodule modules\hiv\stop_all_art_meds.json Loading submodule modules\lung_cancer\lung_cancer_probabilities.json Loading submodule modules\medications\ace_arb.json Loading Lookup Table: ace_arb_ingredient_distribution.csv Loading Lookup Table: ace_arb_amlodipine_benazepril_product_distribution.csv Loading Lookup Table: ace_arb_benazepril_product_distribution.csv Loading Lookup Table: ace_arb_benazepril_hydrochlorothiazide_product_distribution.csv Loading Lookup Table: ace_arb_enalapril_product_distribution.csv Loading Lookup Table: ace_arb_hydrochlorothiazide_lisinopril_product_distribution.csv Loading Lookup Table: ace_arb_hydrochlorothiazide_losartan_product_distribution.csv Loading Lookup Table: ace_arb_hydrochlorothiazide_valsartan_product_distribution.csv Loading Lookup Table: ace_arb_irbesartan_product_distribution.csv Loading Lookup Table: ace_arb_lisinopril_product_distribution.csv Loading Lookup Table: ace_arb_losartan_product_distribution.csv Loading Lookup Table: ace_arb_quinapril_product_distribution.csv Loading Lookup Table: ace_arb_ramipril_product_distribution.csv Loading Lookup Table: ace_arb_sacubitril_valsartan_product_distribution.csv Loading Lookup Table: ace_arb_telmisartan_product_distribution.csv Loading Lookup Table: ace_arb_valsartan_product_distribution.csv Loading submodule modules\medications\beta_blocker.json Loading Lookup Table: beta_blocker_ingredient_distribution.csv Loading Lookup Table: beta_blocker_atenolol_product_distribution.csv Loading Lookup Table: beta_blocker_bisoprolol_product_distribution.csv Loading Lookup Table: beta_blocker_bisoprolol_hydrochlorothiazide_product_distribution.csv Loading Lookup Table: beta_blocker_carvedilol_product_distribution.csv Loading Lookup Table: beta_blocker_labetalol_product_distribution.csv Loading Lookup Table: beta_blocker_metoprolol_product_distribution.csv Loading Lookup Table: beta_blocker_nebivolol_product_distribution.csv Loading Lookup Table: beta_blocker_propranolol_product_distribution.csv Loading submodule modules\medications\ear_infection_antibiotic.json Loading submodule modules\medications\emergency_inhaler.json Loading Lookup Table: emergency_inhaler_ingredient_distribution.csv Loading Lookup Table: emergency_inhaler_albuterol_product_distribution.csv Loading Lookup Table: emergency_inhaler_levalbuterol_product_distribution.csv Loading submodule modules\medications\hypertension_medication.json Loading submodule modules\medications\maintenance_inhaler.json Loading Lookup Table: maintenance_inhaler_ingredient_distribution.csv Loading Lookup Table: maintenance_inhaler_beclomethasone_product_distribution.csv Loading Lookup Table: maintenance_inhaler_budesonide_product_distribution.csv Loading Lookup Table: maintenance_inhaler_fluticasone_product_distribution.csv Loading Lookup Table: maintenance_inhaler_mometasone_product_distribution.csv Loading submodule modules\medications\moderate_opioid_pain_reliever.json Loading submodule modules\medications\otc_antihistamine.json Loading submodule modules\medications\otc_pain_reliever.json Loading submodule modules\medications\statin.json Loading Lookup Table: statin_ingredient_distribution.csv Loading Lookup Table: statin_atorvastatin_product_distribution.csv Loading Lookup Table: statin_ezetimibe_simvastatin_product_distribution.csv Loading Lookup Table: statin_lovastatin_product_distribution.csv Loading Lookup Table: statin_pitavastatin_product_distribution.csv Loading Lookup Table: statin_pravastatin_product_distribution.csv Loading Lookup Table: statin_rosuvastatin_product_distribution.csv Loading Lookup Table: statin_simvastatin_product_distribution.csv Loading submodule modules\medications\strong_opioid_pain_reliever.json Loading submodule modules\metabolic_syndrome\amputations.json Loading submodule modules\metabolic_syndrome\dme_supplies.json Loading submodule modules\metabolic_syndrome\eye_conditions.json Loading submodule modules\metabolic_syndrome\kidney_conditions.json Loading submodule modules\metabolic_syndrome\medications.json Loading submodule modules\snf\skilled_nursing_facility.json Loading submodule modules\surgery\general_anesthesia.json Loading submodule modules\total_joint_replacement\functional_status_assessments.json Loading submodule modules\veterans\veteran_suicide_probabilities.json Loading submodule modules\weight_loss\mend_week.json Loading module modules\acute_myeloid_leukemia.json Loading Lookup Table: AML.csv Loading module modules\allergic_rhinitis.json Loading module modules\allergies.json Loading module modules\anemia___unknown_etiology.json Loading module modules\appendicitis.json Loading module modules\asthma.json Loading module modules\atopy.json Loading module modules\atrial_fibrillation.json Loading module modules\attention_deficit_disorder.json Loading module modules\breast_cancer.json Loading module modules\bronchitis.json Loading module modules\cerebral_palsy.json Loading module modules\chronic_kidney_disease.json Loading module modules\colorectal_cancer.json Loading module modules\congestive_heart_failure.json Loading module modules\contraceptive_maintenance.json Loading module modules\contraceptives.json Loading module modules\copd.json Loading module modules\covid19.json Loading Lookup Table: covid19_prob.csv Loading module modules\cystic_fibrosis.json Loading module modules\dementia.json Loading module modules\dermatitis.json Loading module modules\dialysis.json Loading module modules\ear_infections.json Loading module modules\epilepsy.json Loading module modules\female_reproduction.json Loading module modules\fibromyalgia.json Loading module modules\food_allergies.json Loading module modules\gallstones.json Loading module modules\gout.json Loading module modules\hiv_care.json Loading Lookup Table: hiv_care.csv Loading module modules\hiv_diagnosis.json Loading Lookup Table: hiv_mortality_later.csv Loading Lookup Table: hiv_mortality_early.csv Loading Lookup Table: hiv_mortality_very_early.csv Loading Lookup Table: hiv_diagnosis_early.csv Loading Lookup Table: hiv_diagnosis_later.csv Loading module modules\home_health_treatment.json Loading module modules\home_hospice_snf.json Loading module modules\homelessness.json Loading module modules\hospice_treatment.json Loading module modules\hypertension.json Loading module modules\hypothyroidism.json Loading module modules\injuries.json Loading module modules\kidney_transplant.json Loading module modules\lung_cancer.json Loading module modules\lupus.json Loading module modules\mTBI.json Loading module modules\med_rec.json Loading module modules\mend_program.json Loading module modules\metabolic_syndrome_care.json Loading module modules\metabolic_syndrome_disease.json Loading module modules\myocardial_infarction.json Loading module modules\opioid_addiction.json Loading module modules\osteoarthritis.json Loading module modules\osteoporosis.json Loading module modules\pregnancy.json Loading module modules\prescribing_opioids_for_chronic_pain_and_treatment_of_oud.json Loading module modules\rheumatoid_arthritis.json Loading module modules\self_harm.json Loading module modules\sepsis.json Loading module modules\sexual_activity.json Loading module modules\sinusitis.json Loading module modules\sleep_apnea.json Loading module modules\sore_throat.json Loading module modules\spina_bifida.json Loading module modules\stable_ischemic_heart_disease.json Loading module modules\stroke.json Loading module modules\total_joint_replacement.json Loading module modules\urinary_tract_infections.json Loading module modules\veteran.json Loading module modules\veteran_hyperlipidemia.json Loading module modules\veteran_lung_cancer.json Loading module modules\veteran_mdd.json Loading module modules\veteran_prostate_cancer.json Loading module modules\veteran_ptsd.json Loading module modules\veteran_self_harm.json Loading module modules\veteran_substance_abuse_conditions.json Loading module modules\veteran_substance_abuse_treatment.json Loading module modules\vhd_aortic.json Loading Lookup Table: vhd_as.csv Loading Lookup Table: vhd_ar.csv Loading module modules\vhd_mitral.json Loading Lookup Table: vhd_mr.csv Loading Lookup Table: vhd_ms.csv Loading module modules\vhd_pulmonic.json Loading Lookup Table: vhd_ps.csv Loading Lookup Table: vhd_pr.csv Loading module modules\vhd_tricuspid.json Loading Lookup Table: vhd_tr.csv Loading Lookup Table: vhd_ts.csv Loading module modules\wellness_encounters.json Loading module C:\Visual Code\synthea\keep_hospice.json Running with options: Population: 10 Seed: 1689870997699 Provider Seed:1689870997699 Reference Time: 1689870997699 Location: Massachusetts Min Age: 0 Max Age: 140 3 -- Imogene688 Joetta231 Gerlach374 (77 y/o F) Lynn, Massachusetts DECEASED (109479) 9 -- Denny560 Kuvalis369 (49 y/o M) Bridgewater, Massachusetts DECEASED (85094) Waiting for threads to finish... java.util.concurrent.ThreadPoolExecutor@1cc8416a[Shutting down, pool size = 8, active threads = 8, queued tasks = 0, completed tasks = 2] 4 -- Regine404 Sauer652 (52 y/o F) Worcester, Massachusetts DECEASED (110533) 10 -- Luciana251 Koch169 (49 y/o F) Stow, Massachusetts DECEASED (73973) 7 -- Lynn917 Greenfelder433 (52 y/o M) South Hadley, Massachusetts DECEASED (108371) 8 -- Coy949 Herzog843 (38 y/o M) Westport, Massachusetts DECEASED (56237) Waiting for threads to finish... java.util.concurrent.ThreadPoolExecutor@1cc8416a[Shutting down, pool size = 4, active threads = 4, queued tasks = 0, completed tasks = 6] 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Waiting for threads to finish... java.util.concurrent.ThreadPoolExecutor@1cc8416a[Shutting down, pool size = 3, active threads = 3, queued tasks = 0, completed tasks = 7] 6 -- Lahoma872 Maryland870 Waters156 (34 y/o F) Weymouth, Massachusetts DECEASED (49529) Waiting for threads to finish... java.util.concurrent.ThreadPoolExecutor@1cc8416a[Shutting down, pool size = 2, active threads = 2, queued tasks = 0, completed tasks = 8] 1 -- Ram≤n841 Partida347 (36 y/o M) Upton, Massachusetts DECEASED (50879) Waiting for threads to finish... java.util.concurrent.ThreadPoolExecutor@1cc8416a[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 9] 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:502) at org.mitre.synthea.engine.Generator.lambda$run$3(Generator.java:382) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Records: total=8, alive=0, dead=8 RNG=10 Clinician RNG=5642

BUILD SUCCESSFUL in 2m 59s 4 actionable tasks: 2 executed, 2 up-to-date

dehall commented 11 months ago

Yes, unfortunately the way the keep module works is it tries repeatedly to generate a patient until one meeting the criteria is found, so for uncommon criteria such as hospice then it will take a long time. The other approach would be to modify the modules to make your conditions of interest more common.

I'd suggest adding another command line flag -a 45-70 (or feel free to adjust if you need a wider range) to limit the age range, like I said it's probably especially uncommon if not impossible for people below a certain age to go into hospice in Synthea, so it should speed up this scenario to define a specific age range.