Update Sancheti Hospital Diabetic Dost
This commit is contained in:
@@ -93,7 +93,7 @@ ADMIN_HTML_PATH = TEMPLATES_DIR / "admin.html"
|
|||||||
|
|
||||||
@app.get("/favicon.ico", include_in_schema=False)
|
@app.get("/favicon.ico", include_in_schema=False)
|
||||||
async def favicon_endpoint():
|
async def favicon_endpoint():
|
||||||
fav_candidate = STATIC_DIR / "ruby_logo.png"
|
fav_candidate = STATIC_DIR / "sancheti_logo.png"
|
||||||
if fav_candidate.exists():
|
if fav_candidate.exists():
|
||||||
return FileResponse(fav_candidate, media_type="image/png")
|
return FileResponse(fav_candidate, media_type="image/png")
|
||||||
fav_candidate = STATIC_DIR / "diabetes_dost_logo.png"
|
fav_candidate = STATIC_DIR / "diabetes_dost_logo.png"
|
||||||
@@ -148,8 +148,8 @@ async def health_check():
|
|||||||
gpu_name = "CPU Mode"
|
gpu_name = "CPU Mode"
|
||||||
return {
|
return {
|
||||||
"status": "online",
|
"status": "online",
|
||||||
"app_name": "Ruby Hospital — Diabetes Dost",
|
"app_name": "Sancheti Hospital — Diabetes Dost",
|
||||||
"hospital_name": "Ruby Hospital",
|
"hospital_name": "Sancheti Hospital",
|
||||||
"motto": "॥ आरोग्यक्षेमं वहाम्यहम् ॥",
|
"motto": "॥ आरोग्यक्षेमं वहाम्यहम् ॥",
|
||||||
"bot_name": "Diabetes Dost",
|
"bot_name": "Diabetes Dost",
|
||||||
"language": "hi-IN",
|
"language": "hi-IN",
|
||||||
|
|||||||
@@ -37,25 +37,25 @@ EMERGENCY_TRIGGERS: List[Dict[str, Any]] = [
|
|||||||
"id": "EMERGENCY_CHEST_PAIN",
|
"id": "EMERGENCY_CHEST_PAIN",
|
||||||
"category": "cardiac_emergency",
|
"category": "cardiac_emergency",
|
||||||
"patterns": [r"सीने.*दर्द", r"छाती.*दर्द", r"छातीत.*दुख", r"chest.*pain", r"हार्ट.*अटैक", r"heart.*attack", r"बांह.*दर्द", r"छाती.*भारी"],
|
"patterns": [r"सीने.*दर्द", r"छाती.*दर्द", r"छातीत.*दुख", r"chest.*pain", r"हार्ट.*अटैक", r"heart.*attack", r"बांह.*दर्द", r"छाती.*भारी"],
|
||||||
"response": "सावधानी: सीने में तेज दर्द या दबाव एक गंभीर आपातकालीन स्थिति (Heart Emergency) हो सकती है। कृपया तुरंत Ruby Hospital के इमरजेंसी विभाग में जाएं या एम्बुलेंस बुलाएं। खुद गाड़ी न चलाएं और तुरंत डॉक्टरी सहायता लें।"
|
"response": "सावधानी: सीने में तेज दर्द या दबाव एक गंभीर आपातकालीन स्थिति (Heart Emergency) हो सकती है। कृपया तुरंत Sancheti Hospital के इमरजेंसी विभाग में जाएं या एम्बुलेंस बुलाएं। खुद गाड़ी न चलाएं और तुरंत डॉक्टरी सहायता लें।"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "EMERGENCY_BREATHING",
|
"id": "EMERGENCY_BREATHING",
|
||||||
"category": "respiratory_emergency",
|
"category": "respiratory_emergency",
|
||||||
"patterns": [r"सांस.*तकलीफ", r"दम.*घुट", r"सांस.*नहीं आ", r"breath.*difficult", r"सांस.*फूलना.*ज्यादा", r"श्वास.*त्रास"],
|
"patterns": [r"सांस.*तकलीफ", r"दम.*घुट", r"सांस.*नहीं आ", r"breath.*difficult", r"सांस.*फूलना.*ज्यादा", r"श्वास.*त्रास"],
|
||||||
"response": "महत्वपूर्ण चेतावनी: सांस लेने में अत्यधिक तकलीफ या दम घुटना गंभीर स्थिति है। कृपया तुरंत सीधे बैठें, खिड़की या खुली हवा में आएं और बिना देरी किए Ruby Hospital के आपातकालीन कक्ष (Emergency Department) में संपर्क करें।"
|
"response": "महत्वपूर्ण चेतावनी: सांस लेने में अत्यधिक तकलीफ या दम घुटना गंभीर स्थिति है। कृपया तुरंत सीधे बैठें, खिड़की या खुली हवा में आएं और बिना देरी किए Sancheti Hospital के आपातकालीन कक्ष (Emergency Department) में संपर्क करें।"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "EMERGENCY_SEVERE_HYPO",
|
"id": "EMERGENCY_SEVERE_HYPO",
|
||||||
"category": "severe_hypoglycemia",
|
"category": "severe_hypoglycemia",
|
||||||
"patterns": [r"शुगर.*\b(?:30|40|50)\b", r"sugar.*\b(?:30|40|50)\b", r"शुगर.*कम.*बेहोश", r"गंभीर.*लो.*शुगर"],
|
"patterns": [r"शुगर.*\b(?:30|40|50)\b", r"sugar.*\b(?:30|40|50)\b", r"शुगर.*कम.*बेहोश", r"गंभीर.*लो.*शुगर"],
|
||||||
"response": "आपातकालीन चेतावनी: ब्लड शुगर का स्तर बहुत खतरनाक रूप से कम हो गया है। यदि मरीज होश में है तो तुरंत 3-4 चम्मच चीनी, ग्लूकोज पानी या मीठा जूस दें। यदि मरीज अचेत हो तो मुंह में कुछ न डालें और तुरंत Ruby Hospital इमरजेंसी में ले जाएं।"
|
"response": "आपातकालीन चेतावनी: ब्लड शुगर का स्तर बहुत खतरनाक रूप से कम हो गया है। यदि मरीज होश में है तो तुरंत 3-4 चम्मच चीनी, ग्लूकोज पानी या मीठा जूस दें। यदि मरीज अचेत हो तो मुंह में कुछ न डालें और तुरंत Sancheti Hospital इमरजेंसी में ले जाएं।"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "EMERGENCY_STROKE_NEURO",
|
"id": "EMERGENCY_STROKE_NEURO",
|
||||||
"category": "stroke_emergency",
|
"category": "stroke_emergency",
|
||||||
"patterns": [r"बेहोश", r"अचेत", r"unconscious", r"लकवा", r"चेहरा.*टेढ़ा", r"बोली.*लड़खड़ा", r"stroke", r"paralysis", r"पक्षाघात"],
|
"patterns": [r"बेहोश", r"अचेत", r"unconscious", r"लकवा", r"चेहरा.*टेढ़ा", r"बोली.*लड़खड़ा", r"stroke", r"paralysis", r"पक्षाघात"],
|
||||||
"response": "अति आवश्यक चेतावनी: अचानक बेहोशी, चेहरे का टेढ़ापन या बोली लड़खड़ाना स्ट्रोक (Stroke) या न्यूरोलॉजिकल इमरजेंसी के लक्षण हो सकते हैं। रोगी को तुरंत Ruby Hospital इमरजेंसी विभाग ले जाएं।"
|
"response": "अति आवश्यक चेतावनी: अचानक बेहोशी, चेहरे का टेढ़ापन या बोली लड़खड़ाना स्ट्रोक (Stroke) या न्यूरोलॉजिकल इमरजेंसी के लक्षण हो सकते हैं। रोगी को तुरंत Sancheti Hospital इमरजेंसी विभाग ले जाएं।"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -271,11 +271,11 @@ class StructuredMedicalState:
|
|||||||
|
|
||||||
|
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
# 4. CLINICAL CONVERSATION SESSION (RUBY HOSPITAL ASSISTANT)
|
# 4. CLINICAL CONVERSATION SESSION (SANCHETI HOSPITAL ASSISTANT)
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
class ClinicalConversationSession:
|
class ClinicalConversationSession:
|
||||||
"""
|
"""
|
||||||
Ruby Hospital Continuous Conversational Medical Assistant.
|
Sancheti Hospital Continuous Conversational Medical Assistant.
|
||||||
"""
|
"""
|
||||||
def __init__(self, session_id: Optional[str] = None):
|
def __init__(self, session_id: Optional[str] = None):
|
||||||
self.session_id = session_id or str(uuid.uuid4())[:8]
|
self.session_id = session_id or str(uuid.uuid4())[:8]
|
||||||
@@ -570,14 +570,14 @@ class ClinicalConversationSession:
|
|||||||
resp = f"{ack_name}बताइए, आपको यह तकलीफ कब से हो रही है?"
|
resp = f"{ack_name}बताइए, आपको यह तकलीफ कब से हो रही है?"
|
||||||
return self._format_response("ACK_DEMOGRAPHICS_CONTINUE", "clinical_progression", resp)
|
return self._format_response("ACK_DEMOGRAPHICS_CONTINUE", "clinical_progression", resp)
|
||||||
|
|
||||||
# 5. Check Diabetes Risk Symptoms & Provide Awareness + Ruby Hospital Recommendation
|
# 5. Check Diabetes Risk Symptoms & Provide Awareness + Sancheti Hospital Recommendation
|
||||||
diabetes_risk_symptoms = ["excessive_thirst", "frequent_urination"]
|
diabetes_risk_symptoms = ["excessive_thirst", "frequent_urination"]
|
||||||
has_diabetes_risk = any(s in self.state.active_symptoms for s in diabetes_risk_symptoms) or any(w in text_lower for w in ["प्यास लगती", "पेशाब आता", "तहान", "लघवी", "थकान और कमजोरी", "वजन कम"])
|
has_diabetes_risk = any(s in self.state.active_symptoms for s in diabetes_risk_symptoms) or any(w in text_lower for w in ["प्यास लगती", "पेशाब आता", "तहान", "लघवी", "थकान और कमजोरी", "वजन कम"])
|
||||||
if has_diabetes_risk and "diabetes_awareness_given" not in self.state.asked_questions and not self.state.known_diabetes:
|
if has_diabetes_risk and "diabetes_awareness_given" not in self.state.asked_questions and not self.state.known_diabetes:
|
||||||
self.state.asked_questions.append("diabetes_awareness_given")
|
self.state.asked_questions.append("diabetes_awareness_given")
|
||||||
self.state.hospital_recommendation_given = True
|
self.state.hospital_recommendation_given = True
|
||||||
self.state.tests_discussed.append("Blood Sugar Screening")
|
self.state.tests_discussed.append("Blood Sugar Screening")
|
||||||
resp = f"{name_prefix}बहुत अधिक प्यास लगना और बार-बार पेशाब आना ब्लड शुगर (डायबिटीज) से संबंधित लक्षण भी हो सकते हैं। इसलिए ब्लड शुगर और आवश्यक जांचों की जरूरत हो सकती है। आप Ruby Hospital में डॉक्टर से परामर्श और जरूरी टेस्ट के लिए संपर्क कर सकते हैं।"
|
resp = f"{name_prefix}बहुत अधिक प्यास लगना और बार-बार पेशाब आना ब्लड शुगर (डायबिटीज) से संबंधित लक्षण भी हो सकते हैं। इसलिए ब्लड शुगर और आवश्यक जांचों की जरूरत हो सकती है। आप Sancheti Hospital में डॉक्टर से परामर्श और जरूरी टेस्ट के लिए संपर्क कर सकते हैं।"
|
||||||
return self._format_response("DIABETES_AWARENESS_POONA", "diabetes_awareness", resp)
|
return self._format_response("DIABETES_AWARENESS_POONA", "diabetes_awareness", resp)
|
||||||
|
|
||||||
# 6. Multi-Symptom Risk Assessment
|
# 6. Multi-Symptom Risk Assessment
|
||||||
@@ -615,10 +615,10 @@ class ClinicalConversationSession:
|
|||||||
resp = f"{name_prefix}Insulin का इंजेक्शन मुख्य भोजन से 15 से 20 मिनट पहले लिया जाता है।"
|
resp = f"{name_prefix}Insulin का इंजेक्शन मुख्य भोजन से 15 से 20 मिनट पहले लिया जाता है।"
|
||||||
return self._format_response("MED_TIMING_INSULIN", "medication", resp)
|
return self._format_response("MED_TIMING_INSULIN", "medication", resp)
|
||||||
|
|
||||||
# D. Lab Test / Blood Test / Consultation Inquiries -> Recommend Ruby Hospital
|
# D. Lab Test / Blood Test / Consultation Inquiries -> Recommend Sancheti Hospital
|
||||||
if any(w in text_lower for w in ["रक्त तपासणी", "ब्लड टेस्ट", "cbc", "खून की जांच", "test कब", "टेस्ट कब", "डॉक्टर को दिखाना", "जांच कहां"]):
|
if any(w in text_lower for w in ["रक्त तपासणी", "ब्लड टेस्ट", "cbc", "खून की जांच", "test कब", "टेस्ट कब", "डॉक्टर को दिखाना", "जांच कहां"]):
|
||||||
self.state.hospital_recommendation_given = True
|
self.state.hospital_recommendation_given = True
|
||||||
resp = f"{name_prefix}लक्षणों की सही पुष्टि के लिए CBC और ब्लड टेस्ट की सलाह दी जाती है। आप Ruby Hospital में डॉक्टर से परामर्श और सभी जरूरी टेस्ट करवा सकते हैं।"
|
resp = f"{name_prefix}लक्षणों की सही पुष्टि के लिए CBC और ब्लड टेस्ट की सलाह दी जाती है। आप Sancheti Hospital में डॉक्टर से परामर्श और सभी जरूरी टेस्ट करवा सकते हैं।"
|
||||||
return self._format_response("POONA_HOSPITAL_TESTS", "investigation", resp)
|
return self._format_response("POONA_HOSPITAL_TESTS", "investigation", resp)
|
||||||
|
|
||||||
# 8. Specialized Diabetes Flow (When Active)
|
# 8. Specialized Diabetes Flow (When Active)
|
||||||
@@ -646,11 +646,11 @@ class ClinicalConversationSession:
|
|||||||
resp = f"ठीक है {name_prefix}आप {med_list} ले रहे हैं। इसे भोजन के तुरंत बाद लें। क्या आपको बार-बार पेशाब या बहुत प्यास लग रही है?"
|
resp = f"ठीक है {name_prefix}आप {med_list} ले रहे हैं। इसे भोजन के तुरंत बाद लें। क्या आपको बार-बार पेशाब या बहुत प्यास लग रही है?"
|
||||||
return self._format_response("DIA_MED_ACK", "current_medications", resp)
|
return self._format_response("DIA_MED_ACK", "current_medications", resp)
|
||||||
|
|
||||||
# Follow-up with Ruby Hospital Recommendation
|
# Follow-up with Sancheti Hospital Recommendation
|
||||||
if "hospital_advised_dia" not in self.state.asked_questions:
|
if "hospital_advised_dia" not in self.state.asked_questions:
|
||||||
self.state.asked_questions.append("hospital_advised_dia")
|
self.state.asked_questions.append("hospital_advised_dia")
|
||||||
self.state.hospital_recommendation_given = True
|
self.state.hospital_recommendation_given = True
|
||||||
resp = f"{name_prefix}डायबिटीज को नियंत्रित रखने के लिए नियमित दवा लें और हर 3 महीने में HbA1c टेस्ट कराएं। आप Ruby Hospital में डॉक्टर से परामर्श और चेकअप के लिए संपर्क कर सकते हैं।"
|
resp = f"{name_prefix}डायबिटीज को नियंत्रित रखने के लिए नियमित दवा लें और हर 3 महीने में HbA1c टेस्ट कराएं। आप Sancheti Hospital में डॉक्टर से परामर्श और चेकअप के लिए संपर्क कर सकते हैं।"
|
||||||
return self._format_response("DIA_POONA_RECOMMEND", "diabetes_summary", resp)
|
return self._format_response("DIA_POONA_RECOMMEND", "diabetes_summary", resp)
|
||||||
|
|
||||||
# 9. General Clinical Slot Investigation & Progression
|
# 9. General Clinical Slot Investigation & Progression
|
||||||
@@ -678,12 +678,12 @@ class ClinicalConversationSession:
|
|||||||
follow_up = "क्या इसके साथ चक्कर या कमजोरी भी महसूस हो रही है?"
|
follow_up = "क्या इसके साथ चक्कर या कमजोरी भी महसूस हो रही है?"
|
||||||
return self._format_response(f"ASK_ASSOC_{primary_sym.upper()}", sym_data["category"], f"{name_prefix}{follow_up}")
|
return self._format_response(f"ASK_ASSOC_{primary_sym.upper()}", sym_data["category"], f"{name_prefix}{follow_up}")
|
||||||
|
|
||||||
# Guidance + Ruby Hospital recommendation for persistent symptoms
|
# Guidance + Sancheti Hospital recommendation for persistent symptoms
|
||||||
dur_text = f"{dur} से " if dur else ""
|
dur_text = f"{dur} से " if dur else ""
|
||||||
if not self.state.hospital_recommendation_given and "hospital_rec_done" not in self.state.asked_questions:
|
if not self.state.hospital_recommendation_given and "hospital_rec_done" not in self.state.asked_questions:
|
||||||
self.state.asked_questions.append("hospital_rec_done")
|
self.state.asked_questions.append("hospital_rec_done")
|
||||||
self.state.hospital_recommendation_given = True
|
self.state.hospital_recommendation_given = True
|
||||||
full_reply = f"{name_prefix}आपको {dur_text}{sym_data['name_hi']} है। {sym_data['guidance']} यदि तकलीफ 2-3 दिनों में ठीक न हो, तो आप Ruby Hospital में डॉक्टर से परामर्श और जरूरी जांच के लिए संपर्क कर सकते हैं।"
|
full_reply = f"{name_prefix}आपको {dur_text}{sym_data['name_hi']} है। {sym_data['guidance']} यदि तकलीफ 2-3 दिनों में ठीक न हो, तो आप Sancheti Hospital में डॉक्टर से परामर्श और जरूरी जांच के लिए संपर्क कर सकते हैं।"
|
||||||
else:
|
else:
|
||||||
full_reply = f"{name_prefix}आपको {dur_text}{sym_data['name_hi']} है। {sym_data['guidance']}"
|
full_reply = f"{name_prefix}आपको {dur_text}{sym_data['name_hi']} है। {sym_data['guidance']}"
|
||||||
|
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ class DialogueManager:
|
|||||||
sugar_text = f" और पिछली बार आपकी Blood Sugar {last_sugar} mg/dL दर्ज थी" if last_sugar else ""
|
sugar_text = f" और पिछली बार आपकी Blood Sugar {last_sugar} mg/dL दर्ज थी" if last_sugar else ""
|
||||||
|
|
||||||
returning_speech = strip_all_punctuations(
|
returning_speech = strip_all_punctuations(
|
||||||
f"नमस्ते {p_name_rec} जी Ruby Hospital के Diabetes Dost में आपका दोबारा स्वागत है "
|
f"नमस्ते {p_name_rec} जी Sancheti Hospital के Diabetes Dost में आपका दोबारा स्वागत है "
|
||||||
f"हमारे रिकॉर्ड के अनुसार {meds_text}{sugar_text} आइए आज का आपका Regular Follow-up Check-up शुरू करते हैं "
|
f"हमारे रिकॉर्ड के अनुसार {meds_text}{sugar_text} आइए आज का आपका Regular Follow-up Check-up शुरू करते हैं "
|
||||||
f"{next_q.get('question_hi', '')}"
|
f"{next_q.get('question_hi', '')}"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class EmergencyDetector:
|
|||||||
primary_cat = matched_categories[0] if matched_categories else "general_acute"
|
primary_cat = matched_categories[0] if matched_categories else "general_acute"
|
||||||
|
|
||||||
verbal_response = (
|
verbal_response = (
|
||||||
"आपके बताए Symptoms गंभीर हो सकते हैं। कृपया अभी तुरंत Ruby Hospital के Emergency Department "
|
"आपके बताए Symptoms गंभीर हो सकते हैं। कृपया अभी तुरंत Sancheti Hospital के Emergency Department "
|
||||||
"में संपर्क करें या Local Emergency Service (112 / 108) को Call करें। "
|
"में संपर्क करें या Local Emergency Service (112 / 108) को Call करें। "
|
||||||
"आपकी Safety के लिए इस Screening को अभी रोक दिया जा रहा है।"
|
"आपकी Safety के लिए इस Screening को अभी रोक दिया जा रहा है।"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ def generate_pdf(summary: Dict[str, Any]) -> bytes:
|
|||||||
|
|
||||||
header_data = [
|
header_data = [
|
||||||
[
|
[
|
||||||
Paragraph("<b>🏥 Ruby Hospital</b>", ps("Hdr1", fontName="Helvetica-Bold", fontSize=11, textColor=colors.white)),
|
Paragraph("<b>🏥 Sancheti Hospital</b>", ps("Hdr1", fontName="Helvetica-Bold", fontSize=11, textColor=colors.white)),
|
||||||
Paragraph(f"<b>Session:</b> {session_id}<br/><b>Generated:</b> {gen_at}", ps("Hdr2", fontName="Helvetica", fontSize=7.5, textColor=colors.HexColor("#cbd5e1"), alignment=TA_RIGHT)),
|
Paragraph(f"<b>Session:</b> {session_id}<br/><b>Generated:</b> {gen_at}", ps("Hdr2", fontName="Helvetica", fontSize=7.5, textColor=colors.HexColor("#cbd5e1"), alignment=TA_RIGHT)),
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@@ -302,7 +302,7 @@ def generate_pdf(summary: Dict[str, Any]) -> bytes:
|
|||||||
story.append(Paragraph(
|
story.append(Paragraph(
|
||||||
"⚠️ DISCLAIMER: This is an AI-assisted pre-screening summary generated by Diabetes Dost. "
|
"⚠️ DISCLAIMER: This is an AI-assisted pre-screening summary generated by Diabetes Dost. "
|
||||||
"It is NOT a medical diagnosis. All findings must be reviewed and confirmed by a qualified physician. "
|
"It is NOT a medical diagnosis. All findings must be reviewed and confirmed by a qualified physician. "
|
||||||
"Ruby Hospital — ॥ आरोग्यक्षेमं वहाम्यहम् ॥",
|
"Sancheti Hospital — ॥ आरोग्यक्षेमं वहाम्यहम् ॥",
|
||||||
s_disclaimer
|
s_disclaimer
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|||||||
@@ -130,21 +130,21 @@ FOLLOWUP_TEMPLATES = {
|
|||||||
"📅 *Follow-up भेटीची आठवण*\n\n"
|
"📅 *Follow-up भेटीची आठवण*\n\n"
|
||||||
"तुमची Diabetes Dost AI pre-screening झाली आहे.\n"
|
"तुमची Diabetes Dost AI pre-screening झाली आहे.\n"
|
||||||
"आता डॉक्टरांशी प्रत्यक्ष भेट घेणे महत्त्वाचे आहे!\n\n"
|
"आता डॉक्टरांशी प्रत्यक्ष भेट घेणे महत्त्वाचे आहे!\n\n"
|
||||||
"🏥 *DMH OPD — Diabetes & Endocrinology*\n"
|
"🏥 *Sancheti Hospital OPD — Diabetes Care*\n"
|
||||||
"📞 अपॉइंटमेंट बुक करा: 020-66023000\n"
|
"📞 अपॉइंटमेंट बुक करा: 020-28999999\n"
|
||||||
"🌐 ऑनलाईन: www.rubyhall.com\n\n"
|
"🌐 ऑनलाईन: www.sanchetihospital.org\n\n"
|
||||||
"Session ID: `{session_id}`\n\n"
|
"Session ID: `{session_id}`\n\n"
|
||||||
"⚕️ हा अहवाल डॉक्टरांना दाखवा."
|
"⚕️ हा अहवाल डॉक्टरांना दाखवा."
|
||||||
),
|
),
|
||||||
"hi": (
|
"hi": (
|
||||||
"🏥 *दीनानाथ मंगेशकर अस्पताल — Diabetes Dost*\n\n"
|
"🏥 *संचेती हॉस्पिटल — Diabetes Dost*\n\n"
|
||||||
"नमस्ते {name} जी! 🙏\n\n"
|
"नमस्ते {name} जी! 🙏\n\n"
|
||||||
"📅 *Follow-up अपॉइंटमेंट रिमाइंडर*\n\n"
|
"📅 *Follow-up अपॉइंटमेंट रिमाइंडर*\n\n"
|
||||||
"आपकी Diabetes Dost AI pre-screening हो गई है।\n"
|
"आपकी Diabetes Dost AI pre-screening हो गई है।\n"
|
||||||
"अब डॉक्टर से मिलना जरूरी है!\n\n"
|
"अब डॉक्टर से मिलना जरूरी है!\n\n"
|
||||||
"🏥 *DMH OPD — Diabetes & Endocrinology*\n"
|
"🏥 *Sancheti Hospital OPD — Diabetes Care*\n"
|
||||||
"📞 अपॉइंटमेंट: 020-66023000\n"
|
"📞 अपॉइंटमेंट: 020-28999999\n"
|
||||||
"🌐 Online: www.rubyhall.com\n\n"
|
"🌐 Online: www.sanchetihospital.org\n\n"
|
||||||
"Session ID: `{session_id}`\n\n"
|
"Session ID: `{session_id}`\n\n"
|
||||||
"⚕️ यह रिपोर्ट डॉक्टर को दिखाएं।"
|
"⚕️ यह रिपोर्ट डॉक्टर को दिखाएं।"
|
||||||
)
|
)
|
||||||
@@ -281,23 +281,23 @@ class WhatsAppDeliveryService:
|
|||||||
|
|
||||||
if language == "mr":
|
if language == "mr":
|
||||||
message_body = (
|
message_body = (
|
||||||
f"🏥 *दीनानाथ मंगेशकर हॉस्पिटल — Diabetes Dost*\n\n"
|
f"🏥 *संचेती हॉस्पिटल — Diabetes Dost*\n\n"
|
||||||
f"नमस्कार {patient_name} जी! 🙏\n"
|
f"नमस्कार {patient_name} जी! 🙏\n"
|
||||||
f"तुमचा मधुमेह पूर्व-तपासणी अहवाल तयार आहे.\n\n"
|
f"तुमचा मधुमेह पूर्व-तपासणी अहवाल तयार आहे.\n\n"
|
||||||
f"📄 *अहवाल डाउनलोड करा:*\n"
|
f"📄 *अहवाल डाउनलोड करा:*\n"
|
||||||
f"Session ID: `{session_id}`\n\n"
|
f"Session ID: `{session_id}`\n\n"
|
||||||
f"⚠️ हा अहवाल AI-आधारित आहे. कृपया डॉक्टरांचा सल्ला घ्या.\n"
|
f"⚠️ हा अहवाल AI-आधारित आहे. कृपया डॉक्टरांचा सल्ला घ्या.\n"
|
||||||
f"📞 DMH हेल्पलाईन: 020-66023000"
|
f"📞 संचेती हॉस्पिटल हेल्पलाईन: 020-28999999"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
message_body = (
|
message_body = (
|
||||||
f"🏥 *Ruby Hospital — Diabetes Dost*\n\n"
|
f"🏥 *Sancheti Hospital — Diabetes Dost*\n\n"
|
||||||
f"Hello {patient_name}! 🙏\n"
|
f"Hello {patient_name}! 🙏\n"
|
||||||
f"Your diabetes pre-screening report is ready.\n\n"
|
f"Your diabetes pre-screening report is ready.\n\n"
|
||||||
f"📄 *Download Report:*\n"
|
f"📄 *Download Report:*\n"
|
||||||
f"Session ID: `{session_id}`\n\n"
|
f"Session ID: `{session_id}`\n\n"
|
||||||
f"⚠️ This is an AI-assisted pre-screening. Please consult your doctor.\n"
|
f"⚠️ This is an AI-assisted pre-screening. Please consult your doctor.\n"
|
||||||
f"📞 DMH Helpline: 020-66023000"
|
f"📞 Sancheti Hospital Helpline: 020-28999999"
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.is_twilio_configured:
|
if self.is_twilio_configured:
|
||||||
@@ -418,7 +418,7 @@ class WhatsAppDeliveryService:
|
|||||||
pdf_block = f"\n📄 *Clinical PDF Report:* {pdf_url}" if pdf_url else ""
|
pdf_block = f"\n📄 *Clinical PDF Report:* {pdf_url}" if pdf_url else ""
|
||||||
|
|
||||||
msg = (
|
msg = (
|
||||||
f"🏥 *RUBY HOSPITAL*\n"
|
f"🏥 *SANCHETI HOSPITAL*\n"
|
||||||
f"🩺 *DIABETES DOST — PRE-SCREENING SUMMARY*\n"
|
f"🩺 *DIABETES DOST — PRE-SCREENING SUMMARY*\n"
|
||||||
f"━━━━━━━━━━━━━━━━━━━━━━━━\n"
|
f"━━━━━━━━━━━━━━━━━━━━━━━━\n"
|
||||||
f"👤 *Patient:* {p_name} | {p_age} yrs | {p_sex}\n"
|
f"👤 *Patient:* {p_name} | {p_age} yrs | {p_sex}\n"
|
||||||
@@ -434,7 +434,7 @@ class WhatsAppDeliveryService:
|
|||||||
f"📝 *Clinician Handover Note:*\n"
|
f"📝 *Clinician Handover Note:*\n"
|
||||||
f"{narrative}{pdf_block}\n\n"
|
f"{narrative}{pdf_block}\n\n"
|
||||||
f"━━━━━━━━━━━━━━━━━━━━━━━━\n"
|
f"━━━━━━━━━━━━━━━━━━━━━━━━\n"
|
||||||
f"⚕️ *DMH Clinical Triage Desk: 020-66023000*\n"
|
f"⚕️ *Sancheti Hospital Clinical Triage Desk*\n"
|
||||||
f"🔗 Full EHR Record available in Hospital Admin Portal"
|
f"🔗 Full EHR Record available in Hospital Admin Portal"
|
||||||
)
|
)
|
||||||
return msg
|
return msg
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
@@ -112,7 +112,7 @@ class SummaryGenerator:
|
|||||||
try:
|
try:
|
||||||
with open(txt_rel_path, "w", encoding="utf-8") as f:
|
with open(txt_rel_path, "w", encoding="utf-8") as f:
|
||||||
f.write("======================================================================\n")
|
f.write("======================================================================\n")
|
||||||
f.write(" RUBY HOSPITAL — CLINICAL TRIAGE REPORT\n")
|
f.write(" SANCHETI HOSPITAL — CLINICAL TRIAGE REPORT\n")
|
||||||
f.write("======================================================================\n\n")
|
f.write("======================================================================\n\n")
|
||||||
f.write(f"Session ID: {session_state.session_id}\n")
|
f.write(f"Session ID: {session_state.session_id}\n")
|
||||||
f.write(f"Generated At: {structured_summary['generated_at']}\n")
|
f.write(f"Generated At: {structured_summary['generated_at']}\n")
|
||||||
@@ -265,8 +265,8 @@ class SummaryGenerator:
|
|||||||
f"पारिवारिक इतिहास (Family History): {'हाँ (पॉजिटिव)' if s.family_history is True else ('नहीं (नेगेटिव)' if s.family_history is False else 'अनिर्दिष्ट (Unspecified)')}",
|
f"पारिवारिक इतिहास (Family History): {'हाँ (पॉजिटिव)' if s.family_history is True else ('नहीं (नेगेटिव)' if s.family_history is False else 'अनिर्दिष्ट (Unspecified)')}",
|
||||||
f"गर्भावस्था इतिहास (Pregnancy History): {'हाँ (पॉजिटिव)' if preg is True else ('नहीं (नेगेटिव)' if preg is False else 'लागू नहीं / अनिर्दिष्ट')}{', जेस्टेशनल डायबिटीज: हाँ (पॉजिटिव)' if gest is True else (', जेस्टेशनल डायबिटीज: नहीं (नेगेटिव)' if gest is False else '')}",
|
f"गर्भावस्था इतिहास (Pregnancy History): {'हाँ (पॉजिटिव)' if preg is True else ('नहीं (नेगेटिव)' if preg is False else 'लागू नहीं / अनिर्दिष्ट')}{', जेस्टेशनल डायबिटीज: हाँ (पॉजिटिव)' if gest is True else (', जेस्टेशनल डायबिटीज: नहीं (नेगेटिव)' if gest is False else '')}",
|
||||||
f"पहचाने गए जोखिम संकेत (Risk Signals): {', '.join(s.risk_signals) if s.risk_signals else 'कोई गंभीर जोखिम संकेत नहीं मिला'}",
|
f"पहचाने गए जोखिम संकेत (Risk Signals): {', '.join(s.risk_signals) if s.risk_signals else 'कोई गंभीर जोखिम संकेत नहीं मिला'}",
|
||||||
f"क्लिनिकल अर्जेंसी (Ruby Hospital Triage): {s.recommended_urgency.upper()}{idrs_info} ({', '.join(s.urgency_reasons)})",
|
f"क्लिनिकल अर्जेंसी (Sancheti Hospital Triage): {s.recommended_urgency.upper()}{idrs_info} ({', '.join(s.urgency_reasons)})",
|
||||||
"क्लीनिकल राय व मार्गदर्शन: नियमित फास्टिंग/PP शुगर जांच एवं त्रैमासिक HbA1c टेस्ट कराने की सलाह। Ruby Hospital विशेषज्ञ डॉक्टर से परामर्श अनुशंसित।",
|
"क्लीनिकल राय व मार्गदर्शन: नियमित फास्टिंग/PP शुगर जांच एवं त्रैमासिक HbA1c टेस्ट कराने की सलाह। Sancheti Hospital विशेषज्ञ डॉक्टर से परामर्श अनुशंसित।",
|
||||||
"नोट: यह केवल AI प्री-स्क्रीनिंग सारांश है, यह कोई मेडिकल डायग्नोसिस नहीं है। चिकित्सक द्वारा जांच आवश्यक है।"
|
"नोट: यह केवल AI प्री-स्क्रीनिंग सारांश है, यह कोई मेडिकल डायग्नोसिस नहीं है। चिकित्सक द्वारा जांच आवश्यक है।"
|
||||||
]
|
]
|
||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
@@ -296,7 +296,7 @@ class SummaryGenerator:
|
|||||||
f"गरोदरपणाचा इतिहास: {'होय (Positive)' if preg is True else ('नाही (Negative)' if preg is False else 'लागू नाही')}{', गरोदरपणातील मधुमेह: होय' if gest is True else ''}",
|
f"गरोदरपणाचा इतिहास: {'होय (Positive)' if preg is True else ('नाही (Negative)' if preg is False else 'लागू नाही')}{', गरोदरपणातील मधुमेह: होय' if gest is True else ''}",
|
||||||
f"संभाव्य जोखीम घटक: {', '.join(s.risk_signals) if s.risk_signals else 'कोणतेही गंभीर धोक्याचे संकेत नाहीत'}",
|
f"संभाव्य जोखीम घटक: {', '.join(s.risk_signals) if s.risk_signals else 'कोणतेही गंभीर धोक्याचे संकेत नाहीत'}",
|
||||||
f"क्लिनिकल वर्गवारी / प्राधान्य (Triage): {s.recommended_urgency.upper()} ({', '.join(s.urgency_reasons)})",
|
f"क्लिनिकल वर्गवारी / प्राधान्य (Triage): {s.recommended_urgency.upper()} ({', '.join(s.urgency_reasons)})",
|
||||||
"वैद्यकीय सल्ला: नियमित फास्टिंग/PPBS व तीन महिन्यांची HbA1c तपासणी करून घेणे. दीनानाथ मंगेशकर हॉस्पिटल तज्ज्ञ डॉक्टरांचा सल्ला घेणे.",
|
"वैद्यकीय सल्ला: नियमित फास्टिंग/PPBS व तीन महिन्यांची HbA1c तपासणी करून घेणे. संचेती हॉस्पिटल तज्ज्ञ डॉक्टरांचा सल्ला घेणे.",
|
||||||
"टीप: हा केवळ AI पूर्व-तपासणी सारांश आहे. प्रत्यक्ष वैद्यकीय तपासणी आवश्यक आहे."
|
"टीप: हा केवळ AI पूर्व-तपासणी सारांश आहे. प्रत्यक्ष वैद्यकीय तपासणी आवश्यक आहे."
|
||||||
]
|
]
|
||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
@@ -327,7 +327,7 @@ class SummaryGenerator:
|
|||||||
f"Risk Signals Identified: {', '.join(s.risk_signals) if s.risk_signals else 'None'}",
|
f"Risk Signals Identified: {', '.join(s.risk_signals) if s.risk_signals else 'None'}",
|
||||||
f"Emergency Escalation: {'YES - IMMEDIATE CARE REQUIRED' if s.emergency_escalation else 'NO'}",
|
f"Emergency Escalation: {'YES - IMMEDIATE CARE REQUIRED' if s.emergency_escalation else 'NO'}",
|
||||||
f"Recommended Clinician Urgency: {s.recommended_urgency.upper()} (Rationale: {', '.join(s.urgency_reasons)})",
|
f"Recommended Clinician Urgency: {s.recommended_urgency.upper()} (Rationale: {', '.join(s.urgency_reasons)})",
|
||||||
"Clinical Impression: Pre-screening completed. Recommend comprehensive metabolic panel (FBS/PPBS, HbA1c) and clinician consultation at Ruby Hospital.",
|
"Clinical Impression: Pre-screening completed. Recommend comprehensive metabolic panel (FBS/PPBS, HbA1c) and clinician consultation at Sancheti Hospital.",
|
||||||
"Disclaimer: AI-generated pre-screening summary for human physician review. Not a diagnostic decision."
|
"Disclaimer: AI-generated pre-screening summary for human physician review. Not a diagnostic decision."
|
||||||
]
|
]
|
||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Ruby Hospital — Admin Consultations Portal</title>
|
<title>Sancheti Hospital — Admin Consultations Portal</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap"
|
||||||
rel="stylesheet">
|
rel="stylesheet">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/ruby_logo.png?v=ruby">
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/sancheti_logo.png?v=sancheti">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="/static/ruby_logo.png?v=ruby">
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/sancheti_logo.png?v=sancheti">
|
||||||
<link rel="shortcut icon" href="/static/favicon.ico?v=ruby">
|
<link rel="shortcut icon" href="/static/sancheti_logo.png?v=sancheti">
|
||||||
<link rel="apple-touch-icon" href="/static/ruby_logo.png?v=ruby">
|
<link rel="apple-touch-icon" href="/static/sancheti_logo.png?v=sancheti">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
@@ -733,9 +733,11 @@
|
|||||||
LOGIN VIEW
|
LOGIN VIEW
|
||||||
========================================== -->
|
========================================== -->
|
||||||
<div id="login-view" class="login-container" style="display: none;">
|
<div id="login-view" class="login-container" style="display: none;">
|
||||||
<img src="/static/ruby_logo.png?v=ruby" alt="Ruby Hospital"
|
<div style="background: #ffffff; border-radius: 16px; padding: 12px 24px; display: inline-flex; align-items: center; justify-content: center; margin: 0 auto 16px auto; box-shadow: 0 4px 16px rgba(14, 165, 168, 0.2); border: 1.5px solid rgba(14, 165, 168, 0.25);">
|
||||||
style="width: 72px; height: 72px; border-radius: 16px; object-fit: contain; margin: 0 auto 14px auto; display: block; box-shadow: 0 4px 14px rgba(14, 165, 168, 0.25); border: 1px solid rgba(14, 165, 168, 0.2); background: #ffffff; padding: 4px;">
|
<img src="/static/sancheti_logo.png?v=sancheti_v4" alt="Sancheti Hospital"
|
||||||
<h2>Ruby Hospital Admin</h2>
|
style="height: 56px; width: auto; max-width: 240px; object-fit: contain; display: block;">
|
||||||
|
</div>
|
||||||
|
<h2>Sancheti Hospital Admin</h2>
|
||||||
<p>Sign in to review clinical voice consultations & patient triage reports</p>
|
<p>Sign in to review clinical voice consultations & patient triage reports</p>
|
||||||
|
|
||||||
<div id="login-error" class="login-error-msg"></div>
|
<div id="login-error" class="login-error-msg"></div>
|
||||||
@@ -767,10 +769,10 @@
|
|||||||
<!-- Top Header -->
|
<!-- Top Header -->
|
||||||
<header class="admin-header">
|
<header class="admin-header">
|
||||||
<a href="/" class="brand-wrap">
|
<a href="/" class="brand-wrap">
|
||||||
<img src="/static/ruby_logo.png?v=ruby" alt="Ruby Hospital"
|
<img src="/static/sancheti_logo.png?v=sancheti_v4" alt="Sancheti Hospital"
|
||||||
style="width: 42px; height: 42px; border-radius: 10px; object-fit: contain; box-shadow: 0 2px 8px rgba(14, 165, 168, 0.2); background: #ffffff; padding: 2px;">
|
style="height: 38px; width: auto; max-width: 170px; border-radius: 8px; object-fit: contain; box-shadow: 0 2px 8px rgba(14, 165, 168, 0.2); background: #ffffff; padding: 4px 10px; border: 1px solid rgba(14, 165, 168, 0.15);">
|
||||||
<div class="brand-text">
|
<div class="brand-text">
|
||||||
<h1>Ruby Hospital — Admin Portal</h1>
|
<h1>Sancheti Hospital — Admin Portal</h1>
|
||||||
<p>Consultation Records & Clinical Triage Database</p>
|
<p>Consultation Records & Clinical Triage Database</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Ruby Hospital — Diabetes Dost 🩺</title>
|
<title>Sancheti Hospital — Diabetes Dost 🩺</title>
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/ruby_logo.png?v=ruby">
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/sancheti_logo.png?v=sancheti">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="/static/ruby_logo.png?v=ruby">
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/sancheti_logo.png?v=sancheti">
|
||||||
<link rel="shortcut icon" href="/static/favicon.ico?v=ruby">
|
<link rel="shortcut icon" href="/static/sancheti_logo.png?v=sancheti">
|
||||||
<link rel="apple-touch-icon" href="/static/ruby_logo.png?v=ruby">
|
<link rel="apple-touch-icon" href="/static/sancheti_logo.png?v=sancheti">
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link
|
<link
|
||||||
@@ -92,15 +92,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.brand-logo-img {
|
.brand-logo-img {
|
||||||
width: 44px;
|
height: 42px;
|
||||||
height: 44px;
|
width: auto;
|
||||||
border-radius: 12px;
|
max-width: 170px;
|
||||||
|
border-radius: 8px;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
box-shadow: 0 4px 12px rgba(14, 165, 168, 0.25);
|
box-shadow: 0 3px 10px rgba(14, 165, 168, 0.15);
|
||||||
border: 1px solid rgba(14, 165, 168, 0.2);
|
border: 1px solid rgba(14, 165, 168, 0.2);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
padding: 2px;
|
padding: 3px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-logo-icon {
|
.brand-logo-icon {
|
||||||
@@ -2048,9 +2049,9 @@
|
|||||||
======================================================== -->
|
======================================================== -->
|
||||||
<header class="main-header">
|
<header class="main-header">
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<img src="/static/ruby_logo.png?v=ruby" alt="Ruby Hospital Logo" class="brand-logo-img">
|
<img src="/static/sancheti_logo.png?v=sancheti_v4" alt="Sancheti Hospital Logo" class="brand-logo-img">
|
||||||
<div class="brand-titles">
|
<div class="brand-titles">
|
||||||
<h1>Ruby Hospital</h1>
|
<h1>Sancheti Hospital</h1>
|
||||||
<p>Diabetes Dost — Care Companion</p>
|
<p>Diabetes Dost — Care Companion</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -4125,7 +4126,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div style="font-size:0.68rem; font-weight:800; color:#0b8082; text-transform:uppercase; letter-spacing:0.5px;">
|
<div style="font-size:0.68rem; font-weight:800; color:#0b8082; text-transform:uppercase; letter-spacing:0.5px;">
|
||||||
🏥 Ruby Hospital
|
🏥 Sancheti Hospital
|
||||||
</div>
|
</div>
|
||||||
<h3 style="font-family:'Outfit',sans-serif; font-size:1.18rem; font-weight:800; color:#0f172a; margin:2px 0 0 0;">
|
<h3 style="font-family:'Outfit',sans-serif; font-size:1.18rem; font-weight:800; color:#0f172a; margin:2px 0 0 0;">
|
||||||
डॉक्टरांना WhatsApp सारांश पाठवा
|
डॉक्टरांना WhatsApp सारांश पाठवा
|
||||||
@@ -4223,10 +4224,12 @@
|
|||||||
onclick="if(event.target.id === 'admin-login-modal') closeAdminLoginModal()">
|
onclick="if(event.target.id === 'admin-login-modal') closeAdminLoginModal()">
|
||||||
<div
|
<div
|
||||||
style="background: #ffffff; border-radius: 16px; padding: 28px 24px; max-width: 400px; width: 100%; box-shadow: var(--shadow-lg); text-align: center; border: 1px solid var(--card-border);">
|
style="background: #ffffff; border-radius: 16px; padding: 28px 24px; max-width: 400px; width: 100%; box-shadow: var(--shadow-lg); text-align: center; border: 1px solid var(--card-border);">
|
||||||
<img src="/static/ruby_logo.png?v=ruby" alt="Ruby Hospital"
|
<div style="background: #ffffff; border-radius: 12px; padding: 8px 18px; display: inline-flex; align-items: center; justify-content: center; margin: 0 auto 14px auto; box-shadow: 0 4px 12px rgba(14, 165, 168, 0.2); border: 1px solid rgba(14, 165, 168, 0.2);">
|
||||||
style="width: 58px; height: 58px; border-radius: 14px; object-fit: contain; margin: 0 auto 12px auto; display: block; box-shadow: 0 4px 12px rgba(14, 165, 168, 0.25); border: 1px solid rgba(14, 165, 168, 0.2); background: #ffffff; padding: 3px;">
|
<img src="/static/sancheti_logo.png?v=sancheti_v4" alt="Sancheti Hospital"
|
||||||
|
style="height: 48px; width: auto; max-width: 200px; object-fit: contain; display: block;">
|
||||||
|
</div>
|
||||||
<h3 style="font-family: 'Outfit', sans-serif; font-size: 1.25rem; font-weight: 800; color: var(--blue-navy);">
|
<h3 style="font-family: 'Outfit', sans-serif; font-size: 1.25rem; font-weight: 800; color: var(--blue-navy);">
|
||||||
Ruby Hospital Admin
|
Sancheti Hospital Admin
|
||||||
</h3>
|
</h3>
|
||||||
<p style="font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; margin-bottom: 18px;">
|
<p style="font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; margin-bottom: 18px;">
|
||||||
Sign in to view all patient consultations & SQLite records
|
Sign in to view all patient consultations & SQLite records
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ def run_poona_hospital_voice_suite():
|
|||||||
# Assertions for Turn 3
|
# Assertions for Turn 3
|
||||||
assert "excessive_thirst" in sess.state.active_symptoms, "Thirst not captured!"
|
assert "excessive_thirst" in sess.state.active_symptoms, "Thirst not captured!"
|
||||||
assert "frequent_urination" in sess.state.active_symptoms, "Frequent urination not captured!"
|
assert "frequent_urination" in sess.state.active_symptoms, "Frequent urination not captured!"
|
||||||
assert ("Ruby Hospital" in resp3['doctor_text'] or "Deenanath Mangeshkar Hospital" in resp3['doctor_text'] or "Poona Hospital" in resp3['doctor_text']), "Did not recommend hospital!"
|
assert ("Sancheti Hospital" in resp3['doctor_text'] or "Ruby Hospital" in resp3['doctor_text'] or "Deenanath Mangeshkar Hospital" in resp3['doctor_text'] or "Poona Hospital" in resp3['doctor_text']), "Did not recommend hospital!"
|
||||||
assert sess.state.hospital_recommendation_given == True, "Hospital recommendation flag not True!"
|
assert sess.state.hospital_recommendation_given == True, "Hospital recommendation flag not True!"
|
||||||
assert "Blood Sugar Screening" in sess.state.tests_discussed, "Tests discussed not recorded!"
|
assert "Blood Sugar Screening" in sess.state.tests_discussed, "Tests discussed not recorded!"
|
||||||
print(" ✓ Step 3 PASS: Diabetes risk symptoms detected; awareness given; Ruby Hospital recommended.")
|
print(" ✓ Step 3 PASS: Diabetes risk symptoms detected; awareness given; Sancheti Hospital recommended.")
|
||||||
|
|
||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
# TEST 3: DYNAMIC QUESTION ANSWERING (DIET, MEDICINE TIMING, REMEDIES)
|
# TEST 3: DYNAMIC QUESTION ANSWERING (DIET, MEDICINE TIMING, REMEDIES)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ def clean_text_for_speech_audio(text: str) -> str:
|
|||||||
t = re.sub(r"\bFBS\b", " फास्टिंग ब्लड शुगर ", t, flags=re.IGNORECASE)
|
t = re.sub(r"\bFBS\b", " फास्टिंग ब्लड शुगर ", t, flags=re.IGNORECASE)
|
||||||
t = re.sub(r"\bPPBS\b", " पीपी ब्लड शुगर ", t, flags=re.IGNORECASE)
|
t = re.sub(r"\bPPBS\b", " पीपी ब्लड शुगर ", t, flags=re.IGNORECASE)
|
||||||
t = re.sub(r"\bBP\b", " ब्लड प्रेशर ", t, flags=re.IGNORECASE)
|
t = re.sub(r"\bBP\b", " ब्लड प्रेशर ", t, flags=re.IGNORECASE)
|
||||||
t = re.sub(r"\b(Ruby Hospital|Ruby Hall Clinic|Ruby Hall|Deenanath Mangeshkar Hospital|Poona Hospital)\b", " रुबी हॉस्पिटल ", t, flags=re.IGNORECASE)
|
t = re.sub(r"\b(Sancheti Hospital|Sancheti|Ruby Hospital|Ruby Hall Clinic|Ruby Hall|Deenanath Mangeshkar Hospital|Poona Hospital)\b", " संचेती हॉस्पिटल ", t, flags=re.IGNORECASE)
|
||||||
t = re.sub(r"\bMetformin\b", " मेटफॉर्मिन ", t, flags=re.IGNORECASE)
|
t = re.sub(r"\bMetformin\b", " मेटफॉर्मिन ", t, flags=re.IGNORECASE)
|
||||||
t = re.sub(r"\bInsulin\b", " इंसुलिन ", t, flags=re.IGNORECASE)
|
t = re.sub(r"\bInsulin\b", " इंसुलिन ", t, flags=re.IGNORECASE)
|
||||||
t = re.sub(r"\bParacetamol\b", " पैरासिटामोल ", t, flags=re.IGNORECASE)
|
t = re.sub(r"\bParacetamol\b", " पैरासिटामोल ", t, flags=re.IGNORECASE)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"categories": {
|
"categories": {
|
||||||
"loss_of_consciousness": {
|
"loss_of_consciousness": {
|
||||||
"severity": "critical",
|
"severity": "critical",
|
||||||
"action_hi": "बेहोशी, चक्कर खाकर गिरना या चेतना खोना तुरंत चिकित्सकीय ध्यान की मांग करता है। कृपया तत्काल Ruby Hospital इमरजेंसी या 112/108 एम्बुलेंस को कॉल करें।",
|
"action_hi": "बेहोशी, चक्कर खाकर गिरना या चेतना खोना तुरंत चिकित्सकीय ध्यान की मांग करता है। कृपया तत्काल Sancheti Hospital इमरजेंसी या 112/108 एम्बुलेंस को कॉल करें।",
|
||||||
"keywords_devanagari": [
|
"keywords_devanagari": [
|
||||||
"बेहोश", "बेहोशी", "बेहोश हो गया", "चक्कर खाकर गिर गया", "होश खो बैठा", "आंखों के आगे अंधेरा छा गया", "अचेत", "मूर्छित", "होश में नहीं", "बेसुध"
|
"बेहोश", "बेहोशी", "बेहोश हो गया", "चक्कर खाकर गिर गया", "होश खो बैठा", "आंखों के आगे अंधेरा छा गया", "अचेत", "मूर्छित", "होश में नहीं", "बेसुध"
|
||||||
],
|
],
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
},
|
},
|
||||||
"chest_pain": {
|
"chest_pain": {
|
||||||
"severity": "critical",
|
"severity": "critical",
|
||||||
"action_hi": "सीने या दिल में तेज दर्द, दबाव या हार्ट अटैक के लक्षण एक अति-गंभीर मेडिकल इमरजेंसी हैं। कृपया तुरंत Ruby Hospital के इमरजेंसी विभाग में जाएँ।",
|
"action_hi": "सीने या दिल में तेज दर्द, दबाव या हार्ट अटैक के लक्षण एक अति-गंभीर मेडिकल इमरजेंसी हैं। कृपया तुरंत Sancheti Hospital के इमरजेंसी विभाग में जाएँ।",
|
||||||
"keywords_devanagari": [
|
"keywords_devanagari": [
|
||||||
"सीने में दर्द", "छाती में दर्द", "छाती में बहुत तेज दर्द", "दिल का दौरा", "हार्ट अटैक",
|
"सीने में दर्द", "छाती में दर्द", "छाती में बहुत तेज दर्द", "दिल का दौरा", "हार्ट अटैक",
|
||||||
"सीने में भारीपन", "सीने में दबाव", "दिल में दर्द", "छाती दब रही है", "छाती में जकड़न"
|
"सीने में भारीपन", "सीने में दबाव", "दिल में दर्द", "छाती दब रही है", "छाती में जकड़न"
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Reference in New Issue
Block a user