Spaces:
Runtime error
Runtime error
import streamlit as st | |
import pandas as pd | |
import random | |
import plotly.graph_objects as go | |
import plotly.express as px | |
def health_game(): | |
# Define the states and conditions of interest | |
states = ["Minnesota", "Florida", "California"] | |
top_n = 10 | |
# Define the list dictionary of top 10 health conditions descending by cost, with emojis, treatment recommendation and potential savings | |
health_conditions = [ | |
{"condition": "๐ Heart disease", "emoji": "๐", "spending": 214.3, "treatment": "Regular checkups with a cardiologist", "savings": "$1000"}, | |
{"condition": "๐ค Trauma-related disorders", "emoji": "๐", "spending": 198.6, "treatment": "Counseling and physical therapy", "savings": "$500"}, | |
{"condition": "๐ฆ Cancer", "emoji": "๐๏ธ", "spending": 171.0, "treatment": "Early detection and treatment", "savings": "$2000"}, | |
{"condition": "๐ง Mental disorders", "emoji": "๐ง", "spending": 150.8, "treatment": "Therapy and medication", "savings": "$1500"}, | |
{"condition": "๐ฆด Osteoarthritis and joint disorders", "emoji": "๐ฅ", "spending": 142.4, "treatment": "Low-impact exercise and physical therapy", "savings": "$800"}, | |
{"condition": "๐ Diabetes", "emoji": "๐ฉธ", "spending": 107.4, "treatment": "Regular checkups and medication", "savings": "$1200"}, | |
{"condition": "๐ฎโ๐จ Chronic obstructive pulmonary disease and asthma", "emoji": "๐ฎโ๐จ", "spending": 91.0, "treatment": "Inhalers and breathing exercises", "savings": "$600"}, | |
{"condition": "๐ฉบ Hypertension", "emoji": "๐", "spending": 83.9, "treatment": "Lifestyle changes and medication", "savings": "$900"}, | |
{"condition": "๐ฌ Hyperlipidemia", "emoji": "๐ฌ", "spending": 83.9, "treatment": "Lifestyle changes and medication", "savings": "$700"}, | |
{"condition": "๐ฆด Back problems", "emoji": "๐ง", "spending": 67.0, "treatment": "Physical therapy and exercise", "savings": "$400"} | |
] | |
# Create a DataFrame from the list dictionary | |
df_top_conditions = pd.DataFrame(health_conditions) | |
# Calculate the total spending | |
total_spending = round(df_top_conditions["spending"].sum(), 1) | |
# Define the roll function | |
def roll(): | |
rolls = [random.randint(1, 10) for _ in range(1000)] | |
frequencies = [rolls.count(i) for i in range(1, 11)] | |
return frequencies | |
# Define the sunburst chart | |
fig_sunburst = go.Figure(go.Sunburst( | |
labels=df_top_conditions["emoji"] + " " + df_top_conditions["condition"], | |
parents=[""] * top_n, | |
values=df_top_conditions["spending"], | |
maxdepth=2 | |
)) | |
# Customize the layout of the sunburst chart | |
#fig_sunburst.update_layout(title=f"Top {top_n} Health Conditions in {', '.join(states)} by Spending (Total: ${total_spending}B)") | |
fig_sunburst.update_layout(title=f"Top {top_n} Health Conditions by Spending (Total: ${total_spending}B)") | |
# Display the sunburst chart and variants per condition in the Streamlit app | |
st.plotly_chart(fig_sunburst) | |
condition_idx = st.selectbox("Select your current health condition", df_top_conditions.index) | |
row = df_top_conditions.loc[condition_idx] | |
st.write(f"Based on the severity of your {row['condition']}, we recommend {row['treatment']} for early treatment. This could save you up to {row['savings']} in healthcare costs.") | |
frequencies = roll() | |
fig_bar = px.bar(x=[f"Variant {i}" for i in range(1, 11)], y=frequencies[:10], labels={'x': 'Variant', 'y': 'Frequency'}) | |
fig_bar.update_layout(title=f"Variants of {row['condition']} ({row['emoji']})") | |
st.plotly_chart(fig_bar) | |
health_game() | |
import streamlit as st | |
health_conditions = [ | |
{ | |
"name": "Diabetes", | |
"patient_population": "๐ฅ Patients with diabetes", | |
"icd10_code_range": "๐ E08 - E13", | |
"gap_identification": "๐ Identifying patients with HbA1c levels > 9%, patients who have not received eye exams, and patients who have not received nephropathy screening.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate interventions, such as regular HbA1c testing, eye exams, and nephropathy screening." | |
}, | |
{ | |
"name": "Cardiovascular Disease", | |
"patient_population": "๐ฅ Patients with cardiovascular disease", | |
"icd10_code_range": "๐ I20 - I25", | |
"gap_identification": "๐ Identifying patients who have not received appropriate medication therapy, patients who have not received lipid profile screening, and patients who have not received blood pressure control.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate interventions, such as medication therapy, lipid profile screening, and blood pressure control." | |
}, | |
{ | |
"name": "Asthma", | |
"patient_population": "๐ฅ Patients with asthma", | |
"icd10_code_range": "๐ J45", | |
"gap_identification": "๐ Identifying patients who have not received appropriate medication therapy, patients who have not received asthma action plans, and patients who have not received follow-up care after hospitalization.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate interventions, such as medication therapy, asthma action plans, and follow-up care after hospitalization." | |
}, | |
{ | |
"name": "Behavioral Health", | |
"patient_population": "๐ฅ Patients with behavioral health conditions", | |
"icd10_code_range": "๐ F00 - F99", | |
"gap_identification": "๐ Identifying patients who have not received appropriate medication therapy, patients who have not received appropriate counseling, and patients who have not received follow-up care after hospitalization.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate interventions, such as medication therapy, counseling, and follow-up care after hospitalization." | |
}, | |
{ | |
"name": "Cancer Screening", | |
"patient_population": "๐ฅ Patients eligible for cancer screening", | |
"icd10_code_range": "๐ C00 - D48", | |
"gap_identification": "๐ Identifying patients who have not received appropriate cancer screening tests, such as mammograms, colonoscopies, and cervical cancer screening.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate cancer screening tests." | |
}, | |
{ | |
"name": "Immunizations", | |
"patient_population": "๐ฅ Patients eligible for immunizations", | |
"icd10_code_range": "๐ Z23", | |
"gap_identification": "๐ Identifying patients who have not received appropriate immunizations, such as flu shots, pneumococcal vaccines, and HPV vaccines.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate immunizations." | |
}, | |
{ | |
"name": "Maternity Care", | |
"patient_population": "๐ฅ Pregnant patients", | |
"icd10_code_range": "๐ O00 - O99", | |
"gap_identification": "๐ Identifying patients who have not received appropriate prenatal care, patients who have not received postpartum care, and patients who have not received appropriate screenings.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate prenatal care, postpartum care, and screenings." | |
}, | |
{ | |
"name": "Osteoporosis", | |
"patient_population": "๐ฅ Patients with osteoporosis", | |
"icd10_code_range": "๐ M80 - M82", | |
"gap_identification": "๐ Identifying patients who have not received appropriate medication therapy, patients who have not received bone density testing, and patients who have not received appropriate follow-up care.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate interventions, such as medication therapy, bone density testing, and follow-up care." | |
}, | |
{ | |
"name": "Chronic Kidney Disease", | |
"patient_population": "๐ฅ Patients with chronic kidney disease", | |
"icd10_code_range": "๐ N18", | |
"gap_identification": "๐ Identifying patients who have not received appropriate medication therapy, patients who have not received appropriate monitoring, and patients who have not received appropriate follow-up care.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate interventions, such as medication therapy, monitoring, and follow-up care." | |
}, | |
{ | |
"name": "Depression", | |
"patient_population": "๐ฅ Patients with depression", | |
"icd10_code_range": "๐ F32 - F33", | |
"gap_identification": "๐ Identifying patients who have not received appropriate medication therapy, patients who have not received appropriate counseling, and patients who have not received appropriate follow-up care.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate interventions, such as medication therapy, counseling, and follow-up care." | |
}, | |
{ | |
"name": "Attention Deficit Hyperactivity Disorder (ADHD)", | |
"patient_population": "๐ฅ Patients with ADHD", | |
"icd10_code_range": "๐ F90", | |
"gap_identification": "๐ Identifying patients who have not received appropriate medication therapy, patients who have not received appropriate counseling, and patients who have not received appropriate follow-up care.", | |
"gap_closure_process": "๐ ๏ธ Providing timely and appropriate interventions, such as medication therapy, counseling, and follow-up care." | |
} | |
] | |
st.title("HEDIS Gap Closure Process for Top 10 Health Conditions") | |
for condition in health_conditions: | |
st.header(f"{condition['name']}") | |
st.markdown(f"{condition['patient_population']}") | |
st.markdown(f"{condition['icd10_code_range']}") | |
st.markdown(f"{condition['gap_identification']}") | |
st.markdown(f"{condition['gap_closure_process']}") | |
st.markdown(""" | |
# References on gap closure and reporting for value-based care: | |
These resources provide information and guidance on how to close gaps in care, improve quality scores, and report on quality measures to receive compensation in value-based care. They also discuss the use of health information technology and pay for performance programs to improve quality reporting and outcomes. | |
1. "Closing Gaps in Care: How to Improve Quality Scores and Boost Reimbursement" by Becker's Hospital Review - https://www.beckershospitalreview.com/close-care-documentation-gaps-expert-tips-for-better-quality-reporting.html | |
2. "Closing Gaps in Care with Advanced Interoperability Capabilities" by HealthPayerIntelligence - https://healthpayerintelligence.com/news/closing-gaps-in-care-with-advanced-interoperability-capabilities | |
3. https://www.healthit.gov/topic/federal-incentive-programs/MACRA/MIPS/quality-measures-reporting | |
4. https://www.ama-assn.org/practice-management/medicare-medicaid/quality-payment-program-qpp-specifics#:~:text=The%20QPP%20was%20created%20by,Incentive%20Payment%20System%20(MIPS). | |
5. https://qpp.cms.gov/about/qpp-overview | |
""") | |
st.markdown(""" | |
# Top 20 HEDIS Gap Closure Evidence | |
Below is a list of the top 20 HEDIS gap closure evidence, along with the corresponding clinical codes that best represent the evidence submitted to show the gap is closed. | |
1. Childhood Immunization: % of children immunized by age two ๐ง๐ | Clinical Code: ICD10 Z28.2 | |
2. Breast Cancer Screening: % of women with mammogram in past 2 yrs ๐ฉบ๐ | Clinical Code: CPT 77067 | |
3. Colorectal Cancer Screening: % of adults screened for colorectal cancer ๐ฉบ๐ฉ | Clinical Code: CPT 82274 | |
4. Comprehensive Diabetes Care: % of diabetic patients who had all recommended tests ๐ฉบ๐ฉน | Clinical Code: LOINC 4548-4 | |
5. Controlling High Blood Pressure: % of patients with controlled blood pressure ๐ฉบ๐ | Clinical Code: ICD10 I10 | |
6. Medication Management for Asthma: % of asthma patients with proper meds ๐๐ฌ๏ธ | Clinical Code: SNOMED 195967001 | |
7. Follow-up After Mental Illness Hospitalization: % of patients with follow-up care ๐ฉบ๐ฅ | Clinical Code: HCPCS G0181 | |
8. Prenatal & Postpartum Care: % of pregnant women with proper care ๐คฐ๐ฉบ | Clinical Code: ICD10 Z34 | |
9. Comprehensive Eye Exam: % of diabetic patients with eye exam ๐ฉบ๐ | Clinical Code: CPT 92014 | |
10. Childhood Weight Assessment: % of children with BMI assessment ๐ง๐ | Clinical Code: ICD10 Z00.121 | |
11. Chlamydia Screening in Women: % of sexually active women screened ๐ฉบ๐ฉ | Clinical Code: CPT 87491 | |
12. Avoidance of Antibiotic Treatment for Acute Bronchitis: % of patients without antibiotics ๐ฉบ๐ | Clinical Code: ICD10 J20.9 | |
13. Osteoporosis Management in Women: % of women with bone density test ๐ฉบ๐ช | Clinical Code: CPT 77080 | |
14. Use of High-Risk Medications in the Elderly: % of elderly with safe meds ๐๐ด๐ต | Clinical Code: HCPCS G9612 | |
15. Diabetes Screening for Schizophrenia or Bipolar Disorder: % of patients with mental illness screened ๐ง ๐ฉบ | Clinical Code: SNOMED 169609005 | |
16. All-Cause Readmissions: % of patients readmitted within 30 days ๐ฉบ๐ฅ | Clinical Code: ICD10 Z51.5 | |
17. Antidepressant Medication Management: % of depressed patients with proper meds & follow-up ๐ฉบ๐ง | Clinical Code: CPT 96127 | |
18. Follow-up Care for Children Prescribed ADHD Medication: % of children with follow-up care ๐ฉบ๐ง | Clinical Code: ICD10 F90 | |
19. Imaging Studies for Low Back Pain: % of patients without imaging studies ๐ฉบ๐ | Clinical Code: ICD10 M54.5 | |
20. Spirometry Testing for COPD: % of COPD patients with spirometry testing ๐ฉบ๐ซ | Clinical Code: CPT 94010 | |
""") | |
st.markdown(""" | |
ICD10 Code Categories for ICD10 Diagnosis used in ADT, Health Service Cases, and Claims : | |
๐ A, B: Infectious and parasitic diseases | |
๐งฌ C, D0-D4: Neoplasms (tumors) | |
๐ D5-D9: Blood disorders and immune system diseases | |
๐ฝ๏ธ E: Endocrine, nutritional, and metabolic diseases | |
๐ง F: Mental, behavioral, and neurodevelopmental disorders | |
๐ง G: Diseases of the nervous system | |
๐๏ธ H0-H5: Eye and adnexa (accessory organs) diseases | |
๐ H6-H9: Ear and mastoid process diseases | |
โค๏ธ I: Circulatory system diseases | |
๐จ J: Respiratory system diseases | |
๐ฝ๏ธ K: Digestive system diseases | |
๐ฆต L: Skin and subcutaneous tissue diseases | |
๐ช M: Musculoskeletal and connective tissue diseases | |
๐ N: Genitourinary system diseases | |
๐ถ O: Pregnancy, childbirth, and the puerperium (postpartum) issues | |
๐ถ P: Perinatal (before and after birth) conditions | |
๐ถ Q: Congenital (present at birth) malformations and deformations | |
๐ค R: Symptoms, signs, and abnormal clinical and laboratory findings | |
๐ค S, T: Injury, poisoning, and other consequences of external causes | |
๐ฅ U: Special-purpose codes | |
๐ V, W, Y: External causes of morbidity and mortality | |
๐งฌ Z: Factors influencing health status and contact with health services | |
""") |