Spaces:
Sleeping
Sleeping
feat: Enhance predefined patient profile names with emojis and more descriptive text.
Browse files496 unmodified lines4974984995005015025035045055065075085095105115125135145155165175185192253 unmodified lines27732774277527762777277827792 unmodified lines278227832784278527862787278838 unmodified lines282728282829283028312832283320 unmodified lines28542855285628572858285928602 unmodified lines28632864286528662867286828692 unmodified lines28722873287428752876287728782 unmodified lines28812882288328842885288628872 unmodified lines28902891289228932894289528962 unmodified lines28992900290129022903290429054 unmodified lines2910291129122913291429152916496 unmodified linesgr.Markdown("### π Predefined Profiles")profile_selector = gr.Dropdown(choices=["Default (Serhii)","π’ GREEN - Healthy","π‘ YELLOW - Mild Distress","π‘ YELLOW - Grief & Loss","π‘ YELLOW - Existential Questions","π‘ YELLOW - Spiritual Disconnection","π΄ RED - Crisis (Suicidal)","π΄ RED - Severe Hopelessness","π΄ RED - Spiritual Crisis","Cardiac Patient","Diabetic Patient","Post-Surgery Recovery","Mental Health Focus","Elderly Patient","Athletic Patient"],value="Default (Serhii)",label="Select Profile",interactive=True)2253 unmodified linesdef load_profile(profile_name: str, session: SimplifiedSessionData):"""Load predefined patient profile and apply it to the session."""profiles = {"Default (Serhii)": {"name": "Serhii","phone": "(555) 123-4567","age": 52,2 unmodified lines"exercise": "Swimming, Walking, Light cardio","limitations": "Anticoagulation therapy, Post-thrombotic recovery"},"π’ GREEN - Healthy": {"name": "James","phone": "(555) 234-5678","age": 40,38 unmodified lines"exercise": "Walking, Community activities","limitations": "Spiritual disconnection, Social isolation"},"π΄ RED - Crisis (Suicidal)": {"name": "Thomas","phone": "(555) 789-0123","age": 35,20 unmodified lines"exercise": "None - Spiritual support priority","limitations": "CRISIS - Spiritual crisis, Rage, Existential despair"},"Cardiac Patient": {"name": "John","phone": "(555) 012-3456","age": 65,2 unmodified lines"exercise": "Supervised walking, Cardiac rehab program","limitations": "Recent MI, Limited exertion tolerance"},"Diabetic Patient": {"name": "Maria","phone": "(555) 111-2222","age": 58,2 unmodified lines"exercise": "Moderate walking, Resistance training","limitations": "Neuropathy, Retinopathy risk"},"Post-Surgery Recovery": {"name": "Alex","phone": "(555) 222-3333","age": 45,2 unmodified lines"exercise": "Gentle mobility, Gradual progression","limitations": "Surgical site healing, Limited ROM"},"Mental Health Focus": {"name": "Emma","phone": "(555) 333-4444","age": 35,2 unmodified lines"exercise": "Yoga, Walking, Group activities","limitations": "Low motivation, Energy fluctuations"},"Elderly Patient": {"name": "Robert","phone": "(555) 444-5555","age": 78,2 unmodified lines"exercise": "Tai Chi, Water aerobics, Balance training","limitations": "Fall risk, Joint pain, Medication interactions"},"Athletic Patient": {"name": "Sarah","phone": "(555) 555-6666","age": 32,4 unmodified lines}}profile = profiles.get(profile_name, profiles["Default (Serhii)"])# Automatically apply the profile to the sessionif session and hasattr(session.app_instance, 'set_patient_info'):496 unmodified lines4974984995005015025035045055065075085095105115125135145155165175185192253 unmodified lines27732774277527762777277827792 unmodified lines278227832784278527862787278838 unmodified lines282728282829283028312832283320 unmodified lines28542855285628572858285928602 unmodified lines28632864286528662867286828692 unmodified lines28722873287428752876287728782 unmodified lines28812882288328842885288628872 unmodified lines28902891289228932894289528962 unmodified lines28992900290129022903290429054 unmodified lines2910291129122913291429152916496 unmodified linesgr.Markdown("### π Predefined Profiles")profile_selector = gr.Dropdown(choices=["π€ Default Profile (Serhii)","π’ GREEN - Healthy Coping","π‘ YELLOW - Mild Distress","π‘ YELLOW - Grief & Loss","π‘ YELLOW - Existential Questions","π‘ YELLOW - Spiritual Disconnection","π΄ RED - Crisis (Suicidal Risk)","π΄ RED - Severe Hopelessness","π΄ RED - Spiritual Crisis","π« Cardiac Patient (Rehabilitation)","π©Έ Diabetic Patient (Management)","π₯ Post-Surgery (Recovery)","π§ Mental Health (Anxiety/Depression)","π΄ Elderly Patient (Chronic Care)","π Athletic Patient (Injury/Training)"],value="π€ Default Profile (Serhii)",label="Select Profile",interactive=True)2253 unmodified linesdef load_profile(profile_name: str, session: SimplifiedSessionData):"""Load predefined patient profile and apply it to the session."""profiles = {"π€ Default Profile (Serhii)": {"name": "Serhii","phone": "(555) 123-4567","age": 52,2 unmodified lines"exercise": "Swimming, Walking, Light cardio","limitations": "Anticoagulation therapy, Post-thrombotic recovery"},"π’ GREEN - Healthy Coping": {"name": "James","phone": "(555) 234-5678","age": 40,38 unmodified lines"exercise": "Walking, Community activities","limitations": "Spiritual disconnection, Social isolation"},"π΄ RED - Crisis (Suicidal Risk)": {"name": "Thomas","phone": "(555) 789-0123","age": 35,20 unmodified lines"exercise": "None - Spiritual support priority","limitations": "CRISIS - Spiritual crisis, Rage, Existential despair"},"π« Cardiac Patient (Rehabilitation)": {"name": "John","phone": "(555) 012-3456","age": 65,2 unmodified lines"exercise": "Supervised walking, Cardiac rehab program","limitations": "Recent MI, Limited exertion tolerance"},"π©Έ Diabetic Patient (Management)": {"name": "Maria","phone": "(555) 111-2222","age": 58,2 unmodified lines"exercise": "Moderate walking, Resistance training","limitations": "Neuropathy, Retinopathy risk"},"π₯ Post-Surgery (Recovery)": {"name": "Alex","phone": "(555) 222-3333","age": 45,2 unmodified lines"exercise": "Gentle mobility, Gradual progression","limitations": "Surgical site healing, Limited ROM"},"π§ Mental Health (Anxiety/Depression)": {"name": "Emma","phone": "(555) 333-4444","age": 35,2 unmodified lines"exercise": "Yoga, Walking, Group activities","limitations": "Low motivation, Energy fluctuations"},"π΄ Elderly Patient (Chronic Care)": {"name": "Robert","phone": "(555) 444-5555","age": 78,2 unmodified lines"exercise": "Tai Chi, Water aerobics, Balance training","limitations": "Fall risk, Joint pain, Medication interactions"},"π Athletic Patient (Injury/Training)": {"name": "Sarah","phone": "(555) 555-6666","age": 32,4 unmodified lines}}profile = profiles.get(profile_name, profiles["π€ Default Profile (Serhii)"])# Automatically apply the profile to the sessionif session and hasattr(session.app_instance, 'set_patient_info'):
src/interface/simplified_gradio_app.py+20-20