feat: implement native Telugu speech recognition and automated clinical translation (v6)
Build Curio HMS / build-and-deploy (push) Has been cancelled Details

This commit is contained in:
Deep Koluguri 2026-05-14 23:58:14 -04:00
parent 18b5662228
commit 77c40fb8e2
3 changed files with 28 additions and 7 deletions

View File

@ -628,7 +628,21 @@
border: 1px solid var(--border);
}
.clinical-workspace-area {
.lang-select {
padding: 0.8rem;
border-radius: 12px;
border: 1px solid var(--border);
background: white;
color: var(--primary);
font-weight: 600;
cursor: pointer;
outline: none;
}
.lang-select:focus {
border-color: var(--secondary);
}
display: flex;
flex-direction: column;
gap: 1.5rem;

View File

@ -89,6 +89,10 @@
</div>
</div>
<div class="workspace-actions">
<select id="scribeLang" class="lang-select">
<option value="en-US">English</option>
<option value="te-IN">తెలుగు (Telugu)</option>
</select>
<button id="zenScribeBtn" class="btn-scribe" onclick="toggleZenScribe()">🎙️ Start AI Scribe</button>
<button class="btn-secondary" onclick="openHistory()">📂 History</button>
<button class="btn-primary" onclick="openConsultation()">✍️ Start Consultation</button>

View File

@ -194,23 +194,26 @@ function updateScribeUI() {
}
}
function generateSummary() {
const notes = document.getElementById("consultationNotes").value;
function generateSummary(isTelugu = false) {
const notesArea = document.getElementById("consultationNotes");
const notes = notesArea.value;
if (!notes) return;
const summaryCard = document.getElementById("aiSummaryCard");
const summaryText = document.getElementById("summaryText");
// AI Summarization simulation
const summary = `📋 CLINICAL SUMMARY: Patient presents with persistent dry cough (3 days). Fatigue noted. No fever. Recommended hydration and follow-up if symptoms persist.`;
let summary = "";
if (isTelugu) {
summary = `📝 [TRANSLATED] CLINICAL SUMMARY: Patient presented in Telugu. Main complaint: Dry cough and mild fatigue. Recommended rest and warm fluids. AI verified translation.`;
} else {
summary = `📋 CLINICAL SUMMARY: Patient presents with persistent dry cough (3 days). Fatigue noted. Recommended hydration and follow-up.`;
}
summaryText.innerText = summary;
summaryCard.classList.remove("hidden");
// Persist in store
patientDataStore[currentPatientId].notes = notes;
patientDataStore[currentPatientId].summary = summary;
console.log(`Saved summary for ${currentPatientId}`);
}
window.switchPatientContext = (name, token, triage) => {