awacke1's picture
Update app.py
999ad92
raw
history blame
11.1 kB
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)")
# 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:
"Closing Gaps in Care: How to Improve Quality Scores and Boost Reimbursement" by Becker's Hospital Review - https://www.beckershospitalreview.com/quality/closing-gaps-in-care-how-to-improve-quality-scores-and-boost-reimbursement.html
"Understanding HEDIS Measures: Closing the Gaps in Care" by HealthPayerIntelligence - https://healthpayerintelligence.com/features/understanding-hedis-measures-closing-the-gaps-in-care
"Value-based care: Measuring quality, closing gaps in care" by Medical Economics - https://www.medicaleconomics.com/view/value-based-care-measuring-quality-closing-gaps-care
"Pay for Performance Programs and the Use of Health IT to Improve Quality Reporting and Outcomes" by HealthIT.gov - https://www.healthit.gov/topic/health-it-and-health-information-exchange-basics/pay-performance-programs-and-use-health-it-improve-quality-reporting-and-outcomes
"Quality Payment Program (QPP) Overview" by Centers for Medicare & Medicaid Services - https://qpp.cms.gov/about-qpp/qpp-overview
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.
""")