fix: connect all UI hooks and resolve ReferenceErrors (v4)
Build Curio HMS / build-and-deploy (push) Has been cancelled
Details
Build Curio HMS / build-and-deploy (push) Has been cancelled
Details
This commit is contained in:
parent
3b0115bbac
commit
ca69905915
32
dashboard.js
32
dashboard.js
|
|
@ -238,6 +238,38 @@ window.printSummary = () => {
|
|||
alert(`🖨️ Printing Handover Note:\n\n${summary}`);
|
||||
};
|
||||
|
||||
// 7. Missing UI Hooks (Repaired)
|
||||
window.openHistory = () => {
|
||||
const name = document.querySelector(".current-patient h1").innerText.split(' (')[0];
|
||||
alert(`📂 Loading Patient History for ${name}...\n\n- Visit (05/12/26): Chronic Gastritis\n- Lab (05/10/26): HbA1c 7.2% (Warning)`);
|
||||
};
|
||||
|
||||
window.openConsultation = () => {
|
||||
const modal = document.getElementById("consultationModal");
|
||||
if (modal) {
|
||||
// Auto-fill diagnosis based on triage context
|
||||
const meta = document.querySelector(".patient-meta").innerText;
|
||||
document.getElementById("rxDiagnosis").value = meta.split(' • ')[1] || "";
|
||||
modal.style.display = "block";
|
||||
}
|
||||
};
|
||||
|
||||
// 8. Sidebar Toggle
|
||||
window.toggleSidebar = () => {
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
if (!sidebar) return;
|
||||
if (sidebar.style.display === 'flex') {
|
||||
sidebar.style.display = 'none';
|
||||
} else {
|
||||
sidebar.style.display = 'flex';
|
||||
sidebar.style.position = 'fixed';
|
||||
sidebar.style.top = '50px';
|
||||
sidebar.style.width = '100%';
|
||||
sidebar.style.height = 'calc(100vh - 50px)';
|
||||
sidebar.style.zIndex = '999';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Close Modals
|
||||
if (closeModal) closeModal.onclick = () => modal.style.display = "none";
|
||||
|
|
|
|||
Loading…
Reference in New Issue