awacke1 commited on
Commit
e6bde6b
Β·
1 Parent(s): ef85d9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -100
app.py CHANGED
@@ -115,118 +115,46 @@ SOFTWARE.
115
  , language='')
116
  """)
117
 
118
- GALMIO=("""
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
- SRL="""
175
- ### πŸ₯ Surgery Recommendation Letters
176
- | **Surgery Recommendation Letter** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
177
- |-----------------------------------|------------------------------------|---------------------------------------|--------------------------------------|
178
- | πŸ“¨ 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 πŸš«βš•οΈ |
179
- | | - Recommend an angiography for Mrs. Taylor πŸ’“ | - Mrs. Taylor needs angiography to locate any arterial blockages 🩺 | - Provide details on necessary pre and post-hospitalization guidance πŸ₯ |
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
- FAL="""
191
- ### πŸ“… Follow-up Appointment Letters
192
- | **Follow-up Appointment Letters** | πŸ“ **First** | πŸ“ **Middle** | πŸ“ **Last** |
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
- DSL="""
199
- ### β™Ώ Disability Support Letters
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": RL,
221
- "2️⃣ Medical Certificate Letters": MCL,
222
- "3️⃣ Prescription Letters": PL,
223
- "4️⃣ Diagnosis Letters": DL,
224
- "5️⃣ Treatment Plan Letters": TPL,
225
- "6️⃣ Surgery Recommendation Letters": SRL,
226
- "7️⃣ Medical Clearance Letters": MCL2,
227
- "8️⃣ Follow-up Appointment Letters": FAL,
228
- "9️⃣ Disability Support Letters": DSL,
229
- "πŸ”Ÿ Health Education Letters": HEL
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