Ali2206 commited on
Commit
ffd15e8
·
verified ·
1 Parent(s): 04db5d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -7
app.py CHANGED
@@ -160,16 +160,38 @@ def create_ui(agent):
160
  extracted = "\n".join(results)
161
  file_hash_value = file_hash(files[0].name) if files else ""
162
 
163
- prompt = f"""Review these medical records and identify EXACTLY what might have been missed:
164
- 1. List potential missed diagnoses
165
- 2. Flag any medication conflicts
166
- 3. Note incomplete assessments
167
- 4. Highlight abnormal results needing follow-up
168
- Medical Records:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  {extracted[:12000]}
170
- ### Potential Oversights:
 
 
171
  """
172
 
 
173
  try:
174
  if history and history[-1]["content"].startswith("⏳"):
175
  history.pop()
 
160
  extracted = "\n".join(results)
161
  file_hash_value = file_hash(files[0].name) if files else ""
162
 
163
+ prompt = f"""
164
+ You are a clinical reasoning assistant. Analyze the following medical records with a focus on identifying potential clinical oversights. Your task is to provide a comprehensive and structured summary addressing the following:
165
+
166
+ 1. **Potential Missed Diagnoses**:
167
+ - Consider any contradictory or missing evidence regarding the patient’s history, symptoms, or test results.
168
+ - Take into account psychiatric, neurological, infectious, autoimmune, and genetic conditions.
169
+ - Consider family history, trauma history, and childhood developmental information.
170
+
171
+ 2. **Flagged Medication Conflicts**:
172
+ - Cross-check all prescribed medications for contraindications, interactions, or off-label use without justification.
173
+ - Verify if any medications may worsen known diagnoses or contribute to adverse effects.
174
+
175
+ 3. **Incomplete or Missing Assessments**:
176
+ - Identify any domains of assessment that are completely missing or only superficially addressed (e.g., cognitive, psychiatric, social, family).
177
+ - Point out gaps in documentation of prior medical history, substance use, or lab/imaging results.
178
+
179
+ 4. **Abnormal Results Needing Urgent Follow-up**:
180
+ - Extract and highlight lab results, imaging, behavioral observations, or legal history that warrant immediate reassessment or specialist referral.
181
+
182
+ Make the answer precise, evidence-based, and structured clearly under each heading. Avoid repeating input and remove tool-call formatting.
183
+
184
+ ---
185
+
186
+ Medical Records Input (Truncated to 12k chars):
187
+
188
  {extracted[:12000]}
189
+
190
+ ---
191
+ Begin your analysis below:
192
  """
193
 
194
+
195
  try:
196
  if history and history[-1]["content"].startswith("⏳"):
197
  history.pop()