66 lines
3.7 KiB
PHP
66 lines
3.7 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',
|
|
qh_t('Nursing vitals', 'علامات التمريض'),
|
|
qh_t('Nursing workspace.', 'مساحة عمل التمريض.')
|
|
);
|
|
?>
|
|
<div class="container-fluid container-xxl px-3 px-lg-4">
|
|
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-4">
|
|
<div>
|
|
<h1 class="h3 mb-0 text-gray-800 fw-bold"><?= qh_h(qh_t('Nursing Workspace', 'مساحة عمل التمريض')) ?></h1>
|
|
<p class="text-muted mb-0 mt-1"><?= qh_h(qh_t('Capture vitals and release patients to doctors.', 'سجّل العلامات الحيوية ثم حوّل المرضى إلى الأطباء.')) ?></p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card shadow-sm border-0 mb-4">
|
|
<div class="card-header bg-white border-bottom py-3 d-flex justify-content-between align-items-center">
|
|
<h5 class="mb-0 font-weight-bold text-dark"><?= qh_h(qh_t('Waiting for Vitals', 'بانتظار العلامات الحيوية')) ?></h5>
|
|
<span class="badge bg-secondary rounded-pill"><?= qh_h(count($waitingTickets) . ' ' . qh_t('patients', 'مرضى')) ?></span>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
<?php if ($waitingTickets): ?>
|
|
<div class="vstack gap-3">
|
|
<?php foreach ($waitingTickets as $ticket): ?>
|
|
<div class="border rounded p-3 bg-light">
|
|
<div class="d-flex justify-content-between align-items-start flex-wrap gap-3 mb-3">
|
|
<div>
|
|
<div class="fw-bold fs-5 text-dark"><?= qh_h($ticket['ticket_number']) ?></div>
|
|
<div class="fw-semibold mt-1 text-dark"><?= qh_h($ticket['patient_name']) ?></div>
|
|
<div class="small text-muted mt-1"><?= qh_h(qh_name($ticket, 'clinic_name')) ?> • <?= qh_h(qh_name($ticket, 'doctor_name')) ?> • <?= qh_h(qh_t('Rm', 'غرفة')) ?> <?= qh_h($ticket['doctor_room'] ?? '--') ?></div>
|
|
</div>
|
|
<div class="d-flex gap-2 flex-wrap align-items-center">
|
|
<?= qh_status_badge($ticket['status']) ?>
|
|
<a class="btn btn-sm btn-outline-secondary bg-white shadow-sm" href="<?= qh_h(qh_url('ticket.php', ['id' => (int) $ticket['id']])) ?>"><?= qh_h(qh_t('Details', 'تفاصيل')) ?></a>
|
|
</div>
|
|
</div>
|
|
<form method="post" class="row g-3 align-items-end">
|
|
<input type="hidden" name="ticket_id" value="<?= qh_h((string) $ticket['id']) ?>">
|
|
<div class="col-lg-9">
|
|
<label class="form-label text-dark fw-semibold small"><?= qh_h(qh_t('Vitals note', 'ملاحظة العلامات الحيوية')) ?></label>
|
|
<textarea class="form-control bg-white" name="vitals_notes" rows="2" placeholder="<?= qh_h(qh_t('Blood pressure, pulse, temperature...', 'الضغط والنبض والحرارة...')) ?>" required></textarea>
|
|
</div>
|
|
<div class="col-lg-3 d-grid">
|
|
<button class="btn btn-success shadow-sm" type="submit"><i class="bi bi-check2-circle me-1"></i><?= qh_h(qh_t('Send to Doctor', 'إرسال للطبيب')) ?></button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="text-center py-5 text-muted">
|
|
<p class="mb-0"><?= qh_h(qh_t('No patients are waiting for vitals.', 'لا يوجد مرضى بانتظار العلامات الحيوية.')) ?></p>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php qh_page_end(); ?>
|