GithubHelp home page GithubHelp logo

synthetichealth / synthea Goto Github PK

View Code? Open in Web Editor NEW
2.0K 74.0 597.0 638.31 MB

Synthetic Patient Population Simulator

Home Page: https://synthetichealth.github.io/synthea

License: Apache License 2.0

Shell 0.05% Batchfile 0.02% Java 97.80% FreeMarker 1.57% JavaScript 0.56%
synthea synthetic-data synthetic-population fhir health-data simulation

synthea's Introduction

SyntheaTM Patient Generator Build Status codecov

SyntheaTM is a Synthetic Patient Population Simulator. The goal is to output synthetic, realistic (but not real), patient data and associated health records in a variety of formats.

Read our wiki and Frequently Asked Questions for more information.

Currently, SyntheaTM features include:

  • Birth to Death Lifecycle
  • Configuration-based statistics and demographics (defaults with Massachusetts Census data)
  • Modular Rule System
    • Drop in Generic Modules
    • Custom Java rules modules for additional capabilities
  • Primary Care Encounters, Emergency Room Encounters, and Symptom-Driven Encounters
  • Conditions, Allergies, Medications, Vaccinations, Observations/Vitals, Labs, Procedures, CarePlans
  • Formats
    • HL7 FHIR (R4, STU3 v3.0.1, and DSTU2 v1.0.2)
    • Bulk FHIR in ndjson format (set exporter.fhir.bulk_data = true to activate)
    • C-CDA (set exporter.ccda.export = true to activate)
    • CSV (set exporter.csv.export = true to activate)
    • CPCDS (set exporter.cpcds.export = true to activate)
  • Rendering Rules and Disease Modules with Graphviz

Developer Quick Start

These instructions are intended for those wishing to examine the Synthea source code, extend it or build the code locally. Those just wishing to run Synthea should follow the Basic Setup and Running instructions instead.

Installation

System Requirements: SyntheaTM requires Java JDK 11 or newer. We strongly recommend using a Long-Term Support (LTS) release of Java, 11 or 17, as issues may occur with more recent non-LTS versions.

To clone the SyntheaTM repo, then build and run the test suite:

git clone https://github.com/synthetichealth/synthea.git
cd synthea
./gradlew build check test

Changing the default properties

The default properties file values can be found at src/main/resources/synthea.properties. By default, synthea does not generate CCDA, CPCDA, CSV, or Bulk FHIR (ndjson). You'll need to adjust this file to activate these features. See the wiki for more details, or use our guided customizer tool.

Generate Synthetic Patients

Generating the population one at a time...

./run_synthea

Command-line arguments may be provided to specify a state, city, population size, or seed for randomization.

run_synthea [-s seed] [-p populationSize] [state [city]]

Full usage info can be printed by passing the -h option.

$ ./run_synthea -h     

> Task :run
Usage: run_synthea [options] [state [city]]
Options: [-s seed]
         [-cs clinicianSeed]
         [-p populationSize]
         [-r referenceDate 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

Some settings can be changed in ./src/main/resources/synthea.properties.

SyntheaTM will output patient records in C-CDA and FHIR formats in ./output.

SyntheaTM GraphViz

Generate graphical visualizations of SyntheaTM rules and modules.

./gradlew graphviz

Concepts and Attributes

Generate a list of concepts (used in the records) or attributes (variables on each patient).

./gradlew concepts
./gradlew attributes

License

Copyright 2017-2023 The MITRE Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

synthea's People

Contributors

abdulrahims avatar afansi avatar andrequina avatar babraham33 avatar brianandersonmitre avatar briankolowitz avatar casey7083 avatar cjduffett avatar cmbear37 avatar cmoesel avatar dehall avatar eedrummer avatar glow-mdsol avatar hadleynet avatar jawalonoski avatar jcgeer avatar jeffeastman avatar johngrimes avatar kghoreshi avatar laambrosino avatar mdk6jd avatar mickohanlon23 avatar mosiermt avatar mzwong avatar nanowizard avatar pmadria avatar robertscalfani avatar shabiel avatar swohlever avatar tiloc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

synthea's Issues

Method 'old_init' not defined in SortedSet

Encountered the following runtime error during the latests sequential run. Stack trace:

method 'old_init' not defined in SortedSet
org/jruby/RubyModule.java:2840:in `remove_method'
/Users/cduffett/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/set.rb:686:in `block in setup'
org/jruby/RubyModule.java:2790:in `module_eval'
/Users/cduffett/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/set.rb:684:in `setup'
/Users/cduffett/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/set.rb:694:in `initialize'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/chunky_png-1.3.8/lib/chunky_png/palette.rb:22:in `initialize'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/chunky_png-1.3.8/lib/chunky_png/palette.rb:67:in `from_canvas'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/chunky_png-1.3.8/lib/chunky_png/canvas.rb:269:in `palette'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/chunky_png-1.3.8/lib/chunky_png/canvas/png_encoding.rb:124:in `determine_png_encoding'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/chunky_png-1.3.8/lib/chunky_png/canvas/png_encoding.rb:75:in `to_datastream'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/chunky_png-1.3.8/lib/chunky_png/image.rb:62:in `to_datastream'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/chunky_png-1.3.8/lib/chunky_png/canvas/png_encoding.rb:50:in `to_blob'
/Users/cduffett/github/synthea/lib/records/fhir.rb:142:in `basic_info'
/Users/cduffett/github/synthea/lib/records/fhir.rb:11:in `convert_to_fhir'
/Users/cduffett/github/synthea/lib/records/exporter.rb:26:in `export'
/Users/cduffett/github/synthea/lib/world/sequential.rb:215:in `block in process_person'
/Users/cduffett/github/synthea/lib/world/sequential.rb:327:in `block in run_task'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/concurrent-ruby-1.0.4-java/lib/concurrent/executor/java_executor_service.rb:94:in `run'

Looks to be an issue with the png gem we're using for the fingerprints, but it's not happening for every patient.

Medications Feedback

  • Don't prescribe injectable nitroglycerine - use sublingual instead.

  • Amlodipine and Simvastatin have a dangerous drug-drug interaction. Rookie mistake.

  • Clopidogrel was not FDA approved until 1997, Simvastatin in 1991, and Amlodipine in 1994.

  • Many young adult females (16+) could be on some form of contraceptive.

  • Patient's with poorly controlled blood pressure should be taking additional medications and at higher doses.

  • Only prescribe oxycontin for chronic pain (e.g. cancer), or from the occasional "pill mill" or ER. Not for a sprained ankle.

  • Urethritis, cystitis and pyelonephritis are all being treated with nitrofurantoin. Nitrofurantoin does not work for pyelonephritis - this needs to be changed.

Medications Feedback

  • Don't prescribe injectable nitroglycerine - use sublingual instead.

  • Amlodipine and Simvastatin have a dangerous drug-drug interaction. Rookie mistake.

  • Clopidogrel was not FDA approved until 1997, Simvastatin in 1991, and Amlodipine in 1994.

  • Many young adult females (16+) could be on some form of contraceptive.

  • Patient's with poorly controlled blood pressure should be taking additional medications and at higher doses.

CSV Exporter

Researchers have requested CSV or Excel output in a table form.

Asthma Feedback

  • Most asthma medications should be of the inhalant type, not oral.

  • Children with asthma would likely have exzema or allergic rhinitis too. It's called the "atopic triad".

  • Need additional asthma medications for patients with severe asthma. Most of our asthma patients are "atypical", with too many asthma attacks.

Whitespace

The project mixes tabs and spaces throughout the source code. I suggest eliminating all tabs from the project. Also, please remove all trailing whitespace.

Generic Module Error

NoMethodError: undefined method `to_sym' for nil:NilClass
Did you mean?  to_s
/Users/jwalonoski/git/synthea/lib/generic/states.rb:458:in `end_prescription'
/Users/jwalonoski/git/synthea/lib/generic/states.rb:452:in `process'
/Users/jwalonoski/git/synthea/lib/generic/states.rb:36:in `run'
/Users/jwalonoski/git/synthea/lib/generic/context.rb:31:in `run'
/Users/jwalonoski/git/synthea/lib/generic/context.rb:50:in `run'
/Users/jwalonoski/git/synthea/lib/modules/generic.rb:54:in `block (2 levels) in <class:Generic>'
/Users/jwalonoski/git/synthea/lib/modules/generic.rb:49:in `each'
/Users/jwalonoski/git/synthea/lib/modules/generic.rb:49:in `block in <class:Generic>'
/Users/jwalonoski/git/synthea/lib/modules/module.rb:10:in `call'
/Users/jwalonoski/git/synthea/lib/modules/module.rb:10:in `block in run'
/Users/jwalonoski/git/synthea/lib/modules/module.rb:10:in `each'
/Users/jwalonoski/git/synthea/lib/modules/module.rb:10:in `run'
/Users/jwalonoski/git/synthea/lib/modules/module.rb:18:in `block in apply'
/Users/jwalonoski/git/synthea/lib/modules/module.rb:18:in `each'
/Users/jwalonoski/git/synthea/lib/modules/module.rb:18:in `apply'
/Users/jwalonoski/git/synthea/lib/world/sequential.rb:274:in `build_person'
/Users/jwalonoski/git/synthea/lib/world/sequential.rb:169:in `run_random'
/Users/jwalonoski/git/synthea/lib/world/sequential.rb:83:in `run'

Instructions for Other Geographic Areas

If you wanted to configure Synthea to run for an area in the Netherlands or England, what would you need to do?

  • How to configure the area demographics?
  • How to change prevalences and incidence?
  • How to turn off US-only features such as race and ethnicity?

Outpatient Visits only on Weekdays

Right now Encounters can happen on any day of the week. For emergencies this makes sense. Realistically however, many Encounters would never be scheduled on a weekend. For example, visits to a specialist or routine (non-emergency) surgery.

Perhaps we should add a weekday option to the Encounter state that forces it to be scheduled on the next available weekday?

AllergyIntolerance Types

Presently the AllergyIntolerance category is hard-coded to 'food'. However, other types of allergies will soon be modeled in Synthea (pending the Atopic Triad PR). FHIR also allows the following categories:

[food, medication, biologic, environment]

I propose we add a category, or alternatively allergy_type property to the AllergyOnset state to make this configurable.

Injuries Timing Issue

When a patient gets a Knee_Injury, the following sequence of states can be observed:

Knee_Injury [Simple]
ED_Visit_For_Knee_Injury [Encounter]
Torn_ACL [ConditionOnset]
Wait_For_Knee_Surgery [Delay]
Knee_Surgery_Encounter [Encounter]
Knee_Surgery_Procedure [Procedure]
Knee_Injury_Prescribe_Pain_Medication [Simple]
Knee_Injury_Prescribe_Non_Opioid [MedicationOrder]
Knee_Injury_CarePlan [CarePlanStart]

The problem I see is that the Knee_Injury_CarePlan state is referencing the ED_Visit_For_Knee_Injury state. Because the Wait_For_Knee_Surgery delay advances the clock by one week, the referenced ED visit violates the CarePlanStart requirement: "The CarePlanStart state must come after a target_encounter Encounter state in the module, but must have the same start time as that Encounter; otherwise it will not be recorded in the patient's record."

In my implementation, the problem manifests itself because the subsequent End_Injury_CarePlan state cannot find the CarePlan and throws an exception.

Here's the full state trace:

Knee_Injury [Simple]
ED_Visit_For_Knee_Injury [Encounter]
Torn_ACL [ConditionOnset]
Wait_For_Knee_Surgery [Delay]
Knee_Surgery_Encounter [Encounter]
Knee_Surgery_Procedure [Procedure]
Knee_Injury_Prescribe_Pain_Medication [Simple]
Knee_Injury_Prescribe_Non_Opioid [MedicationOrder]
Knee_Injury_CarePlan [CarePlanStart]
Knee_Injury_Recovery_Period [Delay]
End_Knee_Injury [ConditionEnd]
Conclude_Injury [Simple]
End_Injury_CarePlan [CarePlanEnd]

I tried, instead, to make the Knee_Injury_CarePlan reference the Knee_Surgery_Encounter. This worked for the Torn_ACL but results in another error in the Torn_Meniscus case where there is no Delay.

Knee_Injury [Simple]
ED_Visit_For_Knee_Injury [Encounter]
Torn_Meniscus [ConditionOnset]
Knee_Injury_CarePlan [CarePlanStart]
Knee_Injury_Recovery_Period [Delay]
End_Knee_Injury [ConditionEnd]
Conclude_Injury [Simple]
End_Injury_CarePlan [CarePlanEnd]

So its tricky I guess...

output/prevalences.csv does not write if output dir changed

Outputting Metabolic Syndrome Results to output/prevalences.csv
rake aborted!
Errno::ENOENT: No such file or directory - output/prevalences.csv
/Users/aquina/data/workspaces/shr/synthea/lib/world/sequential.rb:108:in run' lib/tasks/tasks.rake:58:in block in (root)'
/Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/rake-12.0.0/exe/rake:27:in <top>' /Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:1:in (root)'
/Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in kernel_load' /Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:27:in run'
/Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/cli.rb:332:in exec' /Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run'
/Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in invoke_command' /Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor.rb:359:in dispatch'
/Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/cli.rb:20:in dispatch' /Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/base.rb:440:in block in start'
/Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/lib/bundler/cli.rb:11:in start' /Users/aquina/.rvm/gems/jruby-9.1.2.0/gems/bundler-1.13.1/exe/bundle:34:in '
/Users/aquina/.rvm/gems/jruby-9.1.2.0/bin/bundle:22:in `'

Multithreaded Sequential Runs Without towns.json Fail

If you start a multithreaded run without passing the towns.json config file the sequential generation fails, producing the following error:

NoMethodError: undefined method 'count' for nil:NilClass
/Users/cduffett/github/synthea/lib/world/sequential.rb:67:in 'run'
lib/tasks/tasks.rake:53:in 'block in (root)'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/rake-11.3.0/exe/rake:27:in '<top>'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/bin/jruby_executable_hooks:15:in '<top>'
Tasks: TOP => synthea:sequential

If a multithreaded run cannot be done without towns.json we should log an explicit warning and terminate. If it can, we should support it.

Unit Test Soon to be Deprecated

The following warning now appears when running the unit tests:

Use assert_nil if expecting nil from /home/travis/build/synthetichealth/synthea/test/unit/generic_states_test.rb:878:in `test_setAttribute_without_value'. This will fail in MT6.

It's not failing yet, but it will if we update Minitest.

No Statins for Diabetes

2 Statin medications are exported in concepts.csv:

RxNorm, 312961, Simvastatin 20 MG Oral Tablet
RxNorm, 259255, Atorvastatin 80 MG Oral Tablet

But are never prescribed in any of the modules. I'm guessing these were forgotten when diabetes was ported to GMF. Nonetheless, I'm surprised that these medications aren't prescribed anywhere for high cholesterol.

Target Encounter Futures?

Jay wrote on another thread:

"We started transitioning to a scheme where the current encounter was always in context, which eliminated the need for target_encounter in most cases. You can still set these attributes, but their use is deprecated, which is why references have been removed from the wiki."

I tried removing the target_encounters from Observation, Procedure, MedicationOrder and CarePlanStart states. A quick run yielded immediate failures. Surveying the existing modules indicates they are still in wide use.

As long as their use is still widespread and is still required, it seems premature to remove them from the documentation.

Jeff

Wellness Encounters.Record_Height [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Weight [Observation] -> Wellness_Encounter
Wellness Encounters.Record_BMI [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Systolic_BP [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Diastolic_BP [Observation] -> Wellness_Encounter
Wellness Encounters.Record_HA1C [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Glucose [Observation] -> Wellness_Encounter
Wellness Encounters.Record_UreaNitrogen [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Creatinine [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Calcium [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Sodium [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Potassium [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Chloride [Observation] -> Wellness_Encounter
Wellness Encounters.Record_CO2 [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Cholesterol [Observation] -> Wellness_Encounter
Wellness Encounters.Record_Triglycerides [Observation] -> Wellness_Encounter
Wellness Encounters.Record_LDL [Observation] -> Wellness_Encounter
Wellness Encounters.Record_HDL [Observation] -> Wellness_Encounter
Wellness Encounters.Record_ACR [Observation] -> Wellness_Encounter
Wellness Encounters.Record_EGFR [Observation] -> Wellness_Encounter

Allergy Immunotherapy.Immunotherapy_Procedure [Procedure] -> Immunotherapy_Treatment
Appendicitis.Appendectomy [Procedure] -> Appendectomy_Encounter
Asthma.Asthma_Screening [Procedure] -> Asthma_Diagnosis
Attention Deficit Disorder.Behavior_Treatment_Procedure [Procedure] -> Behavior_Treatment_Encounter
Colorectal Cancer.Routine_Colonoscopy_Procedure [Procedure] -> Routine_Colonoscopy_Encounter
Colorectal Cancer.Fecal_Test [Procedure] -> Routine_Colonoscopy_Encounter
Colorectal Cancer.Adenoma_Removal [Procedure] -> Routine_Colonoscopy_Encounter
Colorectal Cancer.Adenoma_Biopsy [Procedure] -> Routine_Colonoscopy_Encounter
Colorectal Cancer.Followup_Colonoscopy_Procedure [Procedure] -> Followup_Colonoscopy_Encounter
Colorectal Cancer.Recurrent_Adenoma_Removal [Procedure] -> Followup_Colonoscopy_Encounter
Colorectal Cancer.Diagnostic_Colonoscopy_Procedure [Procedure] -> Diagnostic_Colonoscopy_Encounter
Colorectal Cancer.Partial_Colectomy_Procedure [Procedure] -> Partial_Colectomy_Encounter
Colorectal Cancer.Diverting_Colostomy_Procedure [Procedure] -> Diverting_Colostomy_Encounter
Colorectal Cancer.Chemotherapy_Procedure [Procedure] -> Chemotherapy_Encounter
COPD.Initial_FEV_Test [Procedure] -> DiagnosisEncounter
COPD.Followup_FEV_Test [Procedure] -> COPD_Followup_Encounter
COPD.Lung_Transplant [Procedure] -> Surgery_Encounter
COPD.Lung_Volume_Reduction [Procedure] -> Surgery_Encounter
COPD.Pulmonary_Rehab [Procedure] -> COPD_Followup_Encounter
Lung Cancer.Chest X-Ray [Procedure] -> Diagnosis Encounter I
Lung Cancer.Chest CT Scan [Procedure] -> Diagnosis Encounter II
Lung Cancer.Sputum Cytology (Phelgm) [Procedure] -> Diagnosis Encounter III
Lung Cancer.Thoracentesis (Fluid) [Procedure] -> Diagnosis Encounter III
Lung Cancer.Needle Biopsy (Cells) [Procedure] -> Diagnosis Encounter III
Lung Cancer.Bronchoscopy (Tube) [Procedure] -> Diagnosis Encounter III
Lung Cancer.MRI Brain [Procedure] -> Diagnosis Encounter IV
Lung Cancer.SCLC Radiation [Procedure] -> SCLC Treatment Encounter
Lung Cancer.NSCLC Radiation [Procedure] -> NSCLC Treatment Encounter
Medication Reconciliation.Med_Rec [Procedure] -> Wellness_Encounter
Opioid Addiction.Enter_Directed_Use_Procedure1 [Procedure] -> Enter_Directed_Use_Encounter1
Pregnancy.Pregnancy_Test [Procedure] -> Prenatal_Initial_Visit
Pregnancy.Induction [Procedure] -> Hospital_Admission_For_Birth
Pregnancy.Epidural [Procedure] -> Hospital_Admission_For_Birth
Pregnancy.Augmentation [Procedure] -> Hospital_Admission_For_Birth
Pregnancy.Episiotomy [Procedure] -> Hospital_Admission_For_Birth
Pregnancy.Assisted_Delivery [Procedure] -> Hospital_Admission_For_Birth
Pregnancy.Spontaneous_Breech [Procedure] -> Hospital_Admission_For_Birth
Pregnancy.Normal_Birth_Procedure [Procedure] -> Hospital_Admission_For_Birth
Pregnancy.Premature_Birth_Procedure [Procedure] -> Hospital_Admission_For_Birth
Pregnancy.Induced_Birth_Procedure [Procedure] -> Hospital_Admission_For_Birth
Pregnancy.Ectopic_Pregnancy_Surgery_Procedure [Procedure] -> Ectopic_Pregnancy_Surgery_Encounter
Pregnancy.Induced_Abortion_Procedure [Procedure] -> Induced_Abortion_Encounter
Self Harm.Psychiatric_Evaluation [Procedure] -> ED_Visit_For_Attempted_Suicide
Self Harm.Short_Hospital_Stay [Procedure] -> ED_Visit_For_Attempted_Suicide
Self Harm.Followup_Psychiatric_Evaluation [Procedure] -> Attempted_Suicide_Followup
Self Harm.Autopsy_Examination [Procedure] -> Autopsy_Encounter
Sinusitis.Sinus_Surgery [Procedure] -> Chronic_Sinusitis_Followup
Sore Throat.Throat_Culture [Procedure] -> Doctor_Visit
Total Joint Replacement.Knee_Replacement_Procedure [Procedure] -> Joint_Replacement_Encounter
Total Joint Replacement.Hip_Replacement_Procedure [Procedure] -> Joint_Replacement_Encounter

Asthma.Prescribe_Maintenance_Inhaler [MedicationOrder] -> Asthma_Diagnosis
Asthma.Prescribe_Emergency_Inhaler [MedicationOrder] -> Asthma_Diagnosis
Attention Deficit Disorder.Ritalin [MedicationOrder] -> ADHD_Diagnosis
Attention Deficit Disorder.Strattera [MedicationOrder] -> ADHD_Diagnosis
Colorectal Cancer.Chemotherapy_Drugs_I [MedicationOrder] -> Chemotherapy_Encounter
Colorectal Cancer.Chemotherapy_Drugs_II [MedicationOrder] -> Chemotherapy_Encounter
COPD.Prescribe_Medication [MedicationOrder] -> COPD_Followup_Encounter
Dementia.FirstPrescription1 [MedicationOrder] -> DiagnosisEncounter
Dementia.FirstPrescription2 [MedicationOrder] -> DiagnosisEncounter
Dementia.FirstPrescription3 [MedicationOrder] -> DiagnosisEncounter
Dementia.SecondPrescription1 [MedicationOrder] -> ModeratelySevere_Encounter
Dementia.SecondPrescription2 [MedicationOrder] -> ModeratelySevere_Encounter
Dementia.SecondPrescription3 [MedicationOrder] -> ModeratelySevere_Encounter
Fibromyalgia.Strong_NSAID [MedicationOrder] -> Fibromyalgia_Diagnosis
Fibromyalgia.Prescribe_Lyrica [MedicationOrder] -> Fibromyalgia_Episode
Fibromyalgia.Prescribe_Cymbalta [MedicationOrder] -> Fibromyalgia_Episode
Fibromyalgia.Prescribe_Savella [MedicationOrder] -> Fibromyalgia_Episode
Fibromyalgia.Prescribe_Opioid [MedicationOrder] -> Fibromyalgia_Episode
Gout.Strong_NSAID [MedicationOrder] -> Gout_Diagnosis
Gout.Colchicine [MedicationOrder] -> Gout_Diagnosis
Gout.Uric_Acid_Reducer [MedicationOrder] -> Gout_Diagnosis
Lung Cancer.SCLC Chemotheraphy I [MedicationOrder] -> SCLC Treatment Encounter
Lung Cancer.SCLC Chemotheraphy II [MedicationOrder] -> SCLC Treatment Encounter
Lung Cancer.NSCLC Chemotheraphy I [MedicationOrder] -> NSCLC Treatment Encounter
Lung Cancer.NSCLC Chemotheraphy II [MedicationOrder] -> NSCLC Treatment Encounter
Lupus.Lupus_Nonopioid_Pain_Medication [MedicationOrder] -> Lupus_Diagnosis
Lupus.Corticosteroid [MedicationOrder] -> Lupus_Diagnosis
Lupus.Immune_Suppressant [MedicationOrder] -> Lupus_Flareup
Lupus.Flareup_Corticosteroid [MedicationOrder] -> Lupus_Flareup
Opioid Addiction.Directed_Use_Prescription1 [MedicationOrder] -> Enter_Directed_Use_Encounter1
Opioid Addiction.Directed_Use_Prescription2 [MedicationOrder] -> Enter_Directed_Use_Encounter2
Opioid Addiction.Directed_Use_Prescription3 [MedicationOrder] -> Enter_Directed_Use_Encounter3
Osteoarthritis.OA_Pain_Medication [MedicationOrder] -> OA_Diagnosis
Rheumatoid Arthritis.RA_Nonopioid_Pain_Medication [MedicationOrder] -> RA_Diagnosis
Rheumatoid Arthritis.DMARD [MedicationOrder] -> RA_Diagnosis
Rheumatoid Arthritis.Corticosteroid [MedicationOrder] -> RA_Diagnosis
Sinusitis.Prescribe_Antibiotic [MedicationOrder] -> Doctor_Visit
Sore Throat.Prescribe_Antibiotics_Child [MedicationOrder] -> Doctor_Visit
Sore Throat.Prescribe_Antibiotics_Adult [MedicationOrder] -> Doctor_Visit
Urinary Tract Infections.Prescribe_UTI_Antibiotic [MedicationOrder] -> UTI_Diagnosis
Urinary Tract Infections.Prescribe_OTC_Painkiller_For_UTIs [MedicationOrder] -> UTI_Diagnosis
Urinary Tract Infections.Prescribe_Second_Round_Of_Antibiotics [MedicationOrder] -> Followup_Encounter

Allergy Immunotherapy.Immunotherapy_CarePlan [CarePlanStart] -> Immunotherapy_Consultation
Asthma.Smoker_CarePlan [CarePlanStart] -> Asthma_Diagnosis
Asthma.Nonsmoker_CarePlan [CarePlanStart] -> Asthma_Diagnosis
Attention Deficit Disorder.ADHD_CarePlan [CarePlanStart] -> ADHD_Diagnosis
Colorectal Cancer.Colorectal_Cancer_CarePlan [CarePlanStart] -> Oncologist_Encounter
Colorectal Cancer.Partial_Colectomy_CarePlan [CarePlanStart] -> Partial_Colectomy_Encounter
Colorectal Cancer.Diverting_Colostomy_CarePlan [CarePlanStart] -> Diverting_Colostomy_Encounter
COPD.Nonsmoker_CarePlan [CarePlanStart] -> DiagnosisEncounter
COPD.Smoker_CarePlan [CarePlanStart] -> DiagnosisEncounter
Dementia.Dementia_CarePlan [CarePlanStart] -> DiagnosisEncounter
Fibromyalgia.Fibromyalgia_CarePlan [CarePlanStart] -> Fibromyalgia_Diagnosis
Gout.Gout_CarePlan [CarePlanStart] -> Gout_Diagnosis
Lung Cancer.Lung_Cancer_CarePlan [CarePlanStart] -> Diagnosis Encounter IV
Lupus.Lupus_CarePlan [CarePlanStart] -> Lupus_Diagnosis
Opioid Addiction.Opioid_Addiction_CarePlan [CarePlanStart] -> Addiction_Overdose_Encounter
Osteoarthritis.OA_CarePlan [CarePlanStart] -> OA_Diagnosis
Pregnancy.Pregnancy_CarePlan [CarePlanStart] -> Prenatal_Initial_Visit
Rheumatoid Arthritis.RA_CarePlan [CarePlanStart] -> RA_Diagnosis
Self Harm.Suicide_CarePlan [CarePlanStart] -> Attempted_Suicide_Followup
Total Joint Replacement.Post_Op_CarePlan [CarePlanStart] -> Joint_Replacement_Encounter
Urinary Tract Infections.UTI_CarePlan [CarePlanStart] -> UTI_Diagnosis

Lupus Corticosteroid Issue

Now that I'm throwing exceptions when target_encounter timing conditions aren't met, I'm seeing a persistent problem in the Lupus Module. Here's a trace:

State Trace:
2017/01/06 08:16 Initial [Initial]
2041/12/31 08:16 Delay_Until_Lupus [Delay]
2017/01/13 08:16 Delay_Until_Lupus [Guard]
2041/12/27 08:16 Lupus [ConditionOnset]
2041/12/27 09:16 Lupus_Diagnosis [Encounter]
2042/01/03 08:16 Lupus_CarePlan [CarePlanStart]
2042/01/03 08:16 Lupus_Nonopioid_Pain_Medication [MedicationOrder]
2042/01/03 08:16 Corticosteroid [MedicationOrder]
2042/01/17 08:16 Corticosteroid_Treatment [Delay]
2042/01/17 08:16 End_Corticosteroid [MedicationEnd]
2043/01/17 08:16 Wait_For_Lupus_Flareup [Delay]
2043/01/17 09:16 Lupus_Flareup [Encounter]
2043/01/17 09:16 Immune_Suppressant [MedicationOrder]
2043/01/17 09:16 Corticosteroid [MedicationOrder]

The issue is that the Corticosteroid MedicationOrder refers to the Lupus_Diagnosis Encounter and that encounter has long passed. I added a new Flareup_Corticosteroid state and that fixed the problem. Here's my fix:

"Immune_Suppressant": {
  "type": "MedicationOrder",
  "target_encounter": "Lupus_Flareup",
  "reason": "Lupus",
  "remarks": [
    "More aggressive immune suppressants are used for subsequent flares."
  ],
  "codes": [
    {
      "system": "RxNorm",
      "code": "835900",
      "display": "cycloSPORINE, modified 100 MG [Neoral]"
    }
  ],
  "direct_transition": "Flareup_Corticosteroid"
},

"Flareup_Corticosteroid": {
  "type": "MedicationOrder",
  "target_encounter": "Lupus_Flareup",
  "reason": "Lupus",
  "remarks": [
    "When introduced in higher levels than those produced by the body, corticosteroids ",
    "inhibit inflammation. However, doctors prefer to use these for as short a time period ",
    "as possible to avoid dangerous side effects."
  ],
  "codes": [
    {
      "system": "RxNorm",
      "code": "567645",
      "display": "predniSONE 2.5 MG [Deltasone]"
    }
  ],
  "direct_transition": "Corticosteroid_Treatment"
},

Death Date Exported for Living Patients

Occasionally living patients are exported with their death date set (for sometime in the future). This is typically for patients with lung cancer that haven't died yet, but will shortly. Synthea should only export death dates for patients that are actually deceased.

Also the deceasedBoolean in the FHIR record should be set alongside the deceasedDateTime to make it easier to query deceased/living patients.

Opioid Addiction Feedback

  • Opioid addicts often report allergies to non-narcotic pain medications (e.g. acetaminophen, ibuprofen, naproxen, tramadol).

  • Polysubstance abuse - opioid addicts are likely to also abuse alcohol, cocaine, marijuana, etc.

  • Likely comorbid mental health diagnoses with drug addition, e.g. bipolar, depression, anxiety.

  • Patient's with full blown opioid addiction should have many more pain diagnoses and opioid prescriptions listed, as they solicit them from various doctors.

Heart Disease Feedback

  • Those on cholesterol medication should have additional AST/ALT hepatic panels. At least once every other year, especially since many heart disease medications can affect the liver.

  • Need a better model of "dual antiplatelet therapy" for heart disease patients. This depends on the type of stent in place and the mood of his/her cardiologist, see this article.

  • More patients should die of heart attacks in the mid-1900s. The standards of care were much different.

  • Patients with heart disease are usually taking aspirin too (81mg).

Injuries Module Coding Error

The module has 4 instances of:

 "codes": [
    {
      "system": "SNOMED-CT",
      "code": "Encounter for 'check-up'",
      "display": "185349003"
    }
  ],

Seems like the code and display fields are reversed

Observations target_encounter

Looking at the wiki, it appears that the attribute Observation.target_encounter has been removed. I have found two issues with this change:

  • The module Wellness Encounters still has many Observations with this value set to "Wellness_Encounter"

  • The module "Metabolic Syndrome Standards of Care" has one Observation "Record_HA1C" for which my implementation cannot determine the appropriate target encounter.

The prior state trace is rather long but it does support the correctness of the above exception (see bold states below). The exception occurs about 19 years into a 50yr simulation of 5k patients, so it may be difficult to reproduce. It may also highlight a defect in my implementation.

[2017/03/22 11:07 Initial [Initial], 2017/03/22 11:22 Wellness_Encounter [Encounter], 2017/04/19 11:07 Check_Hypertension [Simple], 2017/04/19 11:07 Check_Diabetes [Simple], 2017/04/19 11:22 Wellness_Encounter [Encounter], 2017/05/17 11:07 Check_Hypertension [Simple], 2017/05/17 11:07 Check_Diabetes [Simple], 2017/05/17 11:22 Wellness_Encounter [Encounter], 2017/07/19 11:07 Check_Hypertension [Simple], 2017/07/19 11:07 Check_Diabetes [Simple], 2017/07/19 11:22 Wellness_Encounter [Encounter], 2017/09/20 11:07 Check_Hypertension [Simple], 2017/09/20 11:07 Check_Diabetes [Simple], 2017/09/20 11:22 Wellness_Encounter [Encounter], 2017/12/20 11:07 Check_Hypertension [Simple], 2017/12/20 11:07 Check_Diabetes [Simple], 2017/12/20 11:22 Wellness_Encounter [Encounter], 2018/03/21 11:07 Check_Hypertension [Simple], 2018/03/21 11:07 Check_Diabetes [Simple], 2018/03/21 11:22 Wellness_Encounter [Encounter], 2018/06/20 11:07 Check_Hypertension [Simple], 2018/06/20 11:07 Check_Diabetes [Simple], 2018/06/20 11:22 Wellness_Encounter [Encounter], 2018/09/19 11:07 Check_Hypertension [Simple], 2018/09/19 11:07 Check_Diabetes [Simple], 2018/09/19 11:22 Wellness_Encounter [Encounter], 2019/03/20 11:07 Check_Hypertension [Simple], 2019/03/20 11:07 Check_Diabetes [Simple], 2019/03/20 11:22 Wellness_Encounter [Encounter], 2019/09/18 11:07 Check_Hypertension [Simple], 2019/09/18 11:07 Check_Diabetes [Simple], 2019/09/18 11:22 Wellness_Encounter [Encounter], 2020/03/18 11:07 Check_Hypertension [Simple], 2020/03/18 11:07 Check_Diabetes [Simple], 2020/03/18 11:22 Wellness_Encounter [Encounter], 2020/09/16 11:07 Check_Hypertension [Simple], 2020/09/16 11:07 Check_Diabetes [Simple], 2020/09/16 11:22 Wellness_Encounter [Encounter], 2021/03/17 11:07 Check_Hypertension [Simple], 2021/03/17 11:07 Check_Diabetes [Simple], 2021/03/17 11:22 Wellness_Encounter [Encounter], 2022/03/16 11:07 Check_Hypertension [Simple], 2022/03/16 11:07 Check_Diabetes [Simple], 2022/03/16 11:22 Wellness_Encounter [Encounter], 2023/03/15 11:07 Check_Hypertension [Simple], 2023/03/15 11:07 Check_Diabetes [Simple], 2023/03/15 11:22 Wellness_Encounter [Encounter], 2024/03/13 11:07 Check_Hypertension [Simple], 2024/03/13 11:07 Check_Diabetes [Simple], 2024/03/13 11:22 Wellness_Encounter [Encounter], 2024/03/20 11:07 Check_Hypertension [Simple], 2024/03/20 11:07 Check_Diabetes [Simple], 2024/03/20 11:22 Wellness_Encounter [Encounter], 2025/03/19 11:07 Check_Hypertension [Simple], 2025/03/19 11:07 Check_Diabetes [Simple], 2025/03/19 11:22 Wellness_Encounter [Encounter], 2026/03/18 11:07 Check_Hypertension [Simple], 2026/03/18 11:07 Check_Diabetes [Simple], 2026/03/18 11:22 Wellness_Encounter [Encounter], 2027/03/17 11:07 Check_Hypertension [Simple], 2027/03/17 11:07 Check_Diabetes [Simple], 2027/03/17 11:22 Wellness_Encounter [Encounter], 2028/03/15 11:07 Check_Hypertension [Simple], 2028/03/15 11:07 Check_Diabetes [Simple], 2028/03/15 11:22 Wellness_Encounter [Encounter], 2029/03/14 11:07 Check_Hypertension [Simple], 2029/03/14 11:07 Check_Diabetes [Simple], 2029/03/14 11:22 Wellness_Encounter [Encounter], 2030/03/13 11:07 Check_Hypertension [Simple], 2030/03/13 11:07 Check_Diabetes [Simple], 2030/03/13 11:22 Wellness_Encounter [Encounter], 2031/03/12 11:07 Check_Hypertension [Simple], 2031/03/12 11:07 Check_Diabetes [Simple], 2031/03/12 11:22 Wellness_Encounter [Encounter], 2031/03/19 11:07 Check_Hypertension [Simple], 2031/03/19 11:07 Check_Diabetes [Simple], 2031/03/19 11:22 Wellness_Encounter [Encounter], 2032/03/17 11:07 Check_Hypertension [Simple], 2032/03/17 11:07 Check_Diabetes [Simple], 2032/03/17 11:22 Wellness_Encounter [Encounter], 2033/03/16 11:07 Check_Hypertension [Simple], 2033/03/16 11:07 Check_Diabetes [Simple], 2033/03/16 11:22 Wellness_Encounter [Encounter], 2034/03/15 11:07 Check_Hypertension [Simple], 2034/03/15 11:07 Check_Diabetes [Simple], 2034/03/15 11:22 Wellness_Encounter [Encounter], 2035/03/14 11:07 Check_Hypertension [Simple], 2035/03/14 11:07 Check_Diabetes [Simple], 2035/03/14 11:22 Wellness_Encounter [Encounter], 2036/03/12 11:07 Check_Hypertension [Simple], 2036/03/12 11:07 Check_Diabetes [Simple], 2036/03/12 11:07 Record_HA1C [Observation]]

Timing Issue in allergies/severe_allergic_reaction.json

"The MedicationOrder state type indicates a point in the module where a medication should be prescribed. The MedicationOrder state must come after an Encounter state in the module, but must have the same start time as that Encounter; otherwise it will not be recorded in the patient's record. See the Encounter section above for more details."

However, in allergies/severe_allergic_reaction.json there is a 2-6 hr Observation_Period separating the Mild_Steroid medication order from its ED_Visit_For_Allergic_Reaction. This causes an exception every time it occurs, since the order state does not have the same start time as the encounter.

This can be resolved by moving the order to precede the delay.

Condition Lookup Failure

Ran across this issue exporting a FHIR record...

[2017-02-01 15:25:48] 2276: Romaguera268, Izabella217. Hispanic Puerto rican. 44 y/o F 223 lbs. -- Diabetic
undefined method `[]' for nil:NilClass
/Users/jwalonoski/git/synthea/lib/records/fhir.rb:255:in `observation'
/Users/jwalonoski/git/synthea/lib/records/fhir.rb:21:in `block (2 levels) in convert_to_fhir'
/Users/jwalonoski/git/synthea/lib/records/fhir.rb:16:in `each'
/Users/jwalonoski/git/synthea/lib/records/fhir.rb:16:in `block in convert_to_fhir'
/Users/jwalonoski/git/synthea/lib/records/fhir.rb:12:in `each'
/Users/jwalonoski/git/synthea/lib/records/fhir.rb:12:in `convert_to_fhir'
/Users/jwalonoski/git/synthea/lib/records/exporter.rb:26:in `export'
/Users/jwalonoski/git/synthea/lib/world/sequential.rb:93:in `block in run_random'
/Users/jwalonoski/git/synthea/lib/world/sequential.rb:237:in `run_task'
/Users/jwalonoski/git/synthea/lib/world/sequential.rb:90:in `run_random'
/Users/jwalonoski/git/synthea/lib/world/sequential.rb:61:in `run'
lib/tasks/tasks.rake:57:in `block (2 levels) in <top (required)>'

Relates to this bit of code trying to reference a condition that doesn't exist:

        if obs_data[:value_type] == 'condition'
          condition_data = COND_LOOKUP[observation['value']]
          entry.resource.valueCodeableConcept = FHIR::CodeableConcept.new('coding' => [{
                                                                            'code' => condition_data[:codes]['SNOMED-CT'][0],
                                                                            'display' => condition_data[:description],
                                                                            'system' => 'http://snomed.info/sct'
                                                                          }])

Encounter Codes

Typically we use SNOMED-CT 185347001 "Encounter for problem" for a lot of our Encounter states. I think we should do our best to find more specific codes that describe either the nature of the visit or what kind of physician was seen. I think the following subset of SNOMED codes makes more sense in most cases:

http://www.snomedbrowser.com/Codes/Details/305260005

Undefined local variable or method "dead"

Encountered this error during a multithreaded sequential run seeded with towns.json.

Error trace:

undefined local variable or method `dead' for #<Synthea::World::Sequential:0x902a7b6>
/Users/cduffett/github/synthea/lib/world/sequential.rb:225:in `block in process_person'
org/jruby/RubyKernel.java:1290:in `loop'
/Users/cduffett/github/synthea/lib/world/sequential.rb:207:in `process_person'
/Users/cduffett/github/synthea/lib/world/sequential.rb:194:in `block in process_city'
/Users/cduffett/github/synthea/lib/world/sequential.rb:325:in `block in run_task'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/concurrent-ruby-1.0.2-java/lib/concurrent/executor/java_executor_service.rb:94:in `run'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/concurrent-ruby-1.0.2-java/lib/concurrent/executor/java_executor_service.rb:29:in `post'
/Users/cduffett/github/synthea/lib/world/sequential.rb:323:in `run_task'
/Users/cduffett/github/synthea/lib/world/sequential.rb:191:in `block in process_city'
org/jruby/RubyFixnum.java:297:in `times'
/Users/cduffett/github/synthea/lib/world/sequential.rb:190:in `process_city'
/Users/cduffett/github/synthea/lib/world/sequential.rb:79:in `block in run'
/Users/cduffett/github/synthea/lib/world/sequential.rb:325:in `block in run_task'
/Users/cduffett/.rvm/gems/jruby-9.1.2.0/gems/concurrent-ruby-1.0.2-java/lib/concurrent/executor/java_executor_service.rb:94:in `run'

Languages and Immigration

Currently all patients are born in Massachusetts, yet only 80% speak English (as their primary native language). Immigration likely accounts for non-English speakers, so those people ought to have a foreign place of birth.

target_encounter dropped from Wiki States but still appears in modules

The following states still have target_encounter references in the modules but not in the wiki:

MedicationOrder
Procedure
CarePlanStart
Observation

From the Encounter Documentation:

"During a single time step, if an Encounter state is processed it becomes the current_encounter. This encounter will be used as the encounter for all subsequent clinical states, for example a Procedure or MedicationOrder. When an EncounterEnd state is reached, the current_encounter ends and remains nil until another Encounter is processed. If Synthea cannot identify a current_encounter for a clinical state an error is raised."

I removed the target_encounter fields from the above states in order to implement the new encounter policy but I'm getting a lot of errors due (I believe) to forward encounter references still in the modules.

DSTU2 Exporter

Most production implementations to be used within the United States that will be certified for use in MU 2015 are going to use DSTU2.

Top 10 reasons patients go to their PCP

Inspired primarily by https://www.cdc.gov/nchs/data/ahcd/combined_tables/AMC_2009-2010_combined_web_table01.pdf

  • 1. Routine infant/child health check
  • 2. Essential hypertension
  • 3. Diabetes mellitus
  • 4. Normal pregnancy
  • 5. Respiratory infections, including Pharyngitis, Bronchitis, Sinusitis
  • 6. General (adult) medical examination
  • 7. Disorders of lipoid metabolism (see ICD-9 code 272)
  • 8. Otitis media (ear infections)
  • 9. Asthma
  • 10. Urinary tract infections

A few other high-frequency conditions to consider:

  • Derangements + other disorders of joints
  • Attention Deficit Disorder
  • Contact dermatitis/eczema

Observations Feedback

  • Hemoglobin A1c should be reported to only 1 decimal place.

  • Also our lowest possible value for A1c is too low - "incompatible with life", in fact.

  • GFR observations over 60 should be reported as ">60", since the specific number is not accurate or clinically useful if >60.

  • Should be "reams and reams" of lab tests for patients starting dialysis. Patients starting dialysis usually go 3 times per week, with labs drawn before and after a session.

  • End-stage renal failure has inaccurate electrolyte observations; they're way too normal.

  • There are many lab tests done during pregnancy as part of routine care. Apparently there are hundreds, and we're missing all of them.

Appendicitis Encounter Conflict

This module has two encounters that occur in the same iteration in this sequence:

  1. Appendicitis_Encounter (an ED visit)
  2. History_of_Appendectomy (Condition)
  3. Appendectomy_Encounter (an Inpatient encounter)
    ...
  4. End_Appendectomy_Encounter

In my implementation I close the first one when the second occurs. This seems reasonable but wouldn't a better solution be to explicitly close it prior to the condition?

Does Synthea do the same thing?

allergic_rhinitis reason error

The Wiki requires the reason of a Procedure to be: "the name of the ConditionOnset state which represents the reason for procedure. This ConditionOnset must come before the Procedure in the module".

In this module, there are two reason references to "reason": "has_allergic_rhinitis". While there is a state "Has_Allergic_Rhinitis" it is not a ConditionOnset.

Vital Sign Futures?

I notice that there are no instances of the VitalSign state in the current module set. I need to implement a full set of vital signs in order to provide realistic values for the Observations that query them.

Is there a plan to create a module that would set and update the vital signs using this state?

Gout CarePlan Issue

The following error appeared during one of my FHIR validation tests:

RuntimeError: Target encounter Gout_Diagnosis was not processed before state Gout_CarePlan

Since we added the check for concurrent_with_target_encounter it seems we've uncovered a small issue with the Gout module. Should be a quick fix.

Gout CarePlan

Every time a patient has a gout attack he/she gets a new careplan. However, the old careplan from the previous gout attack is never ended.

gout

Vaccines Feedback

  • Vaccines need to be more accurate for the years they were prescribed. Some patients are missing vaccines.

  • Don't administer flu vaccines in the summer months, between June and August, inclusive.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.