Spaces:
Running
Running
File size: 8,805 Bytes
d213aa7 43398e6 d213aa7 43398e6 d213aa7 43398e6 d213aa7 43398e6 |
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 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# test_patients.py - Test patient data for Testing Lab
from typing import Dict, Any, Tuple
class TestPatientData:
"""Class for managing test patient data"""
@staticmethod
def get_patient_types() -> Dict[str, str]:
"""Returns available test patient types with descriptions"""
return {
"elderly": "👵 Elderly Mary (76 years old, complex comorbidity)",
"athlete": "🏃 Athletic John (24 роки, відновлення після травми)",
"pregnant": "🤰 Pregnant Sarah (28 років, вагітність з ускладненнями)"
}
@staticmethod
def get_elderly_patient() -> Tuple[Dict[str, Any], Dict[str, Any]]:
"""Повертає дані для літнього пацієнта з множинними захворюваннями"""
clinical_data = {
"patient_summary": {
"active_problems": [
"Essential hypertension (uncontrolled)",
"Type 2 diabetes mellitus with complications",
"Chronic kidney disease stage 3",
"Falls risk - history of 3 falls last year"
],
"current_medications": [
"Amlodipine 10mg daily",
"Metformin 1000mg twice daily",
"Lisinopril 20mg daily",
"Furosemide 40mg daily"
],
"allergies": "Penicillin - rash, NSAIDs - GI upset"
},
"vital_signs_and_measurements": [
"Blood Pressure: 165/95 (last visit)",
"Weight: 78kg",
"BMI: 31.2 kg/m²"
],
"critical_alerts": [
"High fall risk - requires mobility assessment",
"Uncontrolled hypertension and diabetes"
],
"assessment_and_plan": "76-year-old female with multiple cardiovascular risk factors and functional limitations."
}
lifestyle_data = {
"patient_name": "Mary",
"patient_age": "76",
"conditions": ["essential hypertension", "type 2 diabetes", "high fall risk"],
"primary_goal": "Improve mobility and independence while managing chronic conditions safely",
"exercise_preferences": ["chair exercises", "gentle walking"],
"exercise_limitations": [
"High fall risk - balance issues",
"Limited endurance due to heart condition",
"Requires walking frame for mobility"
],
"dietary_notes": [
"Diabetic diet - needs simple carb counting",
"Low sodium for hypertension"
],
"personal_preferences": [
"very cautious due to fall anxiety",
"needs frequent encouragement"
],
"journey_summary": "Elderly patient with complex medical needs seeking to maintain independence.",
"last_session_summary": "",
"progress_metrics": {
"exercise_frequency": "0 times/week - afraid to move",
"fall_incidents": "3 in past 12 months"
}
}
return clinical_data, lifestyle_data
@staticmethod
def get_athlete_patient() -> Tuple[Dict[str, Any], Dict[str, Any]]:
"""Повертає дані для спортсмена після травми"""
clinical_data = {
"patient_summary": {
"active_problems": [
"ACL reconstruction recovery (3 months post-op)",
"Post-surgical knee pain and swelling",
"Anxiety related to return to sport"
],
"current_medications": [
"Ibuprofen 400mg as needed for pain",
"Physiotherapy exercises daily"
],
"allergies": "No known drug allergies"
},
"vital_signs_and_measurements": [
"Blood Pressure: 118/72",
"Weight: 82kg (lost 3kg since surgery)",
"BMI: 24.0 kg/m²"
],
"critical_alerts": [
"Do not exceed physiotherapy exercise guidelines",
"No pivoting or cutting movements until cleared"
],
"assessment_and_plan": "24-year-old male athlete 3 months post ACL reconstruction."
}
lifestyle_data = {
"patient_name": "John",
"patient_age": "24",
"conditions": ["ACL reconstruction recovery", "sports performance anxiety"],
"primary_goal": "Return to competitive football safely and regain pre-injury fitness",
"exercise_preferences": ["weight training", "swimming", "cycling"],
"exercise_limitations": [
"No pivoting or cutting movements yet",
"Must follow physiotherapy protocol strictly"
],
"dietary_notes": [
"High protein intake for muscle recovery",
"Anti-inflammatory foods"
],
"personal_preferences": [
"highly motivated and goal-oriented",
"impatient with slow recovery process"
],
"journey_summary": "Motivated athlete recovering from major knee surgery.",
"last_session_summary": "",
"progress_metrics": {
"knee_flexion_range": "120 degrees (target: 135+)",
"return_to_sport_timeline": "3-4 months if progress continues"
}
}
return clinical_data, lifestyle_data
@staticmethod
def get_pregnant_patient() -> Tuple[Dict[str, Any], Dict[str, Any]]:
"""Повертає дані для вагітної пацієнтки з ускладненнями"""
clinical_data = {
"patient_summary": {
"active_problems": [
"Pregnancy 28 weeks gestation",
"Gestational diabetes mellitus (diet-controlled)",
"Pregnancy-induced hypertension (mild)"
],
"current_medications": [
"Prenatal vitamins with iron",
"Additional iron supplement 65mg daily"
],
"allergies": "No known drug allergies"
},
"vital_signs_and_measurements": [
"Blood Pressure: 142/88 (elevated for pregnancy)",
"Current weight: 78kg",
"Weight gain: 10kg (appropriate)"
],
"critical_alerts": [
"Monitor blood pressure - risk of preeclampsia",
"Avoid exercises lying flat on back after 20 weeks"
],
"assessment_and_plan": "28-year-old female, 28 weeks pregnant with gestational diabetes."
}
lifestyle_data = {
"patient_name": "Sarah",
"patient_age": "28",
"conditions": ["pregnancy 28 weeks", "gestational diabetes"],
"primary_goal": "Maintain healthy pregnancy with good blood sugar control",
"exercise_preferences": ["prenatal yoga", "walking", "swimming"],
"exercise_limitations": [
"No lying flat on back after 20 weeks",
"Monitor heart rate - shouldn't exceed 140 bpm"
],
"dietary_notes": [
"Gestational diabetes diet - controlled carbohydrates",
"Small frequent meals to manage blood sugar"
],
"personal_preferences": [
"motivated to have healthy pregnancy",
"anxious about blood sugar control"
],
"journey_summary": "Second pregnancy with gestational diabetes.",
"last_session_summary": "",
"progress_metrics": {
"blood_glucose_control": "diet-controlled, monitoring 4x daily"
}
}
return clinical_data, lifestyle_data
@classmethod
def get_patient_data(cls, patient_type: str) -> Tuple[Dict[str, Any], Dict[str, Any]]:
"""Універсальний метод для отримання даних пацієнта за типом"""
if patient_type == "elderly":
return cls.get_elderly_patient()
elif patient_type == "athlete":
return cls.get_athlete_patient()
elif patient_type == "pregnant":
return cls.get_pregnant_patient()
else:
raise ValueError(f"Невідомий тип пацієнта: {patient_type}") |