new updates
Build Curio HMS / build-and-deploy (push) Successful in 47s
Details
Build Curio HMS / build-and-deploy (push) Successful in 47s
Details
This commit is contained in:
parent
34ffbf6339
commit
c007523017
299
dashboard.css
299
dashboard.css
|
|
@ -943,9 +943,308 @@
|
|||
border-top: 1px solid var(--border);
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
/* Prescription modal */
|
||||
.rx-modal .rx-modal-content {
|
||||
max-width: 920px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.rx-modal .modal-header {
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.rx-modal .modal-header-text h2 {
|
||||
font-size: 1.35rem;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.rx-modal .modal-subtitle {
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-muted);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.rx-modal .close-modal {
|
||||
width: 2.25rem;
|
||||
height: 2.25rem;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--bg);
|
||||
font-size: 1.35rem;
|
||||
flex-shrink: 0;
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.rx-modal .close-modal:hover {
|
||||
background: var(--surface);
|
||||
border-color: var(--text-muted);
|
||||
}
|
||||
|
||||
.rx-voice-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 1rem;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.rx-record-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.rx-recording-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: var(--urgent);
|
||||
}
|
||||
|
||||
.rx-ai-draft {
|
||||
flex: 1 1 100%;
|
||||
padding: 0.75rem 1rem;
|
||||
background: rgba(37, 99, 235, 0.06);
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid rgba(37, 99, 235, 0.15);
|
||||
}
|
||||
|
||||
.rx-ai-draft h4 {
|
||||
font-size: 0.8rem;
|
||||
color: var(--secondary);
|
||||
margin-bottom: 0.35rem;
|
||||
}
|
||||
|
||||
.rx-ai-draft p {
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.rx-panels {
|
||||
display: grid;
|
||||
grid-template-columns: 1.4fr 1fr;
|
||||
gap: 1.5rem;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.rx-form-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.rx-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.rx-label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.rx-input,
|
||||
.rx-textarea {
|
||||
width: 100%;
|
||||
padding: 0.75rem 1rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg);
|
||||
color: var(--text-main);
|
||||
font-family: inherit;
|
||||
font-size: 0.95rem;
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.rx-input:focus,
|
||||
.rx-textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--secondary);
|
||||
background: var(--surface);
|
||||
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
|
||||
}
|
||||
|
||||
.rx-input::placeholder,
|
||||
.rx-textarea::placeholder {
|
||||
color: #94A3B8;
|
||||
}
|
||||
|
||||
.rx-table-head {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr 1fr;
|
||||
gap: 0.75rem;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
padding: 0 0.15rem;
|
||||
}
|
||||
|
||||
.med-row,
|
||||
.lab-row {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr 1fr;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.lab-row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.medicine-list .med-row:last-child,
|
||||
#labTestList .lab-row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.rx-add-btn {
|
||||
align-self: flex-start;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
padding: 0.55rem 1rem;
|
||||
border: 1px dashed var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
background: transparent;
|
||||
color: var(--secondary);
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.rx-add-btn:hover {
|
||||
background: rgba(37, 99, 235, 0.06);
|
||||
border-color: var(--secondary);
|
||||
}
|
||||
|
||||
.rx-sidebar {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 1.25rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.rx-sidebar-block + .rx-sidebar-block {
|
||||
padding-top: 1.25rem;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.rx-sidebar-title {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.rx-history-list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.65rem;
|
||||
}
|
||||
|
||||
.rx-history-list li {
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-main);
|
||||
line-height: 1.45;
|
||||
padding-bottom: 0.65rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.rx-history-list li:last-child {
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.rx-history-list strong {
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.rx-tips-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.rx-tip-btn {
|
||||
padding: 0.6rem 0.75rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--surface);
|
||||
color: var(--text-main);
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.rx-tip-btn:hover {
|
||||
border-color: var(--secondary);
|
||||
background: rgba(37, 99, 235, 0.04);
|
||||
color: var(--secondary);
|
||||
}
|
||||
|
||||
.rx-modal .modal-footer {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.rx-modal .modal-footer .btn {
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.rx-send-btn {
|
||||
min-width: 180px !important;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.rx-panels {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.rx-table-head {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.med-row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.rx-modal .modal-footer {
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.rx-modal .modal-footer .btn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile sidebar */
|
||||
.sidebar-mobile-toggle {
|
||||
display: none;
|
||||
|
|
|
|||
158
dashboard.html
158
dashboard.html
|
|
@ -350,88 +350,92 @@
|
|||
</table>
|
||||
</section>
|
||||
</div>
|
||||
<div id="consultationModal" class="modal">
|
||||
<div class="modal-content" style="width: 900px; max-width: 95%;">
|
||||
<div class="modal-header">
|
||||
<h2>Digital Prescription</h2>
|
||||
<span class="close-modal">×</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="voice-section">
|
||||
<button class="btn-secondary" id="startRecording"><span>🎤</span> Record Consultation</button>
|
||||
<div id="recordingStatus" class="recording-status hidden">
|
||||
<span class="pulse"></span> Recording...
|
||||
<div id="consultationModal" class="modal rx-modal">
|
||||
<div class="modal-content rx-modal-content">
|
||||
<header class="modal-header">
|
||||
<div class="modal-header-text">
|
||||
<h2>Digital Prescription</h2>
|
||||
<p class="modal-subtitle">Diagnosis, medicines, lab orders, and patient handoff</p>
|
||||
</div>
|
||||
<div id="aiInsights" class="ai-insights-box hidden">
|
||||
<h4>✨ AI Insights (Draft)</h4>
|
||||
<p id="insightText"></p>
|
||||
<button type="button" class="close-modal" aria-label="Close prescription">×</button>
|
||||
</header>
|
||||
<div class="modal-body">
|
||||
<div class="rx-voice-bar">
|
||||
<button type="button" class="btn btn-secondary rx-record-btn" id="startRecording">
|
||||
<span aria-hidden="true">🎤</span> Record consultation
|
||||
</button>
|
||||
<div id="recordingStatus" class="rx-recording-status hidden">
|
||||
<span class="pulse"></span> Recording in progress…
|
||||
</div>
|
||||
<div id="aiInsights" class="rx-ai-draft hidden">
|
||||
<h4>AI insights (draft)</h4>
|
||||
<p id="insightText"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rx-panels">
|
||||
<div class="rx-form-panel">
|
||||
<div class="rx-field">
|
||||
<label class="rx-label" for="rxDiagnosis">Diagnosis</label>
|
||||
<input type="text" id="rxDiagnosis" class="rx-input" placeholder="e.g. Viral fever, acute pharyngitis">
|
||||
</div>
|
||||
<div class="rx-field">
|
||||
<label class="rx-label">Medicines & dosages</label>
|
||||
<div class="rx-table-head med-head" aria-hidden="true">
|
||||
<span>Medicine</span>
|
||||
<span>Dosage</span>
|
||||
<span>Duration</span>
|
||||
</div>
|
||||
<div class="medicine-list" id="medicineList">
|
||||
<div class="med-row">
|
||||
<input type="text" placeholder="Medicine name" class="rx-input med-name">
|
||||
<input type="text" placeholder="1-0-1" class="rx-input med-dosage">
|
||||
<input type="text" placeholder="5 days" class="rx-input med-duration">
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="rx-add-btn" id="addMed">+ Add medicine</button>
|
||||
</div>
|
||||
<div class="rx-field">
|
||||
<label class="rx-label">Lab tests</label>
|
||||
<div id="labTestList">
|
||||
<div class="lab-row">
|
||||
<input type="text" placeholder="Test name (e.g. CBC, lipid profile)" class="rx-input lab-test-name">
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="rx-add-btn" id="addLabTest">+ Add lab test</button>
|
||||
</div>
|
||||
</div>
|
||||
<aside class="rx-sidebar">
|
||||
<section class="rx-sidebar-block">
|
||||
<h3 class="rx-sidebar-title">Patient history</h3>
|
||||
<ul class="rx-history-list">
|
||||
<li><strong>12 May 2026</strong> — Chronic gastritis. Rx: Pantoprazole.</li>
|
||||
<li><strong>05 Apr 2026</strong> — Lab: HbA1c 7.2% (high)</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="rx-sidebar-block">
|
||||
<h3 class="rx-sidebar-title">Quick health tips</h3>
|
||||
<div class="rx-tips-grid">
|
||||
<button type="button" class="rx-tip-btn" onclick="shareTip('diabetes')">🥗 Diabetes diet</button>
|
||||
<button type="button" class="rx-tip-btn" onclick="shareTip('hypertension')">🧘 BP control</button>
|
||||
<button type="button" class="rx-tip-btn" onclick="shareTip('viral')">💧 Hydration</button>
|
||||
<button type="button" class="rx-tip-btn" onclick="printTips()">🖨️ Print tips</button>
|
||||
</div>
|
||||
</section>
|
||||
<section class="rx-sidebar-block">
|
||||
<label class="rx-label" for="deptNote">Note to departments</label>
|
||||
<textarea id="deptNote" class="rx-textarea" placeholder="Instructions for pharmacy or lab…" rows="3"></textarea>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
<div class="doctor-panels-grid" style="display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; margin-top: 1rem;">
|
||||
<!-- Column 1: Clinical Actions -->
|
||||
<div class="clinical-inputs">
|
||||
<div class="input-group">
|
||||
<label>Diagnosis</label>
|
||||
<input type="text" id="rxDiagnosis" placeholder="e.g. Viral Fever">
|
||||
</div>
|
||||
<div class="medicine-list" id="medicineList">
|
||||
<label>Medicines & Dosages</label>
|
||||
<div class="med-row">
|
||||
<input type="text" placeholder="Medicine Name" class="med-name">
|
||||
<input type="text" placeholder="Dosage (e.g. 1-0-1)" class="med-dosage">
|
||||
<input type="text" placeholder="Duration" class="med-duration">
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-secondary" id="addMed">+ Add Medicine</button>
|
||||
|
||||
<div class="lab-requests-section" style="margin-top: 1.5rem;">
|
||||
<label>🔬 Request Lab Tests</label>
|
||||
<div id="labTestList">
|
||||
<div class="lab-row" style="display: flex; gap: 0.5rem; margin-bottom: 0.5rem;">
|
||||
<input type="text" placeholder="Test Name (e.g. CBC, Lipid)" class="lab-test-name" style="flex: 1; padding: 0.6rem; border-radius: 8px; border: 1px solid var(--border);">
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-secondary" id="addLabTest">+ Add Lab Test</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Column 2: Quick Reference & Sharing -->
|
||||
<div class="quick-reference-panel" style="background: var(--bg); padding: 1rem; border-radius: 12px; border: 1px solid var(--border);">
|
||||
<div class="panel-section">
|
||||
<label style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">📂 Patient History</label>
|
||||
<div class="history-list" style="font-size: 0.85rem; margin-top: 0.5rem;">
|
||||
<div class="history-item" style="padding: 0.5rem; border-bottom: 1px solid #e2e8f0;">
|
||||
<strong>12 May 2026</strong>: Chronic Gastritis. Rx: Pantoprazole.
|
||||
</div>
|
||||
<div class="history-item" style="padding: 0.5rem; border-bottom: 1px solid #e2e8f0;">
|
||||
<strong>05 Apr 2026</strong>: Lab Report: HbA1c 7.2% (High) 🔬
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-section" style="margin-top: 1.5rem;">
|
||||
<label style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">⚡ Quick Share Health Tips</label>
|
||||
<div class="tips-btns" style="display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem;">
|
||||
<button class="btn-small secondary" onclick="shareTip('diabetes')">🥗 Diabetes Diet</button>
|
||||
<button class="btn-small secondary" onclick="shareTip('hypertension')">🧘 BP Control</button>
|
||||
<button class="btn-small secondary" onclick="shareTip('viral')">💧 Hydration</button>
|
||||
<button class="btn-small secondary" onclick="printTips()">🖨️ Print Tips</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-section" style="margin-top: 1.5rem;">
|
||||
<label style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">📝 Note to Depts</label>
|
||||
<textarea id="deptNote" placeholder="Note to Pharmacy or Lab..." style="width: 100%; height: 60px; margin-top: 0.5rem; padding: 0.5rem; border-radius: 8px; border: 1px solid #e2e8f0; font-size: 0.85rem;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn-primary" id="sendRx">Send to WhatsApp</button>
|
||||
<footer class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" id="cancelRx">Cancel</button>
|
||||
<button type="button" class="btn btn-primary rx-send-btn" id="sendRx">Send to WhatsApp</button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="dashboard.js?v=19"></script>
|
||||
</main>
|
||||
<script src="dashboard.js?v=20"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
42
dashboard.js
42
dashboard.js
|
|
@ -3,7 +3,8 @@ const modal = document.getElementById("consultationModal");
|
|||
const addMedBtn = document.getElementById("addMed");
|
||||
const medList = document.getElementById("medicineList");
|
||||
const sendRxBtn = document.getElementById("sendRx");
|
||||
const closeModal = document.querySelector(".close-modal");
|
||||
const closeModal = document.querySelector(".rx-modal .close-modal");
|
||||
const cancelRxBtn = document.getElementById("cancelRx");
|
||||
const startRecordBtn = document.getElementById("startRecording");
|
||||
const recordingStatus = document.getElementById("recordingStatus");
|
||||
const aiInsightsBox = document.getElementById("aiInsights");
|
||||
|
|
@ -349,6 +350,41 @@ window.toggleSidebar = () => {
|
|||
document.getElementById('sidebar')?.classList.toggle('open');
|
||||
};
|
||||
|
||||
function closeRxModal() {
|
||||
if (modal) modal.classList.remove('open');
|
||||
}
|
||||
|
||||
if (addMedBtn && medList) {
|
||||
addMedBtn.addEventListener('click', () => {
|
||||
const row = medList.querySelector('.med-row');
|
||||
if (row) medList.appendChild(row.cloneNode(true));
|
||||
});
|
||||
}
|
||||
|
||||
if (addLabBtn && labList) {
|
||||
addLabBtn.addEventListener('click', () => {
|
||||
const row = labList.querySelector('.lab-row');
|
||||
if (row) {
|
||||
const clone = row.cloneNode(true);
|
||||
const input = clone.querySelector('input');
|
||||
if (input) input.value = '';
|
||||
labList.appendChild(clone);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.shareTip = (type) => {
|
||||
const tips = {
|
||||
diabetes: 'Maintain a balanced diet low in refined sugars.',
|
||||
hypertension: 'Reduce salt intake and practice daily breathing exercises.',
|
||||
viral: 'Stay hydrated and get adequate rest.'
|
||||
};
|
||||
alert(`📤 Health tip sent: ${tips[type] || 'General wellness advice.'}`);
|
||||
};
|
||||
|
||||
window.printTips = () => alert('🖨️ Printing patient education handout…');
|
||||
|
||||
// Global Listeners
|
||||
if (closeModal) closeModal.onclick = () => modal.classList.remove('open');
|
||||
window.onclick = (e) => { if (e.target == modal) modal.classList.remove('open'); };
|
||||
if (closeModal) closeModal.onclick = closeRxModal;
|
||||
if (cancelRxBtn) cancelRxBtn.onclick = closeRxModal;
|
||||
window.onclick = (e) => { if (e.target === modal) closeRxModal(); };
|
||||
|
|
|
|||
Loading…
Reference in New Issue