File size: 7,080 Bytes
ec8f374
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""
Medical Assistant domain template.
"""
from typing import List
from .base_domain import BaseDomain


class MedicalAssistantDomain(BaseDomain):
    """
    Medical assistant domain for health information,
    symptom assessment, and medical education.
    """

    def __init__(self):
        super().__init__()
        self._name = "Medical Assistant"
        self._description = "Medical information assistant for health education, symptom understanding, medication information, and wellness guidance. NOT a replacement for professional medical advice."
        self._icon = "+"

    def get_topics(self) -> List[str]:
        """Get medical assistant topics"""
        return [
            "Common Symptoms and Conditions",
            "Medication Information",
            "Preventive Care",
            "Nutrition and Diet",
            "Exercise and Fitness",
            "Mental Health",
            "Sleep Hygiene",
            "Chronic Disease Management",
            "First Aid",
            "Women's Health",
            "Men's Health",
            "Pediatric Health",
            "Senior Health",
            "Vaccination Information",
            "Lab Test Interpretation",
            "Vital Signs Understanding",
            "Disease Prevention",
            "Health Screening Guidelines",
            "Medication Side Effects",
            "Drug Interactions",
            "Allergy Management",
            "Pain Management",
            "Wound Care",
            "Diabetes Management",
            "Heart Health",
            "Respiratory Health",
            "Digestive Health",
            "Kidney Health",
            "Liver Health",
            "Bone and Joint Health",
            "Skin Conditions",
            "Eye Health",
            "Dental Health",
            "Infectious Diseases",
            "Cancer Prevention and Screening",
            "Stress Management",
            "Substance Abuse",
            "Sexual Health",
            "Pregnancy and Childbirth",
            "Post-operative Care",
            "Medical Terminology"
        ]

    def get_system_prompt(self) -> str:
        """Get medical assistant system prompt"""
        return """You are a knowledgeable medical information assistant with expertise in:
- General health and wellness
- Common medical conditions and symptoms
- Medication information and interactions
- Preventive care and health screening
- Chronic disease management
- Mental health and wellness
- Nutrition and exercise
- Medical terminology and lab results

Your role is to:
1. Provide accurate, evidence-based health information
2. Explain medical concepts in clear, accessible language
3. Help users understand symptoms, conditions, and treatments
4. Offer general wellness and preventive care guidance
5. Explain medication purposes, dosing, and potential side effects
6. Clarify medical terminology and test results

CRITICAL LIMITATIONS:
- You are NOT a licensed medical professional
- You do NOT diagnose medical conditions
- You do NOT prescribe medications or treatments
- You do NOT provide emergency medical advice
- You ALWAYS recommend consulting healthcare professionals for medical decisions

Guidelines:
- Be informative but never diagnostic
- Emphasize the importance of professional medical care
- For urgent symptoms, recommend immediate medical attention
- Explain when to seek emergency care (911/ER)
- Acknowledge uncertainty and limitations of general information
- Encourage regular check-ups and preventive care
- Respect patient privacy and confidentiality

EMERGENCY DISCLAIMER: For any medical emergency, life-threatening symptoms, or urgent medical concerns, immediately call 911 or go to the nearest emergency room. This assistant provides general health information only and is not a substitute for professional medical advice, diagnosis, or treatment."""

    def get_example_questions(self) -> List[str]:
        """Get example medical questions"""
        return [
            "What are the common side effects of ibuprofen?",
            "How much sleep should adults get each night?",
            "What are the warning signs of a heart attack?",
            "How can I lower my blood pressure naturally?",
            "What vaccines do adults need?",
            "What does a high cholesterol reading mean?",
            "How do I know if I should go to the ER or urgent care?",
            "What are healthy blood sugar levels?",
            "How can I manage stress and anxiety?",
            "What foods should I eat for better heart health?"
        ]

    def get_specialized_tools(self) -> List[dict]:
        """Get medical assistant tools"""
        return [
            {
                "name": "lookup_medication_info",
                "description": "Get detailed information about medications",
                "parameters": {
                    "medication_name": "string",
                    "info_type": "string (uses, dosage, side_effects, interactions)"
                },
                "returns": "Medication information object"
            },
            {
                "name": "check_drug_interactions",
                "description": "Check for interactions between medications",
                "parameters": {
                    "medications": "list of medication names"
                },
                "returns": "List of potential interactions and severity"
            },
            {
                "name": "interpret_vital_signs",
                "description": "Interpret vital sign measurements",
                "parameters": {
                    "vital_type": "string (blood_pressure, heart_rate, temperature, etc.)",
                    "value": "string or float",
                    "age": "int",
                    "context": "string (at_rest, after_exercise, etc.)"
                },
                "returns": "Interpretation with normal ranges"
            },
            {
                "name": "get_symptom_guidance",
                "description": "Get guidance on symptom severity and when to seek care",
                "parameters": {
                    "symptoms": "list of symptoms",
                    "duration": "string",
                    "severity": "string (mild, moderate, severe)"
                },
                "returns": "Care recommendations (self-care, urgent care, ER, etc.)"
            },
            {
                "name": "calculate_bmi",
                "description": "Calculate Body Mass Index",
                "parameters": {
                    "weight_lbs": "float",
                    "height_inches": "float"
                },
                "returns": "BMI value and category"
            },
            {
                "name": "get_vaccination_schedule",
                "description": "Get recommended vaccination schedule",
                "parameters": {
                    "age": "int",
                    "health_conditions": "list of conditions (optional)"
                },
                "returns": "Recommended vaccinations"
            }
        ]