Upload 2 files
Browse files- templates/patient.html +20 -0
- templates/provider.html +67 -2
templates/patient.html
CHANGED
|
@@ -18,6 +18,12 @@
|
|
| 18 |
<span class="role-tag">Patient</span>
|
| 19 |
</div>
|
| 20 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
</div>
|
| 22 |
{% endblock %}
|
| 23 |
|
|
@@ -213,6 +219,20 @@
|
|
| 213 |
<button type="button" class="btn btn-secondary" id="new-conversation-btn">Start a new conversation</button>
|
| 214 |
</section>
|
| 215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 216 |
<div class="nav-link"><a href="/provider">Go to provider view</a></div>
|
| 217 |
|
| 218 |
{% endblock %}
|
|
|
|
| 18 |
<span class="role-tag">Patient</span>
|
| 19 |
</div>
|
| 20 |
</div>
|
| 21 |
+
<button type="button" class="header-icon-btn" id="open-history-btn" title="Your consultation history" aria-label="Your consultation history">
|
| 22 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 23 |
+
<circle cx="12" cy="12" r="9"/>
|
| 24 |
+
<polyline points="12 7 12 12 15 15"/>
|
| 25 |
+
</svg>
|
| 26 |
+
</button>
|
| 27 |
</div>
|
| 28 |
{% endblock %}
|
| 29 |
|
|
|
|
| 219 |
<button type="button" class="btn btn-secondary" id="new-conversation-btn">Start a new conversation</button>
|
| 220 |
</section>
|
| 221 |
|
| 222 |
+
<!-- Dedicated history view, reachable from the header icon on every step.
|
| 223 |
+
This is the "dedicated way to access history" the step-1 teaser card
|
| 224 |
+
alone didn't provide, since that card only exists on step 1. -->
|
| 225 |
+
<section class="step" data-step="history">
|
| 226 |
+
<div class="card">
|
| 227 |
+
<h2>Your consultations</h2>
|
| 228 |
+
<p class="helper-text">Tap any message to reopen it.</p>
|
| 229 |
+
<input type="text" class="search-input" id="history-search" placeholder="Search your messages" aria-label="Search your consultations">
|
| 230 |
+
<div id="history-full-list" style="margin-top: var(--space-4);"></div>
|
| 231 |
+
<p class="helper-text" id="history-empty-text" style="display: none;"></p>
|
| 232 |
+
</div>
|
| 233 |
+
<button type="button" class="btn btn-secondary" id="history-back-btn">Back</button>
|
| 234 |
+
</section>
|
| 235 |
+
|
| 236 |
<div class="nav-link"><a href="/provider">Go to provider view</a></div>
|
| 237 |
|
| 238 |
{% endblock %}
|
templates/provider.html
CHANGED
|
@@ -42,9 +42,26 @@
|
|
| 42 |
<p>Review what each patient said, then send your reply.</p>
|
| 43 |
</div>
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
<div class="card">
|
|
|
|
| 46 |
<div id="pending-list"></div>
|
| 47 |
-
<p class="helper-text" id="empty-pending" style="display: none;">
|
| 48 |
</div>
|
| 49 |
</section>
|
| 50 |
|
|
@@ -61,16 +78,36 @@
|
|
| 61 |
|
| 62 |
<div id="detail-content" style="display: none;">
|
| 63 |
<div class="card">
|
| 64 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
<div class="chat-thread">
|
| 66 |
<div class="chat-bubble from-patient">
|
| 67 |
<span class="chat-label" id="respond-language-label">Patient</span>
|
| 68 |
<span id="respond-translated-text"></span>
|
| 69 |
</div>
|
| 70 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
<div class="nlu-summary" id="respond-nlu-summary"></div>
|
| 72 |
</div>
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
<div class="card">
|
| 75 |
<label for="response-text-input">Your reply (in English)</label>
|
| 76 |
<div class="chip-row" id="quick-reply-chips">
|
|
@@ -80,6 +117,34 @@
|
|
| 80 |
<button type="button" class="chip" data-text="I need a bit more detail, please describe your symptoms further.">Need more detail</button>
|
| 81 |
</div>
|
| 82 |
<textarea id="response-text-input" rows="4" placeholder="Type your reply here"></textarea>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
</div>
|
| 84 |
|
| 85 |
<div class="btn-row">
|
|
|
|
| 42 |
<p>Review what each patient said, then send your reply.</p>
|
| 43 |
</div>
|
| 44 |
|
| 45 |
+
<!-- "Active" here means "currently open in this workspace" - this app
|
| 46 |
+
has no multi-provider login/claim system, so that's the only honest
|
| 47 |
+
meaning available. It's a single client-side slot, not a backend
|
| 48 |
+
concept. -->
|
| 49 |
+
<div class="queue-tabs" role="tablist">
|
| 50 |
+
<button type="button" class="queue-tab active" data-tab="waiting" role="tab" aria-selected="true">
|
| 51 |
+
Waiting <span class="tab-count" id="tab-count-waiting">0</span>
|
| 52 |
+
</button>
|
| 53 |
+
<button type="button" class="queue-tab" data-tab="active" role="tab" aria-selected="false">
|
| 54 |
+
Active <span class="tab-count" id="tab-count-active">0</span>
|
| 55 |
+
</button>
|
| 56 |
+
<button type="button" class="queue-tab" data-tab="completed" role="tab" aria-selected="false">
|
| 57 |
+
Completed <span class="tab-count" id="tab-count-completed">0</span>
|
| 58 |
+
</button>
|
| 59 |
+
</div>
|
| 60 |
+
|
| 61 |
<div class="card">
|
| 62 |
+
<input type="text" class="search-input" id="queue-search" placeholder="Search by language or message" aria-label="Search consultations" style="margin-bottom: var(--space-4);">
|
| 63 |
<div id="pending-list"></div>
|
| 64 |
+
<p class="helper-text" id="empty-pending" style="display: none;"></p>
|
| 65 |
</div>
|
| 66 |
</section>
|
| 67 |
|
|
|
|
| 78 |
|
| 79 |
<div id="detail-content" style="display: none;">
|
| 80 |
<div class="card">
|
| 81 |
+
<div class="workspace-meta">
|
| 82 |
+
<span>Reference number: <span class="interaction-id" id="respond-interaction-id"></span></span>
|
| 83 |
+
<span class="status-badge waiting" id="respond-status-badge">Waiting for your reply</span>
|
| 84 |
+
</div>
|
| 85 |
+
<p class="helper-text" id="respond-meta-line"></p>
|
| 86 |
+
|
| 87 |
<div class="chat-thread">
|
| 88 |
<div class="chat-bubble from-patient">
|
| 89 |
<span class="chat-label" id="respond-language-label">Patient</span>
|
| 90 |
<span id="respond-translated-text"></span>
|
| 91 |
</div>
|
| 92 |
</div>
|
| 93 |
+
|
| 94 |
+
<details class="original-transcript">
|
| 95 |
+
<summary>Show original message (<span id="respond-original-language"></span>)</summary>
|
| 96 |
+
<p id="respond-original-text"></p>
|
| 97 |
+
</details>
|
| 98 |
+
|
| 99 |
<div class="nlu-summary" id="respond-nlu-summary"></div>
|
| 100 |
</div>
|
| 101 |
|
| 102 |
+
<!-- Only shown when this patient has other consultations on record.
|
| 103 |
+
Read-only context for understanding this message, not clickable -
|
| 104 |
+
switching the whole workspace to a different consultation from
|
| 105 |
+
here would risk a provider replying to the wrong one. -->
|
| 106 |
+
<div class="card" id="patient-history-card" style="display: none;">
|
| 107 |
+
<h3>This patient's other consultations</h3>
|
| 108 |
+
<div id="patient-history-list"></div>
|
| 109 |
+
</div>
|
| 110 |
+
|
| 111 |
<div class="card">
|
| 112 |
<label for="response-text-input">Your reply (in English)</label>
|
| 113 |
<div class="chip-row" id="quick-reply-chips">
|
|
|
|
| 117 |
<button type="button" class="chip" data-text="I need a bit more detail, please describe your symptoms further.">Need more detail</button>
|
| 118 |
</div>
|
| 119 |
<textarea id="response-text-input" rows="4" placeholder="Type your reply here"></textarea>
|
| 120 |
+
|
| 121 |
+
<button type="button" class="btn btn-secondary" id="preview-response-btn" style="margin-top: var(--space-3); width: 100%;">
|
| 122 |
+
<span class="btn-spinner spinner" style="display: none;"></span>
|
| 123 |
+
<span class="btn-label">Preview what the patient will get</span>
|
| 124 |
+
</button>
|
| 125 |
+
|
| 126 |
+
<!-- Real translation + real speech synthesis, same pipeline as an
|
| 127 |
+
actual send, just not saved. Each click costs the same as
|
| 128 |
+
sending, since it's a genuine API call, not a mock. -->
|
| 129 |
+
<div class="preview-block" id="preview-block" style="display: none;">
|
| 130 |
+
<p class="preview-label">Preview — exactly what the patient will receive</p>
|
| 131 |
+
<div class="chat-bubble from-provider" id="preview-text-bubble"></div>
|
| 132 |
+
<div class="audio-player">
|
| 133 |
+
<audio id="preview-audio" preload="metadata"></audio>
|
| 134 |
+
<div class="audio-player-controls">
|
| 135 |
+
<button type="button" class="audio-btn" id="preview-audio-play-btn" aria-label="Play">
|
| 136 |
+
<svg class="icon-play" viewBox="0 0 24 24" fill="currentColor"><polygon points="6 3 20 12 6 21 6 3"/></svg>
|
| 137 |
+
<svg class="icon-pause" viewBox="0 0 24 24" fill="currentColor" style="display: none;"><rect x="5" y="3" width="5" height="18" rx="1"/><rect x="14" y="3" width="5" height="18" rx="1"/></svg>
|
| 138 |
+
</button>
|
| 139 |
+
<button type="button" class="audio-btn audio-btn-sm" id="preview-audio-replay-btn" aria-label="Replay from start">
|
| 140 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>
|
| 141 |
+
</button>
|
| 142 |
+
<span class="audio-time" id="preview-audio-current-time">0:00</span>
|
| 143 |
+
<input type="range" class="audio-seek" id="preview-audio-seek" min="0" max="0" value="0" step="0.1" aria-label="Seek audio position">
|
| 144 |
+
<span class="audio-time" id="preview-audio-duration">0:00</span>
|
| 145 |
+
</div>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
</div>
|
| 149 |
|
| 150 |
<div class="btn-row">
|