- Add Well Visit tab with three sub-views: By Visit Age, Full Vaccine Schedule, Catch-Up Schedule - By Visit Age: shows ICD-10/CPT billing codes, vaccines due with dose info, measurements, sensory/developmental/behavioral/procedure screenings, oral health, notes - Full Schedule: scrollable table of all vaccines vs all visit ages - Catch-Up Schedule: per-vaccine minimum ages, intervals, and catch-up notes per CDC 2025 - Add pediatricScheduleData.js (1719-line AAP 2025 Bright Futures dataset) - Add wellVisit.js for tab logic (lazy-initialized on first tab activation) - Fire tabChanged CustomEvent on tab switch for lazy initialization - Add Well Visit CSS styles to styles.css
848 lines
41 KiB
HTML
848 lines
41 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Pediatric AI Scribe</title>
|
|
<link rel="stylesheet" href="/css/styles.css">
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
|
|
<link rel="manifest" href="/manifest.json">
|
|
<meta name="theme-color" content="#2563eb">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="apple-mobile-web-app-title" content="PedScribe">
|
|
<link rel="apple-touch-icon" href="/icons/icon-192.png">
|
|
</head>
|
|
<body>
|
|
|
|
<!-- AUTH SCREEN -->
|
|
<div id="auth-screen" class="auth-screen">
|
|
<div class="auth-box">
|
|
<div class="auth-logo">
|
|
<i class="fas fa-stethoscope"></i>
|
|
<h1>Pediatric AI Scribe</h1>
|
|
<p>AI-Powered Clinical Documentation</p>
|
|
</div>
|
|
|
|
<!-- Login Form -->
|
|
<form id="login-form" class="auth-form">
|
|
<h2>Sign In</h2>
|
|
<div class="form-group">
|
|
<label>Email</label>
|
|
<input type="email" id="login-email" required placeholder="your@email.com">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Password</label>
|
|
<input type="password" id="login-password" required placeholder="••••••••">
|
|
</div>
|
|
<div id="totp-group" class="form-group hidden">
|
|
<label>2FA Code</label>
|
|
<input type="text" id="login-totp" placeholder="6-digit code" maxlength="6">
|
|
</div>
|
|
<button type="submit" class="btn-auth">Sign In</button>
|
|
<div class="auth-links">
|
|
<a href="#" id="show-register">Create account</a>
|
|
<a href="#" id="show-forgot">Forgot password?</a>
|
|
</div>
|
|
</form>
|
|
|
|
<!-- Register Form -->
|
|
<form id="register-form" class="auth-form hidden">
|
|
<h2>Create Account</h2>
|
|
<div class="form-group">
|
|
<label>Full Name</label>
|
|
<input type="text" id="reg-name" required placeholder="Dr. Jane Smith">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Email</label>
|
|
<input type="email" id="reg-email" required placeholder="your@email.com">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Password (8+ characters)</label>
|
|
<input type="password" id="reg-password" required minlength="8" placeholder="••••••••">
|
|
</div>
|
|
<button type="submit" class="btn-auth">Create Account</button>
|
|
<div class="auth-links">
|
|
<a href="#" id="show-login">Back to sign in</a>
|
|
</div>
|
|
</form>
|
|
|
|
<!-- Forgot Password Form -->
|
|
<form id="forgot-form" class="auth-form hidden">
|
|
<h2>Reset Password</h2>
|
|
<div class="form-group">
|
|
<label>Email</label>
|
|
<input type="email" id="forgot-email" required placeholder="your@email.com">
|
|
</div>
|
|
<button type="submit" class="btn-auth">Send Reset Link</button>
|
|
<div class="auth-links">
|
|
<a href="#" id="show-login-2">Back to sign in</a>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="hipaa-notice">
|
|
<i class="fas fa-shield-halved"></i>
|
|
<span>HIPAA Notice: Do not enter real PHI unless your organization has a BAA with all AI providers used.</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- MAIN APP (hidden until authenticated) -->
|
|
<div id="main-app" class="hidden">
|
|
|
|
<!-- HEADER -->
|
|
<header class="app-header">
|
|
<div class="header-content">
|
|
<div class="header-top">
|
|
<div class="logo">
|
|
<i class="fas fa-stethoscope"></i>
|
|
<div>
|
|
<h1>Pediatric AI Scribe</h1>
|
|
<p class="tagline">Welcome, <span id="user-name">Doctor</span></p>
|
|
</div>
|
|
</div>
|
|
<div class="header-right">
|
|
<div class="model-selector">
|
|
<label><i class="fas fa-robot"></i></label>
|
|
<select id="global-model-select"></select>
|
|
<span id="model-cost-badge" class="cost-badge"></span>
|
|
</div>
|
|
<div class="header-buttons">
|
|
<button id="btn-settings" class="btn-header" title="Settings">
|
|
<i class="fas fa-cog"></i>
|
|
</button>
|
|
<button id="btn-logout" class="btn-header" title="Logout">
|
|
<i class="fas fa-right-from-bracket"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- TAB NAVIGATION -->
|
|
<nav class="tab-nav">
|
|
<button class="tab-btn active" data-tab="encounter">
|
|
<i class="fas fa-comments"></i>
|
|
<span>Encounter HPI</span>
|
|
</button>
|
|
<button class="tab-btn" data-tab="dictation">
|
|
<i class="fas fa-microphone"></i>
|
|
<span>Dictation HPI</span>
|
|
</button>
|
|
<button class="tab-btn" data-tab="hospital">
|
|
<i class="fas fa-hospital"></i>
|
|
<span>Hospital Course</span>
|
|
</button>
|
|
<button class="tab-btn" data-tab="chart">
|
|
<i class="fas fa-clipboard-list"></i>
|
|
<span>Chart Review</span>
|
|
</button>
|
|
<button class="tab-btn" data-tab="soap">
|
|
<i class="fas fa-file-waveform"></i>
|
|
<span>SOAP Note</span>
|
|
</button>
|
|
<button class="tab-btn" data-tab="milestones">
|
|
<i class="fas fa-baby"></i>
|
|
<span>Milestones</span>
|
|
</button>
|
|
<button class="tab-btn" data-tab="wellvisit">
|
|
<i class="fas fa-calendar-check"></i>
|
|
<span>Well Visit</span>
|
|
</button>
|
|
<button class="tab-btn hidden" data-tab="admin" id="admin-tab-btn">
|
|
<i class="fas fa-user-shield"></i>
|
|
<span>Admin</span>
|
|
</button>
|
|
</nav>
|
|
|
|
<main class="main-content">
|
|
|
|
<!-- ===== TAB: ENCOUNTER HPI ===== -->
|
|
<section id="encounter-tab" class="tab-content active">
|
|
<div class="module-header">
|
|
<h2><i class="fas fa-comments"></i> Live Encounter → HPI</h2>
|
|
<p>Record doctor-patient conversation → AI generates structured HPI</p>
|
|
</div>
|
|
|
|
<div class="demographics-bar">
|
|
<div class="demo-field">
|
|
<label>Patient Age</label>
|
|
<input type="text" id="enc-age" placeholder="e.g., 4 years">
|
|
</div>
|
|
<div class="demo-field">
|
|
<label>Gender</label>
|
|
<select id="enc-gender"><option value="">Select</option><option>Male</option><option>Female</option></select>
|
|
</div>
|
|
<div class="demo-field">
|
|
<label>Setting</label>
|
|
<select id="enc-setting">
|
|
<option value="outpatient">Outpatient</option>
|
|
<option value="inpatient">Inpatient/Floors</option>
|
|
<option value="ed">Emergency Dept</option>
|
|
</select>
|
|
</div>
|
|
<div class="demo-field demo-field-model">
|
|
<label><i class="fas fa-robot"></i> Model</label>
|
|
<select class="tab-model-select"></select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="record-controls">
|
|
<button id="enc-record-btn" class="record-btn"><i class="fas fa-microphone"></i><span>Start Recording</span></button>
|
|
<div id="enc-recording-indicator" class="recording-indicator hidden"><div class="pulse-dot"></div><span>Recording... <span id="enc-timer">00:00</span></span></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-file-lines"></i> Transcript</h3><button id="enc-clear" class="btn-sm btn-ghost"><i class="fas fa-eraser"></i> Clear</button></div>
|
|
<div id="enc-transcript" class="editable-box" contenteditable="true" data-placeholder="Transcript appears here or type/paste directly..."></div>
|
|
</div>
|
|
|
|
<button id="enc-generate-btn" class="btn-generate"><i class="fas fa-wand-magic-sparkles"></i> Generate HPI</button>
|
|
|
|
<div id="enc-output" class="card output-card hidden">
|
|
<div class="card-header output-header">
|
|
<h3><i class="fas fa-file-medical"></i> Generated HPI</h3>
|
|
<div class="output-actions">
|
|
<span id="enc-model-tag" class="model-tag"></span>
|
|
<button class="btn-sm btn-primary" onclick="copyText('enc-hpi-text')"><i class="fas fa-copy"></i> Copy</button>
|
|
<button class="btn-sm btn-ghost" onclick="speakText('enc-hpi-text')"><i class="fas fa-volume-high"></i> Read</button>
|
|
<button class="btn-sm btn-ghost" onclick="exportToNextcloud('enc-hpi-text','hpi-encounter')"><i class="fas fa-cloud-arrow-up"></i></button>
|
|
</div>
|
|
</div>
|
|
<div id="enc-hpi-text" class="output-text" contenteditable="true"></div>
|
|
<div class="refine-bar">
|
|
<input type="text" id="enc-refine-input" class="refine-input" placeholder="Tell AI to modify (e.g., 'make it shorter', 'add that patient has asthma history')">
|
|
<button class="btn-sm btn-primary" id="enc-refine-btn"><i class="fas fa-edit"></i> Refine</button>
|
|
<button class="btn-sm btn-ghost" id="enc-shorten-btn"><i class="fas fa-compress"></i> Shorter</button>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ===== TAB: DICTATION HPI ===== -->
|
|
<section id="dictation-tab" class="tab-content">
|
|
<div class="module-header">
|
|
<h2><i class="fas fa-microphone"></i> Voice Dictation → HPI</h2>
|
|
<p>Dictate your narrative → AI restructures into polished HPI</p>
|
|
</div>
|
|
|
|
<div class="demographics-bar">
|
|
<div class="demo-field"><label>Patient Age</label><input type="text" id="dict-age" placeholder="e.g., 8 months"></div>
|
|
<div class="demo-field"><label>Gender</label><select id="dict-gender"><option value="">Select</option><option>Male</option><option>Female</option></select></div>
|
|
<div class="demo-field">
|
|
<label>Setting</label>
|
|
<select id="dict-setting">
|
|
<option value="outpatient">Outpatient</option>
|
|
<option value="inpatient">Inpatient/Floors</option>
|
|
<option value="ed">Emergency Dept</option>
|
|
</select>
|
|
</div>
|
|
<div class="demo-field demo-field-model">
|
|
<label><i class="fas fa-robot"></i> Model</label>
|
|
<select class="tab-model-select"></select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="record-controls">
|
|
<button id="dict-record-btn" class="record-btn btn-purple"><i class="fas fa-microphone"></i><span>Start Dictation</span></button>
|
|
<div id="dict-recording-indicator" class="recording-indicator hidden"><div class="pulse-dot pulse-purple"></div><span>Dictating... <span id="dict-timer">00:00</span></span></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-file-lines"></i> Dictation</h3><button id="dict-clear" class="btn-sm btn-ghost"><i class="fas fa-eraser"></i> Clear</button></div>
|
|
<div id="dict-transcript" class="editable-box" contenteditable="true" data-placeholder="Dictation appears here or type directly..."></div>
|
|
</div>
|
|
|
|
<div class="soap-options">
|
|
<label>Generate as:</label>
|
|
<select id="dict-output-type">
|
|
<option value="hpi">HPI Only</option>
|
|
<option value="soap-full">Full SOAP Note</option>
|
|
<option value="soap-subjective">SOAP Subjective Only</option>
|
|
</select>
|
|
</div>
|
|
|
|
<button id="dict-generate-btn" class="btn-generate btn-generate-purple"><i class="fas fa-wand-magic-sparkles"></i> Generate</button>
|
|
|
|
<div id="dict-output" class="card output-card hidden">
|
|
<div class="card-header output-header">
|
|
<h3><i class="fas fa-file-medical"></i> Output</h3>
|
|
<div class="output-actions">
|
|
<span id="dict-model-tag" class="model-tag"></span>
|
|
<button class="btn-sm btn-primary" onclick="copyText('dict-hpi-text')"><i class="fas fa-copy"></i> Copy</button>
|
|
<button class="btn-sm btn-ghost" onclick="speakText('dict-hpi-text')"><i class="fas fa-volume-high"></i> Read</button>
|
|
<button class="btn-sm btn-ghost" onclick="exportToNextcloud('dict-hpi-text','hpi-dictation')"><i class="fas fa-cloud-arrow-up"></i></button>
|
|
</div>
|
|
</div>
|
|
<div id="dict-hpi-text" class="output-text" contenteditable="true"></div>
|
|
<div class="refine-bar">
|
|
<input type="text" id="dict-refine-input" class="refine-input" placeholder="Tell AI to modify...">
|
|
<button class="btn-sm btn-primary" id="dict-refine-btn"><i class="fas fa-edit"></i> Refine</button>
|
|
<button class="btn-sm btn-ghost" id="dict-shorten-btn"><i class="fas fa-compress"></i> Shorter</button>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ===== TAB: HOSPITAL COURSE ===== -->
|
|
<section id="hospital-tab" class="tab-content">
|
|
<div class="module-header">
|
|
<h2><i class="fas fa-hospital"></i> Hospital Course Generator</h2>
|
|
<p>Upload notes by date → AI generates organized hospital course</p>
|
|
</div>
|
|
|
|
<div class="demographics-bar">
|
|
<div class="demo-field"><label>Patient Age</label><input type="text" id="hc-age" placeholder="e.g., 3 years"></div>
|
|
<div class="demo-field"><label>Gender</label><select id="hc-gender"><option value="">Select</option><option>Male</option><option>Female</option></select></div>
|
|
<div class="demo-field"><label>PMH</label><input type="text" id="hc-pmh" placeholder="e.g., asthma, obesity"></div>
|
|
<div class="demo-field">
|
|
<label>Unit</label>
|
|
<select id="hc-setting">
|
|
<option value="floor">General Floor</option>
|
|
<option value="picu">PICU</option>
|
|
<option value="nicu">NICU</option>
|
|
<option value="psych">Psych/Behavioral</option>
|
|
</select>
|
|
</div>
|
|
<div class="demo-field"><label>LOS (days)</label><input type="number" id="hc-los" placeholder="e.g., 3" min="1"></div>
|
|
<div class="demo-field">
|
|
<label>Format</label>
|
|
<select id="hc-format">
|
|
<option value="auto">Auto (AI decides)</option>
|
|
<option value="prose">Prose Summary</option>
|
|
<option value="dayByDay">Day by Day</option>
|
|
<option value="organSystem">Organ System (ICU)</option>
|
|
</select>
|
|
</div>
|
|
<div class="demo-field demo-field-model">
|
|
<label><i class="fas fa-robot"></i> Model</label>
|
|
<select class="tab-model-select"></select>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ED Note -->
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-truck-medical"></i> ED Note (before admission)</h3></div>
|
|
<div class="note-entry">
|
|
<div class="note-meta">
|
|
<input type="date" id="hc-ed-date">
|
|
<input type="text" id="hc-ed-labs" placeholder="ED Labs (e.g., WBC 15, BMP normal...)">
|
|
</div>
|
|
<div id="hc-ed-content" class="editable-box" contenteditable="true" data-placeholder="Paste or type ED note here..."></div>
|
|
<div class="note-dictate">
|
|
<button class="btn-sm btn-ghost hc-dictate-btn" data-target="hc-ed-content"><i class="fas fa-microphone"></i> Dictate</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- H&P -->
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-file-medical"></i> H&P (Admission Note)</h3></div>
|
|
<div class="note-entry">
|
|
<div class="note-meta">
|
|
<input type="date" id="hc-hp-date">
|
|
</div>
|
|
<div id="hc-hp-content" class="editable-box" contenteditable="true" data-placeholder="Paste or type H&P here..."></div>
|
|
<div class="note-dictate">
|
|
<button class="btn-sm btn-ghost hc-dictate-btn" data-target="hc-hp-content"><i class="fas fa-microphone"></i> Dictate</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Progress Notes (dynamic) -->
|
|
<div id="hc-notes-container">
|
|
<div class="card note-card" data-note-index="0">
|
|
<div class="card-header">
|
|
<h3><i class="fas fa-notes-medical"></i> Progress Note #1</h3>
|
|
<button class="btn-sm btn-ghost remove-note-btn"><i class="fas fa-trash"></i></button>
|
|
</div>
|
|
<div class="note-entry">
|
|
<div class="note-meta">
|
|
<input type="date" class="note-date">
|
|
<select class="note-type">
|
|
<option value="progress-attending">Progress - Attending</option>
|
|
<option value="progress-resident">Progress - Resident</option>
|
|
<option value="progress-np">Progress - NP/PA</option>
|
|
<option value="consult">Consult Note</option>
|
|
<option value="procedure">Procedure Note</option>
|
|
<option value="discharge-summary">Discharge Summary</option>
|
|
</select>
|
|
</div>
|
|
<div class="editable-box note-content" contenteditable="true" data-placeholder="Paste or type note..."></div>
|
|
<div class="note-dictate">
|
|
<button class="btn-sm btn-ghost hc-dictate-btn" data-target-class="note-content"><i class="fas fa-microphone"></i> Dictate</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<button id="hc-add-note" class="btn-sm btn-ghost" style="margin:8px 0"><i class="fas fa-plus"></i> Add Progress Note</button>
|
|
|
|
<!-- Labs -->
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-flask"></i> Labs</h3><button id="hc-add-lab" class="btn-sm btn-ghost"><i class="fas fa-plus"></i> Add</button></div>
|
|
<div id="hc-labs-container">
|
|
<div class="lab-entry">
|
|
<input type="date" class="lab-date">
|
|
<input type="text" class="lab-values" placeholder="e.g., WBC 12.5, H/H 10.2/31, BMP: Na 138, K 3.5, BUN 11, Cr 0.5">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- AI Instructions -->
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-comment-dots"></i> Additional Instructions (optional)</h3></div>
|
|
<input type="text" id="hc-instructions" class="full-input" placeholder="e.g., 'Focus on respiratory course', 'Patient was transferred from outside hospital'">
|
|
</div>
|
|
|
|
<div class="action-row">
|
|
<button id="hc-generate-btn" class="btn-generate btn-generate-blue"><i class="fas fa-wand-magic-sparkles"></i> Generate Hospital Course</button>
|
|
</div>
|
|
|
|
<!-- Output -->
|
|
<div id="hc-output" class="card output-card hidden">
|
|
<div class="card-header output-header">
|
|
<h3><i class="fas fa-file-medical"></i> Hospital Course</h3>
|
|
<div class="output-actions">
|
|
<span id="hc-format-tag" class="model-tag"></span>
|
|
<span id="hc-model-tag" class="model-tag"></span>
|
|
<button class="btn-sm btn-primary" onclick="copyText('hc-course-text')"><i class="fas fa-copy"></i> Copy</button>
|
|
<button class="btn-sm btn-ghost" onclick="speakText('hc-course-text')"><i class="fas fa-volume-high"></i> Read</button>
|
|
<button class="btn-sm btn-ghost" onclick="exportToNextcloud('hc-course-text','hospital-course')"><i class="fas fa-cloud-arrow-up"></i></button>
|
|
</div>
|
|
</div>
|
|
<div id="hc-course-text" class="output-text" contenteditable="true"></div>
|
|
<div class="refine-bar">
|
|
<input type="text" id="hc-refine-input" class="refine-input" placeholder="Tell AI to modify or add discharge day info...">
|
|
<button class="btn-sm btn-primary" id="hc-refine-btn"><i class="fas fa-edit"></i> Refine</button>
|
|
<button class="btn-sm btn-ghost" id="hc-shorten-btn"><i class="fas fa-compress"></i> Shorter</button>
|
|
<button class="btn-sm btn-warning" id="hc-clarify-btn"><i class="fas fa-circle-question"></i> What's Missing?</button>
|
|
</div>
|
|
<div id="hc-clarify-output" class="clarify-box hidden"></div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ===== TAB: CHART REVIEW ===== -->
|
|
<section id="chart-tab" class="tab-content">
|
|
<div class="module-header">
|
|
<h2><i class="fas fa-clipboard-list"></i> Chart Review / Precharting</h2>
|
|
<p>Paste clinic notes, subspecialty notes, ED notes, labs → AI summarizes</p>
|
|
</div>
|
|
|
|
<div class="demographics-bar">
|
|
<div class="demo-field"><label>Patient Age</label><input type="text" id="cr-age" placeholder="e.g., 8 years"></div>
|
|
<div class="demo-field"><label>Gender</label><select id="cr-gender"><option value="">Select</option><option>Male</option><option>Female</option></select></div>
|
|
<div class="demo-field"><label>PMH</label><input type="text" id="cr-pmh" placeholder="e.g., hypothyroidism, vitiligo"></div>
|
|
<div class="demo-field">
|
|
<label>Review Type</label>
|
|
<select id="cr-type">
|
|
<option value="outpatient">Outpatient Clinic</option>
|
|
<option value="subspecialty">Subspecialty</option>
|
|
<option value="ed">ED Visit</option>
|
|
</select>
|
|
</div>
|
|
<div class="demo-field demo-field-model">
|
|
<label><i class="fas fa-robot"></i> Model</label>
|
|
<select class="tab-model-select"></select>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Visits -->
|
|
<div id="cr-visits-container">
|
|
<div class="card visit-card">
|
|
<div class="card-header">
|
|
<h3><i class="fas fa-calendar"></i> Visit / Note #1</h3>
|
|
<button class="btn-sm btn-ghost remove-visit-btn"><i class="fas fa-trash"></i></button>
|
|
</div>
|
|
<div class="note-entry">
|
|
<div class="note-meta">
|
|
<input type="date" class="visit-date">
|
|
<select class="visit-type">
|
|
<option value="outpatient">Outpatient Visit</option>
|
|
<option value="subspecialty">Subspecialty Note</option>
|
|
<option value="ed">ED Visit</option>
|
|
</select>
|
|
<input type="text" class="visit-specialist" placeholder="Specialist name (if subspecialty)">
|
|
<input type="text" class="visit-specialty" placeholder="Specialty (e.g., Endocrinology)">
|
|
</div>
|
|
<div class="editable-box visit-content" contenteditable="true" data-placeholder="Paste note here..."></div>
|
|
<textarea class="visit-labs" placeholder="Labs from this visit (optional)" rows="3"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<button id="cr-add-visit" class="btn-sm btn-ghost" style="margin:8px 0"><i class="fas fa-plus"></i> Add Visit/Note</button>
|
|
|
|
<!-- Labs -->
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-flask"></i> Additional Labs</h3><button id="cr-add-lab" class="btn-sm btn-ghost"><i class="fas fa-plus"></i> Add</button></div>
|
|
<div id="cr-labs-container">
|
|
<div class="lab-entry">
|
|
<input type="date" class="lab-date">
|
|
<textarea class="lab-values" placeholder="Lab results..." rows="3"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-comment-dots"></i> Instructions (optional)</h3></div>
|
|
<input type="text" id="cr-instructions" class="full-input" placeholder="e.g., 'Focus on thyroid management', 'Include medication changes'">
|
|
</div>
|
|
|
|
<button id="cr-generate-btn" class="btn-generate btn-generate-green"><i class="fas fa-wand-magic-sparkles"></i> Generate Chart Review</button>
|
|
|
|
<div id="cr-output" class="card output-card hidden">
|
|
<div class="card-header output-header">
|
|
<h3><i class="fas fa-file-medical"></i> Chart Review</h3>
|
|
<div class="output-actions">
|
|
<span id="cr-model-tag" class="model-tag"></span>
|
|
<button class="btn-sm btn-primary" onclick="copyText('cr-review-text')"><i class="fas fa-copy"></i> Copy</button>
|
|
<button class="btn-sm btn-ghost" onclick="speakText('cr-review-text')"><i class="fas fa-volume-high"></i> Read</button>
|
|
<button class="btn-sm btn-ghost" onclick="exportToNextcloud('cr-review-text','chart-review')"><i class="fas fa-cloud-arrow-up"></i></button>
|
|
</div>
|
|
</div>
|
|
<div id="cr-review-text" class="output-text" contenteditable="true"></div>
|
|
<div class="refine-bar">
|
|
<input type="text" id="cr-refine-input" class="refine-input" placeholder="Tell AI to modify...">
|
|
<button class="btn-sm btn-primary" id="cr-refine-btn"><i class="fas fa-edit"></i> Refine</button>
|
|
<button class="btn-sm btn-ghost" id="cr-shorten-btn"><i class="fas fa-compress"></i> Shorter</button>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ===== TAB: SOAP ===== -->
|
|
<section id="soap-tab" class="tab-content">
|
|
<div class="module-header">
|
|
<h2><i class="fas fa-file-waveform"></i> SOAP Note Generator</h2>
|
|
<p>Generate full SOAP note or just Subjective from dictation/text</p>
|
|
</div>
|
|
|
|
<div class="demographics-bar">
|
|
<div class="demo-field"><label>Patient Age</label><input type="text" id="soap-age" placeholder="e.g., 5 years"></div>
|
|
<div class="demo-field"><label>Gender</label><select id="soap-gender"><option value="">Select</option><option>Male</option><option>Female</option></select></div>
|
|
<div class="demo-field">
|
|
<label>Generate</label>
|
|
<select id="soap-type">
|
|
<option value="full">Full SOAP Note</option>
|
|
<option value="subjective">Subjective Only</option>
|
|
</select>
|
|
</div>
|
|
<div class="demo-field demo-field-model">
|
|
<label><i class="fas fa-robot"></i> Model</label>
|
|
<select class="tab-model-select"></select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="record-controls">
|
|
<button id="soap-record-btn" class="record-btn btn-teal"><i class="fas fa-microphone"></i><span>Dictate</span></button>
|
|
<div id="soap-recording-indicator" class="recording-indicator hidden"><div class="pulse-dot pulse-teal"></div><span>Dictating... <span id="soap-timer">00:00</span></span></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-file-lines"></i> Input</h3><button id="soap-clear" class="btn-sm btn-ghost"><i class="fas fa-eraser"></i> Clear</button></div>
|
|
<div id="soap-transcript" class="editable-box" contenteditable="true" data-placeholder="Dictate or type encounter details..."></div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-comment-dots"></i> Instructions (optional)</h3></div>
|
|
<input type="text" id="soap-instructions" class="full-input" placeholder="e.g., 'Include assessment for otitis media', 'Add anticipatory guidance'">
|
|
</div>
|
|
|
|
<button id="soap-generate-btn" class="btn-generate btn-generate-teal"><i class="fas fa-wand-magic-sparkles"></i> Generate SOAP Note</button>
|
|
|
|
<div id="soap-output" class="card output-card hidden">
|
|
<div class="card-header output-header">
|
|
<h3><i class="fas fa-file-medical"></i> SOAP Note</h3>
|
|
<div class="output-actions">
|
|
<span id="soap-model-tag" class="model-tag"></span>
|
|
<button class="btn-sm btn-primary" onclick="copyText('soap-text')"><i class="fas fa-copy"></i> Copy</button>
|
|
<button class="btn-sm btn-ghost" onclick="speakText('soap-text')"><i class="fas fa-volume-high"></i> Read</button>
|
|
<button class="btn-sm btn-ghost" onclick="exportToNextcloud('soap-text','soap-note')"><i class="fas fa-cloud-arrow-up"></i></button>
|
|
</div>
|
|
</div>
|
|
<div id="soap-text" class="output-text" contenteditable="true"></div>
|
|
<div class="refine-bar">
|
|
<input type="text" id="soap-refine-input" class="refine-input" placeholder="Tell AI to modify...">
|
|
<button class="btn-sm btn-primary" id="soap-refine-btn"><i class="fas fa-edit"></i> Refine</button>
|
|
<button class="btn-sm btn-ghost" id="soap-shorten-btn"><i class="fas fa-compress"></i> Shorter</button>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ===== TAB: MILESTONES ===== -->
|
|
<section id="milestones-tab" class="tab-content">
|
|
<div class="module-header">
|
|
<h2><i class="fas fa-baby"></i> Developmental Milestones</h2>
|
|
<p>AAP & Nelson — Click to assess. Blank = not assessed (omitted).</p>
|
|
</div>
|
|
|
|
<div class="demographics-bar">
|
|
<div class="demo-field"><label>Patient Age</label><input type="text" id="ms-age" placeholder="e.g., 9 months"></div>
|
|
<div class="demo-field"><label>Gender</label><select id="ms-gender"><option value="">Select</option><option>Male</option><option>Female</option></select></div>
|
|
<div class="demo-field">
|
|
<label>Age Group</label>
|
|
<select id="ms-age-group">
|
|
<option value="">-- Select --</option>
|
|
<option value="2 months">2 Months</option>
|
|
<option value="4 months">4 Months</option>
|
|
<option value="6 months">6 Months</option>
|
|
<option value="9 months">9 Months</option>
|
|
<option value="12 months">12 Months</option>
|
|
<option value="15 months">15 Months</option>
|
|
<option value="18 months">18 Months</option>
|
|
<option value="24 months">2 Years</option>
|
|
<option value="30 months">2.5 Years</option>
|
|
<option value="36 months">3 Years</option>
|
|
<option value="48 months">4 Years</option>
|
|
<option value="60 months">5 Years</option>
|
|
</select>
|
|
</div>
|
|
<div class="demo-field">
|
|
<label>Output Format</label>
|
|
<select id="ms-format">
|
|
<option value="narrative">Narrative (paragraphs)</option>
|
|
<option value="list">Structured List</option>
|
|
</select>
|
|
</div>
|
|
<div class="demo-field demo-field-model">
|
|
<label><i class="fas fa-robot"></i> Model</label>
|
|
<select class="tab-model-select"></select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="legend">
|
|
<div class="legend-item"><span class="legend-icon legend-yes">✓</span> Achieved</div>
|
|
<div class="legend-item"><span class="legend-icon legend-no">✗</span> Not Achieved</div>
|
|
<div class="legend-item"><span class="legend-icon legend-blank">—</span> Not Assessed (omitted)</div>
|
|
</div>
|
|
|
|
<div id="milestone-checklist"></div>
|
|
|
|
<div class="milestone-actions" id="milestone-actions" style="display:none">
|
|
<button id="ms-all-yes" class="btn-sm btn-success"><i class="fas fa-check-double"></i> All Yes</button>
|
|
<button id="ms-all-clear" class="btn-sm btn-ghost"><i class="fas fa-eraser"></i> Clear All</button>
|
|
<button id="ms-generate-btn" class="btn-generate btn-generate-teal"><i class="fas fa-wand-magic-sparkles"></i> Generate Narrative</button>
|
|
</div>
|
|
|
|
<div id="ms-output" class="card output-card hidden">
|
|
<div class="card-header output-header">
|
|
<h3><i class="fas fa-file-medical"></i> Developmental Assessment</h3>
|
|
<div class="output-actions">
|
|
<span id="ms-model-tag" class="model-tag"></span>
|
|
<button class="btn-sm btn-primary" onclick="copyText('ms-narrative-text')"><i class="fas fa-copy"></i> Copy</button>
|
|
<button class="btn-sm btn-ghost" onclick="speakText('ms-narrative-text')"><i class="fas fa-volume-high"></i> Read</button>
|
|
<button class="btn-sm btn-ghost" onclick="exportToNextcloud('ms-narrative-text','milestones')"><i class="fas fa-cloud-arrow-up"></i></button>
|
|
</div>
|
|
</div>
|
|
<div id="ms-summary-bar" class="summary-bar hidden"></div>
|
|
<div id="ms-narrative-text" class="output-text" contenteditable="true"></div>
|
|
<div class="summary-section">
|
|
<div class="summary-section-header">
|
|
<button id="ms-quick-summary-btn" class="btn-generate-summary"><i class="fas fa-compress"></i> 3-Sentence Summary</button>
|
|
</div>
|
|
<div id="ms-quick-summary" class="hidden">
|
|
<div class="card-header summary-output-header">
|
|
<h3><i class="fas fa-clipboard-list"></i> Quick Summary</h3>
|
|
<div class="output-actions">
|
|
<button class="btn-sm btn-primary" onclick="copyText('ms-summary-text')"><i class="fas fa-copy"></i> Copy</button>
|
|
</div>
|
|
</div>
|
|
<div id="ms-summary-text" class="summary-output-text" contenteditable="true"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ===== TAB: ADMIN ===== -->
|
|
<section id="admin-tab" class="tab-content">
|
|
<div class="module-header">
|
|
<h2><i class="fas fa-user-shield"></i> Admin Panel</h2>
|
|
<p>Manage users, app settings, and view usage statistics</p>
|
|
</div>
|
|
|
|
<!-- Stats -->
|
|
<div class="admin-stats" id="admin-stats">
|
|
<div class="stat-card"><div class="stat-value" id="stat-users">—</div><div class="stat-label">Total Users</div></div>
|
|
<div class="stat-card"><div class="stat-value" id="stat-api-total">—</div><div class="stat-label">Total API Calls</div></div>
|
|
<div class="stat-card"><div class="stat-value" id="stat-api-today">—</div><div class="stat-label">API Calls Today</div></div>
|
|
</div>
|
|
|
|
<!-- Registration -->
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-door-open"></i> Registration</h3></div>
|
|
<div style="padding:16px;display:flex;align-items:center;gap:16px;flex-wrap:wrap;">
|
|
<span id="reg-status-text" style="font-size:13px;color:var(--g600);">Loading...</span>
|
|
<button id="btn-toggle-reg" class="btn-sm btn-primary">Toggle</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Users -->
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3><i class="fas fa-users"></i> Users</h3>
|
|
<button id="btn-refresh-users" class="btn-sm btn-ghost"><i class="fas fa-rotate"></i> Refresh</button>
|
|
</div>
|
|
<div style="overflow-x:auto;">
|
|
<table class="admin-table" id="admin-users-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name / Email</th>
|
|
<th>Role</th>
|
|
<th>Status</th>
|
|
<th>Joined</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="admin-users-body">
|
|
<tr><td colspan="5" style="text-align:center;color:var(--g400);padding:20px;">Loading...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ===== TAB: WELL VISIT / PREVENTIVE CARE ===== -->
|
|
<section id="wellvisit-tab" class="tab-content">
|
|
<div class="module-header">
|
|
<h2><i class="fas fa-calendar-check"></i> Well Visit / Preventive Care</h2>
|
|
<p>AAP 2025 Bright Futures periodicity — vaccines, screenings, billing codes, and catch-up schedule</p>
|
|
</div>
|
|
|
|
<!-- Sub-tab navigation -->
|
|
<div class="wv-subtab-bar">
|
|
<button class="wv-subtab-btn active" data-subtab="byvisit">
|
|
<i class="fas fa-child"></i> By Visit Age
|
|
</button>
|
|
<button class="wv-subtab-btn" data-subtab="schedule">
|
|
<i class="fas fa-table"></i> Full Vaccine Schedule
|
|
</button>
|
|
<button class="wv-subtab-btn" data-subtab="catchup">
|
|
<i class="fas fa-rotate"></i> Catch-Up Schedule
|
|
</button>
|
|
</div>
|
|
|
|
<!-- By Visit sub-panel -->
|
|
<div id="wv-panel-byvisit" class="wv-subpanel">
|
|
<div class="wv-visit-selector-row">
|
|
<label for="wv-visit-select"><i class="fas fa-calendar-day"></i> Select Visit Age:</label>
|
|
<select id="wv-visit-select" class="wv-visit-select"></select>
|
|
</div>
|
|
<div id="wv-visit-detail" class="wv-visit-detail">
|
|
<p class="wv-empty">Select a visit age above to see recommendations.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Full Vaccine Schedule sub-panel -->
|
|
<div id="wv-panel-schedule" class="wv-subpanel hidden">
|
|
<p class="wv-loading">Loading schedule...</p>
|
|
</div>
|
|
|
|
<!-- Catch-Up Schedule sub-panel -->
|
|
<div id="wv-panel-catchup" class="wv-subpanel hidden">
|
|
<p class="wv-loading">Loading catch-up schedule...</p>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
<!-- SETTINGS MODAL -->
|
|
<div id="settings-modal" class="modal hidden">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h2><i class="fas fa-cog"></i> Settings</h2>
|
|
<button class="modal-close" id="close-settings"><i class="fas fa-times"></i></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<!-- 2FA -->
|
|
<div class="settings-section">
|
|
<h3><i class="fas fa-shield-halved"></i> Two-Factor Authentication</h3>
|
|
<p id="2fa-status">Status: Loading...</p>
|
|
<button id="btn-setup-2fa" class="btn-sm btn-primary">Enable 2FA</button>
|
|
<button id="btn-disable-2fa" class="btn-sm btn-ghost hidden">Disable 2FA</button>
|
|
<div id="2fa-setup" class="hidden">
|
|
<p>Scan this QR code with your authenticator app:</p>
|
|
<img id="2fa-qr" src="" alt="QR Code">
|
|
<p>Or enter manually: <code id="2fa-secret"></code></p>
|
|
<div class="form-group">
|
|
<label>Enter the 6-digit code to verify:</label>
|
|
<input type="text" id="2fa-verify-code" maxlength="6" placeholder="123456">
|
|
<button id="btn-verify-2fa" class="btn-sm btn-success">Verify & Enable</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Nextcloud -->
|
|
<div class="settings-section">
|
|
<h3><i class="fas fa-cloud"></i> Nextcloud Integration</h3>
|
|
<p>Export generated documents to your Nextcloud.</p>
|
|
<div id="nc-status">Not connected</div>
|
|
<div class="form-group">
|
|
<label>Nextcloud URL</label>
|
|
<input type="text" id="nc-url" placeholder="https://cloud.example.com">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Username</label>
|
|
<input type="text" id="nc-user" placeholder="your-username">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>App Password</label>
|
|
<input type="password" id="nc-pass" placeholder="Generate in Nextcloud → Settings → Security">
|
|
<small>Go to Nextcloud → Settings → Security → Create new app password</small>
|
|
</div>
|
|
<button id="btn-nc-connect" class="btn-sm btn-primary">Connect</button>
|
|
<button id="btn-nc-disconnect" class="btn-sm btn-ghost hidden">Disconnect</button>
|
|
</div>
|
|
|
|
<!-- HIPAA -->
|
|
<div class="settings-section">
|
|
<h3><i class="fas fa-lock"></i> HIPAA & Privacy</h3>
|
|
<div class="hipaa-info">
|
|
<p><strong>Current Status:</strong> This tool processes data through third-party AI APIs.</p>
|
|
<ul>
|
|
<li>✅ All connections use HTTPS/TLS encryption</li>
|
|
<li>✅ Authentication required</li>
|
|
<li>✅ No patient data stored on server</li>
|
|
<li>✅ 2FA available</li>
|
|
<li>⚠️ OpenRouter does not currently offer BAA</li>
|
|
<li>⚠️ For full HIPAA: use Azure OpenAI or AWS Bedrock with BAA</li>
|
|
</ul>
|
|
<p><strong>Recommendation:</strong> Do not enter real PHI until your organization has executed BAAs with all AI providers.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- LOADING -->
|
|
<div id="loading-overlay" class="loading-overlay hidden">
|
|
<div class="loading-box"><div class="spinner"></div><p id="loading-text">Processing...</p></div>
|
|
</div>
|
|
|
|
<!-- TOAST -->
|
|
<div id="toast-container" class="toast-container"></div>
|
|
|
|
<!-- SCRIPTS -->
|
|
<script src="/js/milestonesData.js"></script>
|
|
<script src="/js/pediatricScheduleData.js"></script>
|
|
<script src="/js/app.js"></script>
|
|
<script src="/js/auth.js"></script>
|
|
<script src="/js/liveEncounter.js"></script>
|
|
<script src="/js/voiceDictation.js"></script>
|
|
<script src="/js/hospitalCourse.js"></script>
|
|
<script src="/js/chartReview.js"></script>
|
|
<script src="/js/soap.js"></script>
|
|
<script src="/js/milestones.js"></script>
|
|
<script src="/js/nextcloud.js"></script>
|
|
<script src="/js/wellVisit.js"></script>
|
|
<script src="/js/admin.js"></script>
|
|
</body>
|
|
</html>
|