Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -115,118 +115,46 @@ SOFTWARE.
|
|
115 |
, language='')
|
116 |
""")
|
117 |
|
118 |
-
|
119 |
-
| π₯ **Letter Type** | π **Definition** | π **Data Fields** |
|
120 |
-
|-----------------------|-----------------------------------------|-----------------------------|
|
121 |
-
| 1οΈβ£ Referral Letters | π€ Letters asking for more help or treatment | π Patient info, Referral details |
|
122 |
-
| 2οΈβ£ Medical Certificate Letters | πΌ Letters about a patient's health problem or limits | π Patient info, Health problem details |
|
123 |
-
| 3οΈβ£ Prescription Letters | π Letters allowing medicine | π Patient info, Medicine details |
|
124 |
-
| 4οΈβ£ Diagnosis Letters | π Letters explaining a patient's health problem | π Patient info, Health problem details |
|
125 |
-
| 5οΈβ£ Treatment Plan Letters | π Letters with a plan for getting better | π Patient info, Treatment details |
|
126 |
-
| 6οΈβ£ Surgery Recommendation Letters | π₯ Letters saying a patient needs surgery | π Patient info, Surgery details |
|
127 |
-
| 7οΈβ£ Medical Clearance Letters | π Letters saying a patient can do activities | π Patient info, Activity details |
|
128 |
-
| 8οΈβ£ Follow-up Appointment Letters | π
Letters reminding about appointments | π Patient info, Appointment details |
|
129 |
-
| 9οΈβ£ Disability Support Letters | βΏ Letters about a patient's disability | π Patient info, Disability details |
|
130 |
-
| π Health Education Letters | π Letters teaching about health | π Patient info, Education topic |
|
131 |
-
""")
|
132 |
-
|
133 |
-
RL="""
|
134 |
-
### π€ Referral Letters
|
135 |
-
| **Referral Letter** | π **First** | π **Middle** | π **Last** |
|
136 |
-
|---------------------|------------------------------------|---------------------------------------|--------------------------------------|
|
137 |
-
| π¨ 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 ποΈ |
|
138 |
-
| | - 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 π |
|
139 |
-
"""
|
140 |
-
|
141 |
-
MCL="""
|
142 |
-
### π Medical Certificate Letters
|
143 |
-
| **Medical Certificate Letter** | π **First** | π **Middle** | π **Last** |
|
144 |
-
|--------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
|
145 |
-
| π¨ 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 π«π |
|
146 |
-
| | - 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 ποΈ |
|
147 |
-
"""
|
148 |
-
|
149 |
-
PL="""
|
150 |
-
### π Prescription Letters
|
151 |
-
| **Prescription Letter** | π **First** | π **Middle** | π **Last** |
|
152 |
-
|-------------------------|------------------------------------|---------------------------------------|--------------------------------------|
|
153 |
-
| π¨ 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 π« |
|
154 |
-
| | - 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 π« |
|
155 |
-
"""
|
156 |
-
|
157 |
-
DL="""
|
158 |
-
### π¬ Diagnosis Letters
|
159 |
-
|
160 |
-
| **Diagnosis Letter** | π **First** | π **Middle** | π **Last** |
|
161 |
-
|----------------------|------------------------------------|---------------------------------------|--------------------------------------|
|
162 |
-
| π¨ 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 π |
|
163 |
-
| | - 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 π©ββοΈ |
|
164 |
-
"""
|
165 |
-
|
166 |
-
TPL="""
|
167 |
-
### π©Ή Treatment Plan Letters
|
168 |
-
| **Treatment Plan Letter** | π **First** | π **Middle** | π **Last** |
|
169 |
-
|---------------------------|------------------------------------|---------------------------------------|--------------------------------------|
|
170 |
-
| π¨ 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 π |
|
171 |
-
| | - 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 βοΈ |
|
172 |
-
"""
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
179 |
-
|
|
180 |
-
""
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
-
MCL2="""
|
183 |
-
### πββοΈ Medical Clearance Letters
|
184 |
-
| **Medical Clearance Letters** | π **First** | π **Middle** | π **Last** |
|
185 |
-
|-------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
|
186 |
-
| π¨ 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 π |
|
187 |
-
| | - 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 π«β€οΈ |
|
188 |
"""
|
189 |
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|-----------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
|
194 |
-
| π¨ 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 βοΈ |
|
195 |
-
| | - 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 βοΈ |
|
196 |
-
"""
|
197 |
|
198 |
-
|
199 |
-
|
200 |
-
| **Disability Support Letters** | π **First** | π **Middle** | π **Last** |
|
201 |
-
|--------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
|
202 |
-
| π¨ 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 π οΈ |
|
203 |
-
| | - 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 π |
|
204 |
-
"""
|
205 |
|
206 |
-
HEL="""
|
207 |
-
### π Health Education Letters
|
208 |
-
| **Health Education Letters** | π **First** | π **Middle** | π **Last** |
|
209 |
-
|------------------------------|---------------------------------|------------------------------------|-----------------------------------|
|
210 |
-
| π 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 π |
|
211 |
-
| | - 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 ποΈ |
|
212 |
-
"""
|
213 |
|
214 |
def generate_letter_menu_ui():
|
215 |
-
|
216 |
st.markdown("""## Generative AI Letters for Managing Information Overload (GAL-MIO) - π₯ Letter Type Selection""")
|
217 |
|
218 |
# Define the letter types and their corresponding markdown sections
|
219 |
letter_types = {
|
220 |
-
"1οΈβ£ Referral Letters":
|
221 |
-
"2οΈβ£ Medical Certificate Letters":
|
222 |
-
"3οΈβ£ Prescription Letters":
|
223 |
-
"4οΈβ£ Diagnosis Letters":
|
224 |
-
"5οΈβ£ Treatment Plan Letters":
|
225 |
-
"6οΈβ£ Surgery Recommendation Letters":
|
226 |
-
"7οΈβ£ Medical Clearance Letters":
|
227 |
-
"8οΈβ£ Follow-up Appointment Letters":
|
228 |
-
"9οΈβ£ Disability Support Letters":
|
229 |
-
"π Health Education Letters":
|
230 |
}
|
231 |
|
232 |
# Create buttons for each letter type
|
@@ -238,6 +166,7 @@ def generate_letter_menu_ui():
|
|
238 |
# Run the Streamlit UI function
|
239 |
generate_letter_menu_ui()
|
240 |
|
|
|
241 |
st.markdown(GALMIO)
|
242 |
|
243 |
|
|
|
115 |
, language='')
|
116 |
""")
|
117 |
|
118 |
+
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
|
120 |
+
GALMIO = """
|
121 |
+
| π¦Έ **Story Type** | π **Synopsis** | π¬ **Movie Poster Quotes** |
|
122 |
+
|-----------------------|-----------------------------------------|-----------------------------|
|
123 |
+
| 1οΈβ£ The Referral Enigma | π€ A group of Mentats join forces to decipher an ancient riddle | "Wit beyond measure, a story to treasure!" π π |
|
124 |
+
| 2οΈβ£ The Certificate Caper | πΌ Mentats unveil a mind-bending mystery with world-shaking consequences | "A thrilling ride with intellects colliding!" π π’ |
|
125 |
+
| 3οΈβ£ The Prescription Puzzlers | π A team of Mentats solves medical conundrums in record time | "A story full of knowledge, without a moment of drudgery!" π
π§ͺ |
|
126 |
+
| 4οΈβ£ Diagnosis Detectives | π Mentats uncover the cause of a baffling epidemic | "Science fiction meets a mastermind investigation!" π π¬ |
|
127 |
+
| 5οΈβ£ The Treatment Team | π A league of Mentats strategizes to save the world from a dire threat | "An action-packed battle of brilliant minds!" π π₯ |
|
128 |
+
| 6οΈβ£ The Surgical Strategists | π₯ Mentats perform high-stakes surgeries to save the day | "A mind-blowing fusion of medical marvels and superhero smarts!" π π©Ί |
|
129 |
+
| 7οΈβ£ The Clearance Crusaders | π Mentats unite to challenge the limits of human potential | "A tale of perseverance, powered by unparalleled intellect!" π π |
|
130 |
+
| 8οΈβ£ The Follow-up Fanatics | π
Mentats devise ingenious solutions to keep history on track | "A mind-twisting journey through time and space!" π π |
|
131 |
+
| 9οΈβ£ The Disability Defenders | βΏ Mentats champion the rights of the disabled in a futuristic utopia | "A heartwarming saga of empathy and enlightenment!" π π |
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
"""
|
134 |
|
135 |
+
def display_superhero_stories():
|
136 |
+
st.title("π Superheroes of the Intellect: Chronicles of the Mentat Minds π")
|
137 |
+
st.markdown(GALMIO)
|
|
|
|
|
|
|
|
|
138 |
|
139 |
+
# Run the Streamlit UI function
|
140 |
+
display_superhero_stories()
|
|
|
|
|
|
|
|
|
|
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
def generate_letter_menu_ui():
|
|
|
144 |
st.markdown("""## Generative AI Letters for Managing Information Overload (GAL-MIO) - π₯ Letter Type Selection""")
|
145 |
|
146 |
# Define the letter types and their corresponding markdown sections
|
147 |
letter_types = {
|
148 |
+
"1οΈβ£ Fascinating Referral Letters": FRL,
|
149 |
+
"2οΈβ£ Enchanted Medical Certificate Letters": EMCL,
|
150 |
+
"3οΈβ£ Bewitching Prescription Letters": BPL,
|
151 |
+
"4οΈβ£ Enigmatic Diagnosis Letters": EDL,
|
152 |
+
"5οΈβ£ Fantastical Treatment Plan Letters": FTPL,
|
153 |
+
"6οΈβ£ Magical Surgery Recommendation Letters": MSRL,
|
154 |
+
"7οΈβ£ Miraculous Medical Clearance Letters": MMCL,
|
155 |
+
"8οΈβ£ Astonishing Follow-up Appointment Letters": AFAL,
|
156 |
+
"9οΈβ£ Extraordinary Disability Support Letters": EDSL,
|
157 |
+
"π Amazing Health Education Letters": AHEL
|
158 |
}
|
159 |
|
160 |
# Create buttons for each letter type
|
|
|
166 |
# Run the Streamlit UI function
|
167 |
generate_letter_menu_ui()
|
168 |
|
169 |
+
|
170 |
st.markdown(GALMIO)
|
171 |
|
172 |
|