awacke1 commited on
Commit
e3284e4
Β·
1 Parent(s): 790aea3

Create backupapp.py

Browse files
Files changed (1) hide show
  1. backupapp.py +150 -0
backupapp.py ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # Set the page configuration to use the full width of the screen
4
+ st.set_page_config(layout="wide")
5
+
6
+ educationTopics = """
7
+
8
+ ### Education Answers, Keywords and Ideal Answers to Common Questions
9
+
10
+ | Emoji | Question | Keywords | Ideal Answer |
11
+ |-------|----------|----------|--------------|
12
+ | 🦠 | **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) |
13
+ | 😷 | **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) |
14
+ | πŸ₯ | **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) |
15
+ | πŸ’‰ | **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) |
16
+ | 🍎 | **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) |
17
+ | πŸ’Š | **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) |
18
+ | πŸ‹οΈ | **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) |
19
+ | πŸ˜” | **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)) |
20
+ | πŸ’° | **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) |
21
+ | 🩺 | **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) |
22
+
23
+ """
24
+ st.markdown(educationTopics)
25
+
26
+ GALMIO=("""
27
+ | πŸ₯ **Letter Type** | πŸ“ **Definition** | πŸ“‹ **Data Fields** |
28
+ |-----------------------|-----------------------------------------|-----------------------------|
29
+ | 1️⃣ Referral Letters | 🀝 Letters asking for more help or treatment | πŸ“„ Patient info, Referral details |
30
+ | 2️⃣ Medical Certificate Letters | πŸ’Ό Letters about a patient's health problem or limits | πŸ“„ Patient info, Health problem details |
31
+ | 3️⃣ Prescription Letters | πŸ’Š Letters allowing medicine | πŸ“„ Patient info, Medicine details |
32
+ | 4️⃣ Diagnosis Letters | πŸ”Ž Letters explaining a patient's health problem | πŸ“„ Patient info, Health problem details |
33
+ | 5️⃣ Treatment Plan Letters | πŸš‘ Letters with a plan for getting better | πŸ“„ Patient info, Treatment details |
34
+ | 6️⃣ Surgery Recommendation Letters | πŸ₯ Letters saying a patient needs surgery | πŸ“„ Patient info, Surgery details |
35
+ | 7️⃣ Medical Clearance Letters | πŸƒ Letters saying a patient can do activities | πŸ“„ Patient info, Activity details |
36
+ | 8️⃣ Follow-up Appointment Letters | πŸ“… Letters reminding about appointments | πŸ“„ Patient info, Appointment details |
37
+ | 9️⃣ Disability Support Letters | β™Ώ Letters about a patient's disability | πŸ“„ Patient info, Disability details |
38
+ | πŸ”Ÿ Health Education Letters | 🍎 Letters teaching about health | πŸ“„ Patient info, Education topic |
39
+ """)
40
+
41
+ RL="""
42
+ ### 🀝 Referral Letters
43
+ | **Referral Letter** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
44
+ |---------------------|------------------------------------|---------------------------------------|--------------------------------------|
45
+ | πŸ“¨ 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 πŸ—‚οΈ |
46
+ | | - 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 πŸ’Š |
47
+ """
48
+
49
+ MCL="""
50
+ ### πŸ“œ Medical Certificate Letters
51
+ | **Medical Certificate Letter** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
52
+ |--------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
53
+ | πŸ“¨ 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 πŸš«πŸš— |
54
+ | | - 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 πŸ›‹οΈ |
55
+ """
56
+
57
+ PL="""
58
+ ### πŸ’Š Prescription Letters
59
+ | **Prescription Letter** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
60
+ |-------------------------|------------------------------------|---------------------------------------|--------------------------------------|
61
+ | πŸ“¨ 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 🚫 |
62
+ | | - 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 🚫 |
63
+ """
64
+
65
+ DL="""
66
+ ### πŸ”¬ Diagnosis Letters
67
+
68
+ | **Diagnosis Letter** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
69
+ |----------------------|------------------------------------|---------------------------------------|--------------------------------------|
70
+ | πŸ“¨ 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 πŸ“† |
71
+ | | - 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 πŸ‘©β€βš•οΈ |
72
+ """
73
+
74
+ TPL="""
75
+ ### 🩹 Treatment Plan Letters
76
+ | **Treatment Plan Letter** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
77
+ |---------------------------|------------------------------------|---------------------------------------|--------------------------------------|
78
+ | πŸ“¨ 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 πŸ“† |
79
+ | | - 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 ☎️ |
80
+ """
81
+
82
+ SRL="""
83
+ ### πŸ₯ Surgery Recommendation Letters
84
+ | **Surgery Recommendation Letter** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
85
+ |-----------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
86
+ | πŸ“¨ 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 πŸš«βš•οΈ |
87
+ | | - Recommend an angiography for Mrs. Taylor πŸ’“ | - Mrs. Taylor needs angiography to locate any arterial blockages 🩺 | - Provide details on necessary pre and post-hospitalization guidance πŸ₯ |
88
+ """
89
+
90
+ MCL2="""
91
+ ### πŸƒβ€β™‚οΈ Medical Clearance Letters
92
+ | **Medical Clearance Letters** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
93
+ |-------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
94
+ | πŸ“¨ 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 πŸ“ˆ |
95
+ | | - 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 🚫❀️ |
96
+ """
97
+
98
+ FAL="""
99
+ ### πŸ“… Follow-up Appointment Letters
100
+ | **Follow-up Appointment Letters** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
101
+ |-----------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
102
+ | πŸ“¨ 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 ☎️ |
103
+ | | - 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 βœ‰οΈ |
104
+ """
105
+
106
+ DSL="""
107
+ ### β™Ώ Disability Support Letters
108
+ | **Disability Support Letters** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
109
+ |--------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
110
+ | πŸ“¨ 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 πŸ› οΈ |
111
+ | | - 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 πŸ“ |
112
+ """
113
+
114
+ HEL="""
115
+ ### 🍎 Health Education Letters
116
+ | **Health Education Letters** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
117
+ |------------------------------|---------------------------------|------------------------------------|-----------------------------------|
118
+ | 🍎 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 πŸ“š |
119
+ | | - 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 πŸ—“οΈ |
120
+ """
121
+
122
+ def generate_letter_menu_ui():
123
+
124
+ st.markdown("""## Generative AI Letters for Managing Information Overload (GAL-MIO) - πŸ₯ Letter Type Selection""")
125
+
126
+ # Define the letter types and their corresponding markdown sections
127
+ letter_types = {
128
+ "1️⃣ Referral Letters": RL,
129
+ "2️⃣ Medical Certificate Letters": MCL,
130
+ "3️⃣ Prescription Letters": PL,
131
+ "4️⃣ Diagnosis Letters": DL,
132
+ "5️⃣ Treatment Plan Letters": TPL,
133
+ "6️⃣ Surgery Recommendation Letters": SRL,
134
+ "7️⃣ Medical Clearance Letters": MCL2,
135
+ "8️⃣ Follow-up Appointment Letters": FAL,
136
+ "9️⃣ Disability Support Letters": DSL,
137
+ "πŸ”Ÿ Health Education Letters": HEL
138
+ }
139
+
140
+ # Create buttons for each letter type
141
+ for letter_type, section in letter_types.items():
142
+ if st.button(letter_type):
143
+ # Display the selected section of the markdown content
144
+ st.markdown(section, unsafe_allow_html=True)
145
+
146
+ # Run the Streamlit UI function
147
+ generate_letter_menu_ui()
148
+
149
+ st.markdown(GALMIO)
150
+