synthetichealth / synthea

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

Randomize medication or procedures #808

Open purvapruthi opened 3 years ago

purvapruthi commented 3 years ago

Hi,

I am trying to generate patient data to mimic randomized controlled trial data (RCTs) where treatment is randomized (probability of getting a treatment in a particular condition is 0.5). I am looking to modify the patient data generated using Synthea into this data format (patient_covariates, treatment, outcome), where patient's covariates are demographics and conditions e.g. race, gender, ethnicity, age, breast cancer. Treatment is the drug or procedure provided to the patient with breast cancer, and the outcome is observations after treatment e.g. mortality.

I was wondering if it is possible to generate data this way by modifying probabilities for the medication in some manner. If yes, could you please direct me to the right set of files?

jawalonoski commented 3 years ago

All of the medications are administered with MedicationOrder states.

You can find these states by searching for the string "MedicationOrder" within src/main/resources/modules folder or using a web-browser to browse the modules online at https://synthetichealth.github.io/module-builder/. The modules are organized by disease, so you can narrow down your search that way if you'd like.

You can add, delete, or create new medications using MedicationOrder states, and you can control which medication states are executed using conditional logic or probabilities using different types of Transitions. In your example, you could use a Distributed transition.