65 lines
3.1 KiB
PHP
65 lines
3.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
require_once __DIR__ . '/queue_bootstrap.php';
|
|
qh_boot();
|
|
qh_nursing_handle_request();
|
|
|
|
$waitingTickets = qh_fetch_tickets(['waiting_vitals'], null, 20);
|
|
qh_page_start('nursing', 'Nursing vitals queue', 'Nursing queue for clinics that require vitals before the doctor visit.');
|
|
?>
|
|
<div class="container-xxl px-3 px-lg-4">
|
|
<section class="page-header-panel mb-4">
|
|
<div>
|
|
<span class="section-kicker">Nursing / التمريض</span>
|
|
<h1 class="section-title-xl mt-2">Capture vitals and release to doctor.</h1>
|
|
<p class="section-copy mb-0">Only tickets from clinics marked “requires vitals” arrive here. Once notes are saved, the same ticket continues to the doctor queue.</p>
|
|
</div>
|
|
</section>
|
|
|
|
<div class="panel-card">
|
|
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3">
|
|
<div>
|
|
<h2 class="section-title mb-1">Waiting for vitals / بانتظار العلامات الحيوية</h2>
|
|
<p class="section-copy mb-0">Add a short clinical note to transfer the patient to the assigned doctor.</p>
|
|
</div>
|
|
<span class="badge text-bg-warning px-3 py-2"><?= qh_h((string) count($waitingTickets)) ?> patients</span>
|
|
</div>
|
|
|
|
<?php if ($waitingTickets): ?>
|
|
<div class="vstack gap-3">
|
|
<?php foreach ($waitingTickets as $ticket): ?>
|
|
<div class="queue-row">
|
|
<div class="queue-row-head">
|
|
<div>
|
|
<div class="ticket-code"><?= qh_h($ticket['ticket_number']) ?></div>
|
|
<div class="fw-semibold"><?= qh_h($ticket['patient_name']) ?></div>
|
|
<div class="small text-secondary"><?= qh_h($ticket['clinic_name_en'] ?? '') ?> → <?= qh_h($ticket['doctor_name_en'] ?? '') ?> · Room <?= qh_h($ticket['doctor_room'] ?? '--') ?></div>
|
|
</div>
|
|
<div class="d-flex flex-column align-items-end gap-2">
|
|
<?= qh_status_badge($ticket['status']) ?>
|
|
<a class="btn btn-sm btn-outline-dark" href="ticket.php?id=<?= qh_h((string) $ticket['id']) ?>">Ticket detail</a>
|
|
</div>
|
|
</div>
|
|
<form method="post" class="row g-3 align-items-end mt-2">
|
|
<input type="hidden" name="ticket_id" value="<?= qh_h((string) $ticket['id']) ?>">
|
|
<div class="col-lg-9">
|
|
<label class="form-label">Vitals note / ملاحظة العلامات الحيوية</label>
|
|
<input class="form-control" type="text" name="vitals_notes" placeholder="BP 120/80 · Temp 36.8 · Weight 68kg" required>
|
|
</div>
|
|
<div class="col-lg-3 d-grid">
|
|
<button class="btn btn-dark" type="submit">Send to doctor</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="empty-state">
|
|
<strong>No patients waiting for vitals.</strong>
|
|
<span>Tickets from vitals-required clinics will appear here automatically after issue.</span>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php qh_page_end(); ?>
|