New top-level tab (positioned after Catch-Up Schedule) combining two
functions:
1. Study reference — for each (age group, system) shows OSCE-style
components with technique, expected normal finding, and abnormal-
feature watch-list.
2. Documentation generator — physician marks each component
Normal / Abnormal (with free-text detail) / Skip; AI produces a
two-section report (Technique + Findings), narrative or structured
list format.
Scope v1: MSK + Neuro × 6 age groups (newborn, infant, toddler,
preschool, school-age, adolescent). More systems can be added to the
embedded PE_DATA in peGuide.js without route changes.
Files:
- src/routes/peGuide.js — POST /api/generate-pe-narrative (mirrors
milestone-narrative pattern: AppRole-level
injection guard, clinical audit category,
PHI redaction upstream already in place)
- src/utils/prompts.js — peGuideNarrative + peGuideList prompts,
structured two-section output
- public/components/pe-guide.html — demographics bar + sub-pills + cards
- public/js/peGuide.js — embedded PE_DATA (all clinical content),
render + state + AI call
- public/index.html — tab button, section, script include
- server.js — mount route at /api
No schema change. No PHI stored — findings live in memory only, exported
via existing copy/read-aloud/Nextcloud actions.
75 lines
3.7 KiB
HTML
75 lines
3.7 KiB
HTML
<div class="module-header">
|
||
<h2><i class="fas fa-stethoscope"></i> Physical Exam Guide</h2>
|
||
<p>OSCE-style reference for age-appropriate MSK and Neuro exam + narrative report generator</p>
|
||
</div>
|
||
|
||
<div class="demographics-bar">
|
||
<div class="demo-field">
|
||
<label>Age Group</label>
|
||
<select id="pe-age-group">
|
||
<option value="">-- Select --</option>
|
||
<option value="newborn">Newborn (0–28 days)</option>
|
||
<option value="infant">Infant (1–12 months)</option>
|
||
<option value="toddler">Toddler (1–3 years)</option>
|
||
<option value="preschool">Preschool (3–5 years)</option>
|
||
<option value="school">School-age (6–11 years)</option>
|
||
<option value="adolescent">Adolescent (12–21 years)</option>
|
||
</select>
|
||
</div>
|
||
<div class="demo-field">
|
||
<label>Patient Age</label>
|
||
<input type="text" id="pe-age" placeholder="e.g., 4 months">
|
||
</div>
|
||
<div class="demo-field">
|
||
<label>Gender</label>
|
||
<select id="pe-gender">
|
||
<option value="">Select</option>
|
||
<option>Male</option>
|
||
<option>Female</option>
|
||
</select>
|
||
</div>
|
||
<div class="demo-field">
|
||
<label>Report Style</label>
|
||
<select id="pe-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="wv-subtab-bar">
|
||
<button class="wv-subtab-btn active" data-pesystem="msk">
|
||
<i class="fas fa-bone"></i> Musculoskeletal
|
||
</button>
|
||
<button class="wv-subtab-btn" data-pesystem="neuro">
|
||
<i class="fas fa-brain"></i> Neurologic
|
||
</button>
|
||
</div>
|
||
|
||
<div id="pe-content">
|
||
<p style="text-align:center;color:#9ca3af;padding:40px;">Select an age group above to see the exam guide.</p>
|
||
</div>
|
||
|
||
<div class="milestone-actions" id="pe-actions" style="display:none">
|
||
<button id="pe-all-normal" class="btn-sm btn-success"><i class="fas fa-check-double"></i> All Normal</button>
|
||
<button id="pe-all-clear" class="btn-sm btn-ghost"><i class="fas fa-eraser"></i> Clear All</button>
|
||
<button id="pe-generate-btn" class="btn-generate btn-generate-teal"><i class="fas fa-wand-magic-sparkles"></i> Generate Exam Report</button>
|
||
</div>
|
||
|
||
<div id="pe-output" class="card output-card hidden">
|
||
<div class="card-header output-header">
|
||
<h3><i class="fas fa-file-medical"></i> Physical Exam Report</h3>
|
||
<div class="output-actions">
|
||
<span id="pe-model-tag" class="model-tag"></span>
|
||
<button class="btn-sm btn-primary" data-action="copy" data-target="pe-narrative-text"><i class="fas fa-copy"></i> Copy</button>
|
||
<button class="btn-sm btn-ghost" data-action="speak" data-target="pe-narrative-text"><i class="fas fa-volume-high"></i> Read</button>
|
||
<button class="btn-sm btn-ghost" data-action="nc-export" data-target="pe-narrative-text" data-label="physical-exam"><i class="fas fa-cloud-arrow-up"></i></button>
|
||
</div>
|
||
</div>
|
||
<div id="pe-summary-bar" class="summary-bar hidden"></div>
|
||
<div id="pe-narrative-text" class="output-text" contenteditable="true"></div>
|
||
</div>
|