Update app.py
Browse files
app.py
CHANGED
@@ -69,12 +69,13 @@ def extract_section(text: str, heading: str) -> str:
|
|
69 |
|
70 |
def structure_medical_response(text: str) -> Dict:
|
71 |
return {
|
72 |
-
"summary": extract_section(text, "
|
73 |
"risks": extract_section(text, "Risks or Red Flags"),
|
74 |
"missed_issues": extract_section(text, "What the doctor might have missed"),
|
75 |
"recommendations": extract_section(text, "Suggested Clinical Actions")
|
76 |
}
|
77 |
|
|
|
78 |
def serialize_patient(patient: dict) -> dict:
|
79 |
patient_copy = patient.copy()
|
80 |
if "_id" in patient_copy:
|
|
|
69 |
|
70 |
def structure_medical_response(text: str) -> Dict:
|
71 |
return {
|
72 |
+
"summary": extract_section(text, "Summarize the patient's medical history"),
|
73 |
"risks": extract_section(text, "Risks or Red Flags"),
|
74 |
"missed_issues": extract_section(text, "What the doctor might have missed"),
|
75 |
"recommendations": extract_section(text, "Suggested Clinical Actions")
|
76 |
}
|
77 |
|
78 |
+
|
79 |
def serialize_patient(patient: dict) -> dict:
|
80 |
patient_copy = patient.copy()
|
81 |
if "_id" in patient_copy:
|