synthetichealth / synthea

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

Covid19 Missing/Incorrect Reasons #707

Closed jeffeastman closed 4 years ago

jeffeastman commented 4 years ago

There's a glitch in the Admission module's ICU_Oxygen reason which refers to "Select Condition/Enter Attribute". Looks like this is just an incomplete builder field but it throws an error in PatientGen. I'm removing it for now but there likely is a reason for this Procedure that could be filled in.

Another glitch in Intubation reason which refers to "Respiratory Failure" when patient is in Septic Shock but Mild Respiratory Distress. Probably should refer to "Ventilator Reason" instead.

With these fixes in place, I get the following results:

        Total Infected = 10804
            Males = 49.4% of infected
            Females = 50.6% of infected
        Mild Infections = 4.7% of infected
        Non-Mild Infections = 95.3% of infected seek medical attention
            Non-severe Infections = 78.1% outpatients with laboratory-confirmed Covid-19
            Severe Infections = 21.9% hospitalized patients
        Total Tested = 9399
        Current Tested Patients With Comorbidities Impacting Outcomes = 469
            Age[0-9] = 3 (0.6%)
                Cystic Fibrosis condition = 2
                Pertussis condition = 3
            Age[10-19] = 13 (2.8%)
                Cystic Fibrosis condition = 1
                Diabetes Mellitus = 3
                HIV condition = 7
                Hypertension condition = 11
                Pertussis condition = 2
            Age[20-29] = 27 (5.8%)
                Cystic Fibrosis condition = 2
                Diabetes Mellitus = 6
                HIV condition = 30
                Hypertension condition = 19
            Age[30-39] = 19 (4.1%)
                Cardiovascular Disease condition = 1
                Cystic Fibrosis condition = 4
                Diabetes Mellitus = 5
                HIV condition = 9
                Hypertension condition = 11
                Pertussis condition = 2
            Age[40-49] = 64 (13.6%)
                Cardiovascular Disease condition = 2
                Cystic Fibrosis condition = 4
                Diabetes Mellitus = 23
                HIV condition = 11
                Hypertension condition = 110
                Pertussis condition = 2
            Age[50-59] = 118 (25.2%)
                Cardiovascular Disease condition = 1
                Cystic Fibrosis condition = 6
                Diabetes Mellitus = 70
                HIV condition = 8
                Hypertension condition = 226
                Pertussis condition = 3
            Age[60-69] = 115 (24.5%)
                Cardiovascular Disease condition = 1
                Diabetes Mellitus = 49
                HIV condition = 4
                Hypertension condition = 264
                Pertussis condition = 2
            Age[70-79] = 61 (13.0%)
                Cardiovascular Disease condition = 4
                Cystic Fibrosis condition = 1
                Diabetes Mellitus = 35
                HIV condition = 2
                Hypertension condition = 154
                Lung Cancer condition = 2
            Age[80-89] = 36 (7.7%)
                Diabetes Mellitus = 17
                Hypertension condition = 76
            Age[90-99] = 10 (2.1%)
                Cardiovascular Disease condition = 1
                Diabetes Mellitus = 9
                HIV condition = 2
                Hypertension condition = 28
            Age[100-109] = 3 (0.6%)
                Diabetes Mellitus = 2
                Hypertension condition = 3
        Testing Rate = 87.0% (Total Tested / Total Infected)
        Total Deaths = 116
            Age[0-9] = 1.8% of 1169 tested
            Age[10-19] = 0.9% of 1201 tested
            Age[20-29] = 1.6% of 1316 tested
            Age[30-39] = 1.9% of 1200 tested
            Age[40-49] = 0.9% of 1308 tested
            Age[50-59] = 1.1% of 1324 tested
            Age[60-69] = 0.6% of 954 tested
            Age[70-79] = 0.5% of 551 tested
            Age[80-89] = 1.1% of 267 tested
            Age[90-99] = 2.0% of 101 tested
            Age[100-109] = 0.0% of 8 tested
        Observed Mortality Rate = 1.2% of tested
        Actual Mortality Rate = 1.1% of infected
jawalonoski commented 4 years ago

There's a glitch in the ICU_Oxygen reason which refers to "Select Condition/Enter Attribute".

Thanks, fixed. I'll commit that in a short while.

jawalonoski commented 4 years ago

Another glitch in Intubation reason which refers to "Respiratory Failure" when patient is in Septic Shock but Mild Respiratory Distress. Probably should refer to "Ventilator Reason" instead.

Thanks, fixed. I'll commit that in a short while.

jawalonoski commented 4 years ago

Did you change the mortality rates? Because we're seeing much higher death rates (far too high), which I'm actually working on at the moment.

jeffeastman commented 4 years ago

No recent changes in your mortality risks. The percentages are fixed in determine_risk to be 80/20 survival/mortality. Not sure why your modules don't show higher mortality when I run in my framework. Could be a defect in my delayed death implementation. I'll look into that.

My model uses transition tables that factor age & comorbidity risk into the mortality decision. That where you're heading?

jawalonoski commented 4 years ago

I saw a death rate of like 34% of the infected synthetic population, in one analysis of the synthetic data. Which is too high. Above you are showing 1.1% of the infected.

jeffeastman commented 4 years ago

Something's amiss indeed. I thought it was in my Death state but that's not the issue. AFAICT admission module only transitions to "Death" from two states: "Compassionate Care" & "Determine Discharge". I'm looking deeper to see if one of them could be doing something wrong.

jeffeastman commented 4 years ago

Ah ha, your "Death" state doesn't have a condition_onset or referenced_by_attribute so I have no Code for death reason and my framework is looking for that. I'll work around that and update your numbers.

jeffeastman commented 4 years ago

How's this compare with your results?

        Testing Rate = 87.1% (Total Tested / Total Infected)
        Total Deaths = 2937
            Age[0-9] = 27.6% of 1166 tested
            Age[10-19] = 27.2% of 1164 tested
            Age[20-29] = 28.7% of 1352 tested
            Age[30-39] = 26.4% of 1282 tested
            Age[40-49] = 29.4% of 1270 tested
            Age[50-59] = 36.7% of 1298 tested
            Age[60-69] = 38.1% of 914 tested
            Age[70-79] = 40.0% of 565 tested
            Age[80-89] = 34.2% of 307 tested
            Age[90-99] = 43.0% of 93 tested
            Age[100-109] = 42.9% of 7 tested
        Observed Mortality Rate = 31.2% of tested
        Actual Mortality Rate = 27.2% of infected
jeffeastman commented 4 years ago

Digging a little deeper to see why I got any mortality at all, it turns out that the Infection module's Death state does have a condition_onset reference and it's Code is the one I was detecting, so mild cases sent home can die too and that was the source of my low mortality %. (I can only imagine what your brain must be like keeping this all straight ;-)

PriorStates [Death, Wait for Death, End Encounter and Discharge Home, Self Isolation At Home, Diagnosed COVID, Administer COVID-19 Test Positive, End Exposure, End Plan, Wait for Test, Isolation, Severity Assessment, Respiratory Virus Panel Not Detected, Child or Immunocompromised, Apply Face Mask to Patient, Suspected COVID, Acetaminophen, Take Temperature, Terminal, Fever Onset, Fever, Determine Fever, Determine Chills, Joint Pain Onset, Joint Pain, Muscle Pain Onset, Muscle Pain, Determine Myalgia or Arthralgia, Determine Diarrhea, Determine Nausea or Vomiting, Shortness of Breath Onset, Shortness of Breath, Determine Shortness of Breath, Determine Hemoptysis, Determine Fatigue, Sputum Production Onset, Sputum Production, Determine Sputum Production, Determine Sore Throat, Cough Onset, Cough, Determine Cough, Determine Headache, Determine Nasal Congestion, Determine Conjunctival Congestion, Initial, Catalog Symptoms, Encounter for Test, Terminal, Survival: Non-Survivor, Determine Survival, Mild Severity, Determine Severity, Set_High_Risk, Assess_Comorbidities, Initial, Determine Risk, Initial, ]

jeffeastman commented 4 years ago

And finally, when I added "condition_onset": "Diagnosed COVID" to the infection module's Death state I can remove my workaround and get the same results as above. (Whew!)

jawalonoski commented 4 years ago

Should be addressed in covid19 with https://github.com/synthetichealth/synthea/commit/3eb972e39941ad9f120835485f13c028619b22b3

Also, I found a bug in our exporter that was dropping cause of death from being exported a vast majority of the time...