Update Inamdar Hospital Diabetic Dost

This commit is contained in:
Sanika Gurav
2026-10-16 16:13:15 +05:30
parent 100e36cc84
commit a078f3e51e
14 changed files with 65 additions and 62 deletions
+5 -2
View File
@@ -93,6 +93,9 @@ ADMIN_HTML_PATH = TEMPLATES_DIR / "admin.html"
@app.get("/favicon.ico", include_in_schema=False)
async def favicon_endpoint():
fav_candidate = STATIC_DIR / "inamdar_logo.png"
if fav_candidate.exists():
return FileResponse(fav_candidate, media_type="image/png")
fav_candidate = STATIC_DIR / "sancheti_logo.png"
if fav_candidate.exists():
return FileResponse(fav_candidate, media_type="image/png")
@@ -148,8 +151,8 @@ async def health_check():
gpu_name = "CPU Mode"
return {
"status": "online",
"app_name": "Sancheti Hospital — Diabetes Dost",
"hospital_name": "Sancheti Hospital",
"app_name": "Inamdar Hospital — Diabetes Dost",
"hospital_name": "Inamdar Hospital",
"motto": "॥ आरोग्यक्षेमं वहाम्यहम् ॥",
"bot_name": "Diabetes Dost",
"language": "hi-IN",
@@ -37,25 +37,25 @@ EMERGENCY_TRIGGERS: List[Dict[str, Any]] = [
"id": "EMERGENCY_CHEST_PAIN",
"category": "cardiac_emergency",
"patterns": [r"सीने.*दर्द", r"छाती.*दर्द", r"छातीत.*दुख", r"chest.*pain", r"हार्ट.*अटैक", r"heart.*attack", r"बांह.*दर्द", r"छाती.*भारी"],
"response": "सावधानी: सीने में तेज दर्द या दबाव एक गंभीर आपातकालीन स्थिति (Heart Emergency) हो सकती है। कृपया तुरंत Sancheti Hospital के इमरजेंसी विभाग में जाएं या एम्बुलेंस बुलाएं। खुद गाड़ी न चलाएं और तुरंत डॉक्टरी सहायता लें।"
"response": "सावधानी: सीने में तेज दर्द या दबाव एक गंभीर आपातकालीन स्थिति (Heart Emergency) हो सकती है। कृपया तुरंत Inamdar Hospital के इमरजेंसी विभाग में जाएं या एम्बुलेंस बुलाएं। खुद गाड़ी न चलाएं और तुरंत डॉक्टरी सहायता लें।"
},
{
"id": "EMERGENCY_BREATHING",
"category": "respiratory_emergency",
"patterns": [r"सांस.*तकलीफ", r"दम.*घुट", r"सांस.*नहीं आ", r"breath.*difficult", r"सांस.*फूलना.*ज्यादा", r"श्वास.*त्रास"],
"response": "महत्वपूर्ण चेतावनी: सांस लेने में अत्यधिक तकलीफ या दम घुटना गंभीर स्थिति है। कृपया तुरंत सीधे बैठें, खिड़की या खुली हवा में आएं और बिना देरी किए Sancheti Hospital के आपातकालीन कक्ष (Emergency Department) में संपर्क करें।"
"response": "महत्वपूर्ण चेतावनी: सांस लेने में अत्यधिक तकलीफ या दम घुटना गंभीर स्थिति है। कृपया तुरंत सीधे बैठें, खिड़की या खुली हवा में आएं और बिना देरी किए Inamdar Hospital के आपातकालीन कक्ष (Emergency Department) में संपर्क करें।"
},
{
"id": "EMERGENCY_SEVERE_HYPO",
"category": "severe_hypoglycemia",
"patterns": [r"शुगर.*\b(?:30|40|50)\b", r"sugar.*\b(?:30|40|50)\b", r"शुगर.*कम.*बेहोश", r"गंभीर.*लो.*शुगर"],
"response": "आपातकालीन चेतावनी: ब्लड शुगर का स्तर बहुत खतरनाक रूप से कम हो गया है। यदि मरीज होश में है तो तुरंत 3-4 चम्मच चीनी, ग्लूकोज पानी या मीठा जूस दें। यदि मरीज अचेत हो तो मुंह में कुछ न डालें और तुरंत Sancheti Hospital इमरजेंसी में ले जाएं।"
"response": "आपातकालीन चेतावनी: ब्लड शुगर का स्तर बहुत खतरनाक रूप से कम हो गया है। यदि मरीज होश में है तो तुरंत 3-4 चम्मच चीनी, ग्लूकोज पानी या मीठा जूस दें। यदि मरीज अचेत हो तो मुंह में कुछ न डालें और तुरंत Inamdar Hospital इमरजेंसी में ले जाएं।"
},
{
"id": "EMERGENCY_STROKE_NEURO",
"category": "stroke_emergency",
"patterns": [r"बेहोश", r"अचेत", r"unconscious", r"लकवा", r"चेहरा.*टेढ़ा", r"बोली.*लड़खड़ा", r"stroke", r"paralysis", r"पक्षाघात"],
"response": "अति आवश्यक चेतावनी: अचानक बेहोशी, चेहरे का टेढ़ापन या बोली लड़खड़ाना स्ट्रोक (Stroke) या न्यूरोलॉजिकल इमरजेंसी के लक्षण हो सकते हैं। रोगी को तुरंत Sancheti Hospital इमरजेंसी विभाग ले जाएं।"
"response": "अति आवश्यक चेतावनी: अचानक बेहोशी, चेहरे का टेढ़ापन या बोली लड़खड़ाना स्ट्रोक (Stroke) या न्यूरोलॉजिकल इमरजेंसी के लक्षण हो सकते हैं। रोगी को तुरंत Inamdar Hospital इमरजेंसी विभाग ले जाएं।"
}
]
@@ -271,11 +271,11 @@ class StructuredMedicalState:
# =====================================================================
# 4. CLINICAL CONVERSATION SESSION (SANCHETI HOSPITAL ASSISTANT)
# 4. CLINICAL CONVERSATION SESSION (INAMDAR HOSPITAL ASSISTANT)
# =====================================================================
class ClinicalConversationSession:
"""
Sancheti Hospital Continuous Conversational Medical Assistant.
Inamdar Hospital Continuous Conversational Medical Assistant.
"""
def __init__(self, session_id: Optional[str] = None):
self.session_id = session_id or str(uuid.uuid4())[:8]
@@ -570,14 +570,14 @@ class ClinicalConversationSession:
resp = f"{ack_name}बताइए, आपको यह तकलीफ कब से हो रही है?"
return self._format_response("ACK_DEMOGRAPHICS_CONTINUE", "clinical_progression", resp)
# 5. Check Diabetes Risk Symptoms & Provide Awareness + Sancheti Hospital Recommendation
# 5. Check Diabetes Risk Symptoms & Provide Awareness + Inamdar Hospital Recommendation
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 ["प्यास लगती", "पेशाब आता", "तहान", "लघवी", "थकान और कमजोरी", "वजन कम"])
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.hospital_recommendation_given = True
self.state.tests_discussed.append("Blood Sugar Screening")
resp = f"{name_prefix}बहुत अधिक प्यास लगना और बार-बार पेशाब आना ब्लड शुगर (डायबिटीज) से संबंधित लक्षण भी हो सकते हैं। इसलिए ब्लड शुगर और आवश्यक जांचों की जरूरत हो सकती है। आप Sancheti Hospital में डॉक्टर से परामर्श और जरूरी टेस्ट के लिए संपर्क कर सकते हैं।"
resp = f"{name_prefix}बहुत अधिक प्यास लगना और बार-बार पेशाब आना ब्लड शुगर (डायबिटीज) से संबंधित लक्षण भी हो सकते हैं। इसलिए ब्लड शुगर और आवश्यक जांचों की जरूरत हो सकती है। आप Inamdar Hospital में डॉक्टर से परामर्श और जरूरी टेस्ट के लिए संपर्क कर सकते हैं।"
return self._format_response("DIABETES_AWARENESS_POONA", "diabetes_awareness", resp)
# 6. Multi-Symptom Risk Assessment
@@ -615,10 +615,10 @@ class ClinicalConversationSession:
resp = f"{name_prefix}Insulin का इंजेक्शन मुख्य भोजन से 15 से 20 मिनट पहले लिया जाता है।"
return self._format_response("MED_TIMING_INSULIN", "medication", resp)
# D. Lab Test / Blood Test / Consultation Inquiries -> Recommend Sancheti Hospital
# D. Lab Test / Blood Test / Consultation Inquiries -> Recommend Inamdar Hospital
if any(w in text_lower for w in ["रक्त तपासणी", "ब्लड टेस्ट", "cbc", "खून की जांच", "test कब", "टेस्ट कब", "डॉक्टर को दिखाना", "जांच कहां"]):
self.state.hospital_recommendation_given = True
resp = f"{name_prefix}लक्षणों की सही पुष्टि के लिए CBC और ब्लड टेस्ट की सलाह दी जाती है। आप Sancheti Hospital में डॉक्टर से परामर्श और सभी जरूरी टेस्ट करवा सकते हैं।"
resp = f"{name_prefix}लक्षणों की सही पुष्टि के लिए CBC और ब्लड टेस्ट की सलाह दी जाती है। आप Inamdar Hospital में डॉक्टर से परामर्श और सभी जरूरी टेस्ट करवा सकते हैं।"
return self._format_response("POONA_HOSPITAL_TESTS", "investigation", resp)
# 8. Specialized Diabetes Flow (When Active)
@@ -646,11 +646,11 @@ class ClinicalConversationSession:
resp = f"ठीक है {name_prefix}आप {med_list} ले रहे हैं। इसे भोजन के तुरंत बाद लें। क्या आपको बार-बार पेशाब या बहुत प्यास लग रही है?"
return self._format_response("DIA_MED_ACK", "current_medications", resp)
# Follow-up with Sancheti Hospital Recommendation
# Follow-up with Inamdar Hospital Recommendation
if "hospital_advised_dia" not in self.state.asked_questions:
self.state.asked_questions.append("hospital_advised_dia")
self.state.hospital_recommendation_given = True
resp = f"{name_prefix}डायबिटीज को नियंत्रित रखने के लिए नियमित दवा लें और हर 3 महीने में HbA1c टेस्ट कराएं। आप Sancheti Hospital में डॉक्टर से परामर्श और चेकअप के लिए संपर्क कर सकते हैं।"
resp = f"{name_prefix}डायबिटीज को नियंत्रित रखने के लिए नियमित दवा लें और हर 3 महीने में HbA1c टेस्ट कराएं। आप Inamdar Hospital में डॉक्टर से परामर्श और चेकअप के लिए संपर्क कर सकते हैं।"
return self._format_response("DIA_POONA_RECOMMEND", "diabetes_summary", resp)
# 9. General Clinical Slot Investigation & Progression
@@ -678,12 +678,12 @@ class ClinicalConversationSession:
follow_up = "क्या इसके साथ चक्कर या कमजोरी भी महसूस हो रही है?"
return self._format_response(f"ASK_ASSOC_{primary_sym.upper()}", sym_data["category"], f"{name_prefix}{follow_up}")
# Guidance + Sancheti Hospital recommendation for persistent symptoms
# Guidance + Inamdar Hospital recommendation for persistent symptoms
dur_text = f"{dur} से " if dur else ""
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.hospital_recommendation_given = True
full_reply = f"{name_prefix}आपको {dur_text}{sym_data['name_hi']} है। {sym_data['guidance']} यदि तकलीफ 2-3 दिनों में ठीक न हो, तो आप Sancheti Hospital में डॉक्टर से परामर्श और जरूरी जांच के लिए संपर्क कर सकते हैं।"
full_reply = f"{name_prefix}आपको {dur_text}{sym_data['name_hi']} है। {sym_data['guidance']} यदि तकलीफ 2-3 दिनों में ठीक न हो, तो आप Inamdar Hospital में डॉक्टर से परामर्श और जरूरी जांच के लिए संपर्क कर सकते हैं।"
else:
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 ""
returning_speech = strip_all_punctuations(
f"नमस्ते {p_name_rec} जी Sancheti Hospital के Diabetes Dost में आपका दोबारा स्वागत है "
f"नमस्ते {p_name_rec} जी Inamdar Hospital के Diabetes Dost में आपका दोबारा स्वागत है "
f"हमारे रिकॉर्ड के अनुसार {meds_text}{sugar_text} आइए आज का आपका Regular Follow-up Check-up शुरू करते हैं "
f"{next_q.get('question_hi', '')}"
)
@@ -108,7 +108,7 @@ class EmergencyDetector:
primary_cat = matched_categories[0] if matched_categories else "general_acute"
verbal_response = (
"आपके बताए Symptoms गंभीर हो सकते हैं। कृपया अभी तुरंत Sancheti Hospital के Emergency Department "
"आपके बताए Symptoms गंभीर हो सकते हैं। कृपया अभी तुरंत Inamdar Hospital के Emergency Department "
"में संपर्क करें या Local Emergency Service (112 / 108) को Call करें। "
"आपकी Safety के लिए इस Screening को अभी रोक दिया जा रहा है।"
)
@@ -133,7 +133,7 @@ def generate_pdf(summary: Dict[str, Any]) -> bytes:
header_data = [
[
Paragraph("<b>🏥 Sancheti Hospital</b>", ps("Hdr1", fontName="Helvetica-Bold", fontSize=11, textColor=colors.white)),
Paragraph("<b>🏥 Inamdar 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)),
]
]
@@ -302,7 +302,7 @@ def generate_pdf(summary: Dict[str, Any]) -> bytes:
story.append(Paragraph(
"⚠️ 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. "
"Sancheti Hospital — ॥ आरोग्यक्षेमं वहाम्यहम् ॥",
"Inamdar Hospital — ॥ आरोग्यक्षेमं वहाम्यहम् ॥",
s_disclaimer
))
@@ -125,26 +125,26 @@ FOLLOWUP_TEMPLATES = {
"label": "Follow-up अपॉइंटमेंट रिमाइंडर",
"icon": "📅",
"mr": (
"🏥 *दीनानाथ मंगेशकर हॉस्पिटल — Diabetes Dost*\n\n"
"🏥 *इनामदार हॉस्पिटल — Diabetes Dost*\n\n"
"नमस्कार {name} जी! 🙏\n\n"
"📅 *Follow-up भेटीची आठवण*\n\n"
"तुमची Diabetes Dost AI pre-screening झाली आहे.\n"
"आता डॉक्टरांशी प्रत्यक्ष भेट घेणे महत्त्वाचे आहे!\n\n"
"🏥 *Sancheti Hospital OPD — Diabetes Care*\n"
"📞 अपॉइंटमेंट बुक करा: 020-28999999\n"
"🌐 ऑनलाईन: www.sanchetihospital.org\n\n"
"🏥 *Inamdar Hospital OPD — Diabetes Care*\n"
"📞 अपॉइंटमेंट बुक करा: 020-66811200\n"
"🌐 ऑनलाईन: www.inamdarhospital.com\n\n"
"Session ID: `{session_id}`\n\n"
"⚕️ हा अहवाल डॉक्टरांना दाखवा."
),
"hi": (
"🏥 *संचेती हॉस्पिटल — Diabetes Dost*\n\n"
"🏥 *इनामदार हॉस्पिटल — Diabetes Dost*\n\n"
"नमस्ते {name} जी! 🙏\n\n"
"📅 *Follow-up अपॉइंटमेंट रिमाइंडर*\n\n"
"आपकी Diabetes Dost AI pre-screening हो गई है।\n"
"अब डॉक्टर से मिलना जरूरी है!\n\n"
"🏥 *Sancheti Hospital OPD — Diabetes Care*\n"
"📞 अपॉइंटमेंट: 020-28999999\n"
"🌐 Online: www.sanchetihospital.org\n\n"
"🏥 *Inamdar Hospital OPD — Diabetes Care*\n"
"📞 अपॉइंटमेंट: 020-66811200\n"
"🌐 Online: www.inamdarhospital.com\n\n"
"Session ID: `{session_id}`\n\n"
"⚕️ यह रिपोर्ट डॉक्टर को दिखाएं।"
)
@@ -287,17 +287,17 @@ class WhatsAppDeliveryService:
f"📄 *अहवाल डाउनलोड करा:*\n"
f"Session ID: `{session_id}`\n\n"
f"⚠️ हा अहवाल AI-आधारित आहे. कृपया डॉक्टरांचा सल्ला घ्या.\n"
f"📞 संचेती हॉस्पिटल हेल्पलाईन: 020-28999999"
f"📞 इनामदार हॉस्पिटल हेल्पलाईन: 020-66811200"
)
else:
message_body = (
f"🏥 *Sancheti Hospital — Diabetes Dost*\n\n"
f"🏥 *Inamdar Hospital — Diabetes Dost*\n\n"
f"Hello {patient_name}! 🙏\n"
f"Your diabetes pre-screening report is ready.\n\n"
f"📄 *Download Report:*\n"
f"Session ID: `{session_id}`\n\n"
f"⚠️ This is an AI-assisted pre-screening. Please consult your doctor.\n"
f"📞 Sancheti Hospital Helpline: 020-28999999"
f"📞 Inamdar Hospital Helpline: 020-66811200"
)
if self.is_twilio_configured:
@@ -418,7 +418,7 @@ class WhatsAppDeliveryService:
pdf_block = f"\n📄 *Clinical PDF Report:* {pdf_url}" if pdf_url else ""
msg = (
f"🏥 *SANCHETI HOSPITAL*\n"
f"🏥 *INAMDAR HOSPITAL*\n"
f"🩺 *DIABETES DOST — PRE-SCREENING SUMMARY*\n"
f"━━━━━━━━━━━━━━━━━━━━━━━━\n"
f"👤 *Patient:* {p_name} | {p_age} yrs | {p_sex}\n"
@@ -434,7 +434,7 @@ class WhatsAppDeliveryService:
f"📝 *Clinician Handover Note:*\n"
f"{narrative}{pdf_block}\n\n"
f"━━━━━━━━━━━━━━━━━━━━━━━━\n"
f"⚕️ *Sancheti Hospital Clinical Triage Desk*\n"
f"⚕️ *Inamdar Hospital Clinical Triage Desk*\n"
f"🔗 Full EHR Record available in Hospital Admin Portal"
)
return msg
@@ -112,7 +112,7 @@ class SummaryGenerator:
try:
with open(txt_rel_path, "w", encoding="utf-8") as f:
f.write("======================================================================\n")
f.write(" SANCHETI HOSPITAL — CLINICAL TRIAGE REPORT\n")
f.write(" INAMDAR HOSPITAL — CLINICAL TRIAGE REPORT\n")
f.write("======================================================================\n\n")
f.write(f"Session ID: {session_state.session_id}\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"गर्भावस्था इतिहास (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"क्लिनिकल अर्जेंसी (Sancheti Hospital Triage): {s.recommended_urgency.upper()}{idrs_info} ({', '.join(s.urgency_reasons)})",
"क्लीनिकल राय व मार्गदर्शन: नियमित फास्टिंग/PP शुगर जांच एवं त्रैमासिक HbA1c टेस्ट कराने की सलाह। Sancheti Hospital विशेषज्ञ डॉक्टर से परामर्श अनुशंसित।",
f"क्लिनिकल अर्जेंसी (Inamdar Hospital Triage): {s.recommended_urgency.upper()}{idrs_info} ({', '.join(s.urgency_reasons)})",
"क्लीनिकल राय व मार्गदर्शन: नियमित फास्टिंग/PP शुगर जांच एवं त्रैमासिक HbA1c टेस्ट कराने की सलाह। Inamdar Hospital विशेषज्ञ डॉक्टर से परामर्श अनुशंसित।",
"नोट: यह केवल AI प्री-स्क्रीनिंग सारांश है, यह कोई मेडिकल डायग्नोसिस नहीं है। चिकित्सक द्वारा जांच आवश्यक है।"
]
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"संभाव्य जोखीम घटक: {', '.join(s.risk_signals) if s.risk_signals else 'कोणतेही गंभीर धोक्याचे संकेत नाहीत'}",
f"क्लिनिकल वर्गवारी / प्राधान्य (Triage): {s.recommended_urgency.upper()} ({', '.join(s.urgency_reasons)})",
"वैद्यकीय सल्ला: नियमित फास्टिंग/PPBS व तीन महिन्यांची HbA1c तपासणी करून घेणे. संचेती हॉस्पिटल तज्ज्ञ डॉक्टरांचा सल्ला घेणे.",
"वैद्यकीय सल्ला: नियमित फास्टिंग/PPBS व तीन महिन्यांची HbA1c तपासणी करून घेणे. इनामदार हॉस्पिटल तज्ज्ञ डॉक्टरांचा सल्ला घेणे.",
"टीप: हा केवळ AI पूर्व-तपासणी सारांश आहे. प्रत्यक्ष वैद्यकीय तपासणी आवश्यक आहे."
]
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"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)})",
"Clinical Impression: Pre-screening completed. Recommend comprehensive metabolic panel (FBS/PPBS, HbA1c) and clinician consultation at Sancheti Hospital.",
"Clinical Impression: Pre-screening completed. Recommend comprehensive metabolic panel (FBS/PPBS, HbA1c) and clinician consultation at Inamdar Hospital.",
"Disclaimer: AI-generated pre-screening summary for human physician review. Not a diagnostic decision."
]
return "\n".join(lines)
+9 -9
View File
@@ -4,16 +4,16 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sancheti Hospital — Admin Consultations Portal</title>
<title>Inamdar Hospital — Admin Consultations Portal</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<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"
rel="stylesheet">
<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/sancheti_logo.png?v=sancheti">
<link rel="shortcut icon" href="/static/sancheti_logo.png?v=sancheti">
<link rel="apple-touch-icon" href="/static/sancheti_logo.png?v=sancheti">
<link rel="icon" type="image/png" sizes="32x32" href="/static/inamdar_logo.png?v=inamdar_v1">
<link rel="icon" type="image/png" sizes="16x16" href="/static/inamdar_logo.png?v=inamdar_v1">
<link rel="shortcut icon" href="/static/inamdar_logo.png?v=inamdar_v1">
<link rel="apple-touch-icon" href="/static/inamdar_logo.png?v=inamdar_v1">
<style>
:root {
@@ -734,10 +734,10 @@
========================================== -->
<div id="login-view" class="login-container" style="display: none;">
<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);">
<img src="/static/sancheti_logo.png?v=sancheti_v4" alt="Sancheti Hospital"
<img src="/static/inamdar_logo.png?v=inamdar_v1" alt="Inamdar Hospital"
style="height: 56px; width: auto; max-width: 240px; object-fit: contain; display: block;">
</div>
<h2>Sancheti Hospital Admin</h2>
<h2>Inamdar Hospital Admin</h2>
<p>Sign in to review clinical voice consultations & patient triage reports</p>
<div id="login-error" class="login-error-msg"></div>
@@ -769,10 +769,10 @@
<!-- Top Header -->
<header class="admin-header">
<a href="/" class="brand-wrap">
<img src="/static/sancheti_logo.png?v=sancheti_v4" alt="Sancheti Hospital"
<img src="/static/inamdar_logo.png?v=inamdar_v1" alt="Inamdar Hospital"
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">
<h1>Sancheti Hospital — Admin Portal</h1>
<h1>Inamdar Hospital — Admin Portal</h1>
<p>Consultation Records & Clinical Triage Database</p>
</div>
</a>
+10 -10
View File
@@ -4,11 +4,11 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sancheti Hospital — Diabetes Dost 🩺</title>
<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/sancheti_logo.png?v=sancheti">
<link rel="shortcut icon" href="/static/sancheti_logo.png?v=sancheti">
<link rel="apple-touch-icon" href="/static/sancheti_logo.png?v=sancheti">
<title>Inamdar Hospital — Diabetes Dost 🩺</title>
<link rel="icon" type="image/png" sizes="32x32" href="/static/inamdar_logo.png?v=inamdar_v1">
<link rel="icon" type="image/png" sizes="16x16" href="/static/inamdar_logo.png?v=inamdar_v1">
<link rel="shortcut icon" href="/static/inamdar_logo.png?v=inamdar_v1">
<link rel="apple-touch-icon" href="/static/inamdar_logo.png?v=inamdar_v1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
@@ -2049,9 +2049,9 @@
======================================================== -->
<header class="main-header">
<div class="header-left">
<img src="/static/sancheti_logo.png?v=sancheti_v4" alt="Sancheti Hospital Logo" class="brand-logo-img">
<img src="/static/inamdar_logo.png?v=inamdar_v1" alt="Inamdar Hospital Logo" class="brand-logo-img">
<div class="brand-titles">
<h1>Sancheti Hospital</h1>
<h1>Inamdar Hospital</h1>
<p>Diabetes Dost — Care Companion</p>
</div>
</div>
@@ -4126,7 +4126,7 @@
</div>
<div>
<div style="font-size:0.68rem; font-weight:800; color:#0b8082; text-transform:uppercase; letter-spacing:0.5px;">
🏥 Sancheti Hospital
🏥 Inamdar Hospital
</div>
<h3 style="font-family:'Outfit',sans-serif; font-size:1.18rem; font-weight:800; color:#0f172a; margin:2px 0 0 0;">
डॉक्टरांना WhatsApp सारांश पाठवा
@@ -4225,11 +4225,11 @@
<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);">
<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);">
<img src="/static/sancheti_logo.png?v=sancheti_v4" alt="Sancheti Hospital"
<img src="/static/inamdar_logo.png?v=inamdar_v1" alt="Inamdar 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);">
Sancheti Hospital Admin
Inamdar Hospital Admin
</h3>
<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
@@ -69,10 +69,10 @@ def run_poona_hospital_voice_suite():
# Assertions for Turn 3
assert "excessive_thirst" in sess.state.active_symptoms, "Thirst not captured!"
assert "frequent_urination" in sess.state.active_symptoms, "Frequent urination not captured!"
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 ("Inamdar Hospital" in resp3['doctor_text'] or "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 "Blood Sugar Screening" in sess.state.tests_discussed, "Tests discussed not recorded!"
print(" ✓ Step 3 PASS: Diabetes risk symptoms detected; awareness given; Sancheti Hospital recommended.")
print(" ✓ Step 3 PASS: Diabetes risk symptoms detected; awareness given; Inamdar Hospital recommended.")
# -------------------------------------------------------------
# TEST 3: DYNAMIC QUESTION ANSWERING (DIET, MEDICINE TIMING, REMEDIES)
+1 -1
View File
@@ -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"\bPPBS\b", " पीपी ब्लड शुगर ", t, flags=re.IGNORECASE)
t = re.sub(r"\bBP\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"\b(Inamdar Hospital|Inamdar Multispeciality Hospital|Inamdar|CIMET'S INAMDAR|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"\bInsulin\b", " इंसुलिन ", t, flags=re.IGNORECASE)
t = re.sub(r"\bParacetamol\b", " पैरासिटामोल ", t, flags=re.IGNORECASE)
+2 -2
View File
@@ -4,7 +4,7 @@
"categories": {
"loss_of_consciousness": {
"severity": "critical",
"action_hi": "बेहोशी, चक्कर खाकर गिरना या चेतना खोना तुरंत चिकित्सकीय ध्यान की मांग करता है। कृपया तत्काल Sancheti Hospital इमरजेंसी या 112/108 एम्बुलेंस को कॉल करें।",
"action_hi": "बेहोशी, चक्कर खाकर गिरना या चेतना खोना तुरंत चिकित्सकीय ध्यान की मांग करता है। कृपया तत्काल Inamdar Hospital इमरजेंसी या 112/108 एम्बुलेंस को कॉल करें।",
"keywords_devanagari": [
"बेहोश", "बेहोशी", "बेहोश हो गया", "चक्कर खाकर गिर गया", "होश खो बैठा", "आंखों के आगे अंधेरा छा गया", "अचेत", "मूर्छित", "होश में नहीं", "बेसुध"
],
@@ -35,7 +35,7 @@
},
"chest_pain": {
"severity": "critical",
"action_hi": "सीने या दिल में तेज दर्द, दबाव या हार्ट अटैक के लक्षण एक अति-गंभीर मेडिकल इमरजेंसी हैं। कृपया तुरंत Sancheti Hospital के इमरजेंसी विभाग में जाएँ।",
"action_hi": "सीने या दिल में तेज दर्द, दबाव या हार्ट अटैक के लक्षण एक अति-गंभीर मेडिकल इमरजेंसी हैं। कृपया तुरंत Inamdar Hospital के इमरजेंसी विभाग में जाएँ।",
"keywords_devanagari": [
"सीने में दर्द", "छाती में दर्द", "छाती में बहुत तेज दर्द", "दिल का दौरा", "हार्ट अटैक",
"सीने में भारीपन", "सीने में दबाव", "दिल में दर्द", "छाती दब रही है", "छाती में जकड़न"
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 16 KiB