Spaces:
Runtime error
Runtime error
File size: 14,122 Bytes
e3284e4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
import streamlit as st
# Set the page configuration to use the full width of the screen
st.set_page_config(layout="wide")
educationTopics = """
### Education Answers, Keywords and Ideal Answers to Common Questions
| Emoji | Question | Keywords | Ideal Answer |
|-------|----------|----------|--------------|
| π¦ | **Concerns about COVID-19 vaccines and boosters** | Covid, vaccines, boosters | Covid vaccines are developed to protect against the virus. Boosters are given to maintain and enhance protection. [Read More](https://en.wikipedia.org/wiki/COVID-19_vaccine) |
| π· | **Concerns about COVID-19 exposure and precautions** | Covid, exposure, precautions | If you were exposed to Covid-19, follow the guidelines for testing and isolation. [Read More](https://en.wikipedia.org/wiki/COVID-19_pandemic) |
| π₯ | **Queries about specific medical conditions (e.g., scabies, temporal arteritis, hypertension, nonspecific chest pain, etc.)** | Medical conditions, scabies, temporal arteritis, hypertension, chest pain | Medical conditions vary greatly in symptoms and treatment. Always consult with your healthcare provider for advice. [Read More](https://en.wikipedia.org/wiki/List_of_medical_conditions) |
| π | **Questions about shingles and other vaccines** | Shingles, vaccines | Vaccines are key in preventing serious diseases like shingles. Typically, shingles vaccine is given in two doses. [Read More](https://en.wikipedia.org/wiki/Shingles_vaccine) |
| π | **Inquiries about diet, e.g. low sodium for blood pressure issues** | Diet, low sodium, blood pressure | A low-sodium diet can help manage blood pressure. Include plenty of fruits, vegetables, lean proteins, and whole grains. [Read More](https://en.wikipedia.org/wiki/Low-sodium_diet) |
| π | **Questions about medication safety and interactions** | Medication, safety, interactions | Safety and interactions of medications can vary. Always consult your healthcare provider or pharmacist. [Read More](https://en.wikipedia.org/wiki/Drug_interaction) |
| ποΈ | **Inquiries about physical therapy coverage** | Physical therapy, coverage | Physical therapy coverage varies by health plan. It is commonly covered for many conditions. [Read More](https://en.wikipedia.org/wiki/Physical_therapy) |
| π | **Depression screening and mental health concerns** | Depression, mental health | Depression is a serious condition, but help is available. If you are feeling depressed, reach out to a healthcare provider. [Read More](https://en.wikipedia.org/wiki/Depression_(mood)) |
| π° | **Questions about healthcare costs and assistance** | Healthcare, costs, assistance | Many resources are available to help with healthcare costs, including medication copays and other expenses. [Read More](https://en.wikipedia.org/wiki/Health_care_finance_in_the_United_States) |
| π©Ί | **General health inquiries (e.g., seeking care for hemorrhoids, flu shot timing, etc.)** | Health, hemorrhoids, flu shot | For general health inquiries, your primary care physician is often the best place to start. [Read More](https://en.wikipedia.org/wiki/Health_care) |
"""
st.markdown(educationTopics)
GALMIO=("""
| π₯ **Letter Type** | π **Definition** | π **Data Fields** |
|-----------------------|-----------------------------------------|-----------------------------|
| 1οΈβ£ Referral Letters | π€ Letters asking for more help or treatment | π Patient info, Referral details |
| 2οΈβ£ Medical Certificate Letters | πΌ Letters about a patient's health problem or limits | π Patient info, Health problem details |
| 3οΈβ£ Prescription Letters | π Letters allowing medicine | π Patient info, Medicine details |
| 4οΈβ£ Diagnosis Letters | π Letters explaining a patient's health problem | π Patient info, Health problem details |
| 5οΈβ£ Treatment Plan Letters | π Letters with a plan for getting better | π Patient info, Treatment details |
| 6οΈβ£ Surgery Recommendation Letters | π₯ Letters saying a patient needs surgery | π Patient info, Surgery details |
| 7οΈβ£ Medical Clearance Letters | π Letters saying a patient can do activities | π Patient info, Activity details |
| 8οΈβ£ Follow-up Appointment Letters | π
Letters reminding about appointments | π Patient info, Appointment details |
| 9οΈβ£ Disability Support Letters | βΏ Letters about a patient's disability | π Patient info, Disability details |
| π Health Education Letters | π Letters teaching about health | π Patient info, Education topic |
""")
RL="""
### π€ Referral Letters
| **Referral Letter** | π **First** | π **Middle** | π **Last** |
|---------------------|------------------------------------|---------------------------------------|--------------------------------------|
| π¨ State the request for consultation/treatment | - Urgent need for further diagnostic testing for Mrs. Smith, who has persistent stomach issues π€’ | - The patient has symptoms that suggest a more comprehensive review is required π | - Patient demographics, Referral details ποΈ |
| | - Request for an audiological assessment for Mr. Johnson, aged 60 π | - The patient's issue requires specialized care beyond the scope of the referring physician π©ββοΈ | - Diagnostic test reports, Medication details π |
"""
MCL="""
### π Medical Certificate Letters
| **Medical Certificate Letter** | π **First** | π **Middle** | π **Last** |
|--------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
| π¨ State the reason for certification | - To certify Mr. Brown's condition and advise on work restrictions πΌ | - Mr. Brown has suffered from a heart attack and is under medication ππ | - No driving should be allowed for 6 months π«π |
| | - To certify Ms. Lee's health status for her impending travel βοΈ | - Ms. Lee has a chronic back pain condition that requires special accommodations during her travel πΆββοΈ | - Ms. Lee must have an aisle seat and use cushions for lumbar support ποΈ |
"""
PL="""
### π Prescription Letters
| **Prescription Letter** | π **First** | π **Middle** | π **Last** |
|-------------------------|------------------------------------|---------------------------------------|--------------------------------------|
| π¨ Introduce prescription request | - Request for prescription for Mr. Clarke π | - Mr. Clarke requires medication for hypertension - Lisinopril 10mg BD with food π©Ί | - Medication details, allergies and any known side effects π« |
| | - Prescription authorization for Mrs. Davis π | - Mrs. Davis is required to take two 500mg penicillin V tablets every 6 hours π©Ί | - Medication details, allergies and any known side effects π« |
"""
DL="""
### π¬ Diagnosis Letters
| **Diagnosis Letter** | π **First** | π **Middle** | π **Last** |
|----------------------|------------------------------------|---------------------------------------|--------------------------------------|
| π¨ State the diagnosis | - The results of Mr. Thompson's chest x-ray reveal Pneumonia π· | - Mr. Thompson has a bacterial infection that requires antibiotic treatment π | - Recommend follow-up visits for monitoring and periodic testing π |
| | - The blood test results indicate that Mrs. Jones has Type 2 diabetes π©Έ | - Mrs. Jones has a lifelong condition that requires medication, dietary adjustments, and lifestyle changes π½οΈπββοΈ | - Refer patients to the relevant healthcare specialist π©ββοΈ |
"""
TPL="""
### π©Ή Treatment Plan Letters
| **Treatment Plan Letter** | π **First** | π **Middle** | π **Last** |
|---------------------------|------------------------------------|---------------------------------------|--------------------------------------|
| π¨ Introduce treatment plan | - Outline treatment and testing plan for Mr. Smith π | - Mr. Smith's treatment will involve IV medication and chest x-ray ππΈ | - Recommend follow-up visits for monitoring and periodic testing π |
| | - Suggest handling chronic asthma for Mrs. White π | - Mrs. White's asthma management plan requires frequent use of recommended inhaler and daily monitoring π¬οΈπ | - Provide contact information in case of any emergencies βοΈ |
"""
SRL="""
### π₯ Surgery Recommendation Letters
| **Surgery Recommendation Letter** | π **First** | π **Middle** | π **Last** |
|-----------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
| π¨ Introduce surgical procedure | - Recommend endoscopy procedure for Mr. Baker π¬ | - Mr. Baker needs endoscopy for the diagnosis of GI tract abnormalities π« | - Suggest to take extra measures regarding allergies or post-procedural appointments π«βοΈ |
| | - Recommend an angiography for Mrs. Taylor π | - Mrs. Taylor needs angiography to locate any arterial blockages π©Ί | - Provide details on necessary pre and post-hospitalization guidance π₯ |
"""
MCL2="""
### πββοΈ Medical Clearance Letters
| **Medical Clearance Letters** | π **First** | π **Middle** | π **Last** |
|-------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
| π¨ State clearance conditions | - Allow Mrs. Anderson to safely participate in a marathon πββοΈ | - The patient has been tested and has no chronic medical conditions or injuries π«π©Ί | - Encourage gradual progression and cautious approach to intense activity π |
| | - Clear Mr. White to begin strength training πͺ | - The patient's prior conditions are monitored, and it is advised to begin any physical activity or routine ποΈββοΈ | - List exercises that should be avoided, for instance, weightlifting for an individual with a heart condition π«β€οΈ |
"""
FAL="""
### π
Follow-up Appointment Letters
| **Follow-up Appointment Letters** | π **First** | π **Middle** | π **Last** |
|-----------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
| π¨ Remind of the appointment | - This is a reminder for Mrs. Rodriguez's appointment on Friday, 17th September, at 11:00 am π | - Review the date, time, and location of appointment π | - Provide contact information and phone numbers in case of schedule change or emergency βοΈ |
| | - This letter is to confirm Mr. Johnson's appointment on Monday, 20th September, at 1:00 pm π | - Detail any necessary preparations for the appointment βοΈ | - Encourage to reach out if an appointment must be canceled, or if there are any questions or concerns βοΈ |
"""
DSL="""
### βΏ Disability Support Letters
| **Disability Support Letters** | π **First** | π **Middle** | π **Last** |
|--------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
| π¨ State the purpose of the letter | - The purpose of this letter is to validate Mr. Williams' disability so that he can receive disability benefits βΏ | - Detail the patient's physical or cognitive condition and how it affects their daily life π§ | - Outline the assistive equipment or technology necessary for the patient π οΈ |
| | - The purpose of this letter is to document Ms. Radcliff's disability to request special accommodations at work βΏ | - Explain the cause of the patient's condition and duration of symptoms β³ | - Describe the special consideration or modifications required π |
"""
HEL="""
### π Health Education Letters
| **Health Education Letters** | π **First** | π **Middle** | π **Last** |
|------------------------------|---------------------------------|------------------------------------|-----------------------------------|
| π Introduce the health education topic | - This letter is to provide Ms. Prince with information on healthy eating habits π₯ | - Outline the benefits of specific health practices for overall health π | - Provide handouts, online resources, or any relevant materials to supplement the information π |
| | - This letter offers suggestions for stress management to Mr. Martin π | - Detail steps that can be taken to manage specific health conditions properly πΆββοΈ | - Encourage patients to schedule follow-up appointments to discuss any questions or concerns ποΈ |
"""
def generate_letter_menu_ui():
st.markdown("""## Generative AI Letters for Managing Information Overload (GAL-MIO) - π₯ Letter Type Selection""")
# Define the letter types and their corresponding markdown sections
letter_types = {
"1οΈβ£ Referral Letters": RL,
"2οΈβ£ Medical Certificate Letters": MCL,
"3οΈβ£ Prescription Letters": PL,
"4οΈβ£ Diagnosis Letters": DL,
"5οΈβ£ Treatment Plan Letters": TPL,
"6οΈβ£ Surgery Recommendation Letters": SRL,
"7οΈβ£ Medical Clearance Letters": MCL2,
"8οΈβ£ Follow-up Appointment Letters": FAL,
"9οΈβ£ Disability Support Letters": DSL,
"π Health Education Letters": HEL
}
# Create buttons for each letter type
for letter_type, section in letter_types.items():
if st.button(letter_type):
# Display the selected section of the markdown content
st.markdown(section, unsafe_allow_html=True)
# Run the Streamlit UI function
generate_letter_menu_ui()
st.markdown(GALMIO)
|