Autosave: 20260426-100123
This commit is contained in:
parent
f396d9f9c5
commit
a0b66aacf5
@ -12,7 +12,7 @@ $editId = (int) ($_GET['edit'] ?? 0);
|
||||
$editDoctor = $editId > 0 ? qh_fetch_doctor($editId) : null;
|
||||
|
||||
if ($editId > 0 && $editDoctor === null) {
|
||||
qh_set_flash('warning', qh_t('The requested doctor record was not found.', 'لم يتم العثور على سجل الطبيب المطلوب.'));
|
||||
qh_set_flash('warning', qh_t('The requested room record was not found.', 'لم يتم العثور على سجل الغرفة المطلوب.'));
|
||||
qh_redirect('admin_doctors.php');
|
||||
}
|
||||
|
||||
@ -36,8 +36,8 @@ if ($search !== '') {
|
||||
|
||||
qh_page_start(
|
||||
'admin',
|
||||
qh_t('Doctor management', 'إدارة الأطباء'),
|
||||
qh_t('Professional doctor directory with search, edit, and delete actions.', 'دليل احترافي للأطباء مع البحث وخيارات التعديل والحذف.')
|
||||
qh_t('Room management', 'إدارة الغرف'),
|
||||
qh_t('Professional room directory with search, edit, and delete actions.', 'دليل احترافي للغرف مع البحث وخيارات التعديل والحذف.')
|
||||
);
|
||||
?>
|
||||
<div class="container-xxl px-3 px-lg-4">
|
||||
@ -49,10 +49,10 @@ qh_page_start(
|
||||
<div class="admin-content-stack">
|
||||
<section class="page-header-panel admin-hero-panel mb-0">
|
||||
<div>
|
||||
<span class="section-kicker"><?= qh_h(qh_t('Doctor directory', 'دليل الأطباء')) ?></span>
|
||||
<span class="section-kicker"><?= qh_h(qh_t('Room directory', 'دليل الغرف')) ?></span>
|
||||
<div class="locale-chip mt-3"><?= qh_h(qh_current_language_badge()) ?></div>
|
||||
<h1 class="section-title-xl mt-2 mb-2"><?= qh_h(qh_t('Dedicated doctor management with clear actions.', 'إدارة مستقلة للأطباء مع إجراءات واضحة.')) ?></h1>
|
||||
<p class="section-copy mb-0"><?= qh_h(qh_t('Search doctors, edit assignments, and manage room records from a focused page.', 'ابحث عن الأطباء وعدّل التعيينات وأدر سجلات الغرف من صفحة مركزة.')) ?></p>
|
||||
<h1 class="section-title-xl mt-2 mb-2"><?= qh_h(qh_t('Dedicated room management with clear actions.', 'إدارة مستقلة للغرف مع إجراءات واضحة.')) ?></h1>
|
||||
<p class="section-copy mb-0"><?= qh_h(qh_t('Search rooms, edit assignments, and manage room records from a focused page.', 'ابحث عن الغرف وعدّل التعيينات وأدر سجلات الغرف من صفحة مركزة.')) ?></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -60,15 +60,15 @@ qh_page_start(
|
||||
<div class="admin-toolbar">
|
||||
<form method="get" class="admin-search-form" role="search">
|
||||
<input type="hidden" name="lang" value="<?= qh_h(qh_locale()) ?>">
|
||||
<label class="visually-hidden" for="doctorSearch"><?= qh_h(qh_t('Search doctors', 'البحث عن الأطباء')) ?></label>
|
||||
<input id="doctorSearch" class="form-control" type="search" name="q" value="<?= qh_h($search) ?>" placeholder="<?= qh_h(qh_t('Search by doctor, clinic, or room', 'ابحث باسم الطبيب أو العيادة أو الغرفة')) ?>">
|
||||
<label class="visually-hidden" for="doctorSearch"><?= qh_h(qh_t('Search rooms', 'البحث عن الغرف')) ?></label>
|
||||
<input id="doctorSearch" class="form-control" type="search" name="q" value="<?= qh_h($search) ?>" placeholder="<?= qh_h(qh_t('Search by clinic or room number', 'ابحث بالعيادة أو رقم الغرفة')) ?>">
|
||||
<button class="btn btn-dark" type="submit"><?= qh_h(qh_t('Search', 'بحث')) ?></button>
|
||||
<?php if ($search !== ''): ?>
|
||||
<a class="btn btn-outline-dark" href="<?= qh_h(qh_url('admin_doctors.php')) ?>"><?= qh_h(qh_t('Reset', 'إعادة ضبط')) ?></a>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
<?php if ($editDoctor !== null): ?>
|
||||
<a class="btn btn-outline-dark" href="<?= qh_h(qh_url('admin_doctors.php')) ?>"><?= qh_h(qh_t('Add new doctor', 'إضافة طبيب جديد')) ?></a>
|
||||
<a class="btn btn-outline-dark" href="<?= qh_h(qh_url('admin_doctors.php')) ?>"><?= qh_h(qh_t('Add new room', 'إضافة غرفة جديدة')) ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
@ -77,25 +77,24 @@ qh_page_start(
|
||||
<section class="panel-card admin-table-card">
|
||||
<div class="admin-section-head">
|
||||
<div>
|
||||
<span class="section-kicker"><?= qh_h(qh_t('Doctor list', 'قائمة الأطباء')) ?></span>
|
||||
<h2 class="section-title mt-2 mb-1"><?= qh_h(qh_t('Doctors and room assignments', 'الأطباء وتعيينات الغرف')) ?></h2>
|
||||
<span class="section-kicker"><?= qh_h(qh_t('Room list', 'قائمة الغرف')) ?></span>
|
||||
<h2 class="section-title mt-2 mb-1"><?= qh_h(qh_t('Rooms and clinic assignments', 'الغرف وتعيينات العيادات')) ?></h2>
|
||||
<p class="section-copy mb-0"><?= qh_h($search !== ''
|
||||
? qh_t('Filtered results based on your search.', 'نتائج مفلترة بناءً على البحث.')
|
||||
: qh_t('All configured doctor records.', 'جميع سجلات الأطباء المهيأة.')) ?></p>
|
||||
: qh_t('All configured room records.', 'جميع سجلات الغرف المهيأة.')) ?></p>
|
||||
</div>
|
||||
<div class="admin-count-chip"><?= qh_h((string) count($doctors)) ?> <?= qh_h(qh_t('records', 'سجلات')) ?></div>
|
||||
</div>
|
||||
|
||||
<?php if ($doctors === []): ?>
|
||||
<div class="empty-state compact mt-4"><strong><?= qh_h(qh_t('No doctor records match this view.', 'لا توجد سجلات أطباء مطابقة لهذا العرض.')) ?></strong><span><?= qh_h(qh_t('Try another search or create a new doctor profile.', 'جرّب بحثاً آخر أو أنشئ ملف طبيب جديد.')) ?></span></div>
|
||||
<div class="empty-state compact mt-4"><strong><?= qh_h(qh_t('No room records match this view.', 'لا توجد سجلات غرف مطابقة لهذا العرض.')) ?></strong><span><?= qh_h(qh_t('Try another search or create a new room.', 'جرّب بحثاً آخر أو أنشئ غرفة جديدة.')) ?></span></div>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive mt-4">
|
||||
<table class="table align-middle admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= qh_h(qh_t('Doctor', 'الطبيب')) ?></th>
|
||||
<th><?= qh_h(qh_t('Clinic', 'العيادة')) ?></th>
|
||||
<th><?= qh_h(qh_t('Room', 'الغرفة')) ?></th>
|
||||
<th><?= qh_h(qh_t('Room no.', 'رقم الغرفة')) ?></th>
|
||||
<th><?= qh_h(qh_t('Order', 'الترتيب')) ?></th>
|
||||
<th><?= qh_h(qh_t('Actions', 'الإجراءات')) ?></th>
|
||||
</tr>
|
||||
@ -104,17 +103,13 @@ qh_page_start(
|
||||
<?php foreach ($doctors as $doctor): ?>
|
||||
<?php $editUrl = qh_url('admin_doctors.php', ['edit' => (int) $doctor['id'], 'q' => $search]); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="fw-semibold"><?= qh_h(qh_name($doctor)) ?></div>
|
||||
<div class="small text-secondary"><?= qh_h(qh_is_ar() ? (string) ($doctor['name_en'] ?? '') : (string) ($doctor['name_ar'] ?? '')) ?></div>
|
||||
</td>
|
||||
<td><?= qh_h(qh_name($doctor, 'clinic_name', qh_t('Unassigned', 'غير محدد'))) ?></td>
|
||||
<td><span class="room-badge"><?= qh_h((string) $doctor['room_number']) ?></span></td>
|
||||
<td><?= qh_h((string) $doctor['sort_order']) ?></td>
|
||||
<td>
|
||||
<div class="admin-table-actions">
|
||||
<a class="btn btn-sm btn-outline-dark" href="<?= qh_h($editUrl) ?>"><?= qh_h(qh_t('Edit', 'تعديل')) ?></a>
|
||||
<form method="post" onsubmit="return confirm('<?= qh_h(qh_t('Delete this doctor record?', 'هل تريد حذف سجل هذا الطبيب؟')) ?>');">
|
||||
<form method="post" onsubmit="return confirm('<?= qh_h(qh_t('Delete this room record?', 'هل تريد حذف سجل هذه الغرفة؟')) ?>');">
|
||||
<input type="hidden" name="action" value="delete_doctor">
|
||||
<input type="hidden" name="doctor_id" value="<?= qh_h((string) $doctor['id']) ?>">
|
||||
<input type="hidden" name="return_to" value="admin_doctors.php">
|
||||
@ -133,14 +128,14 @@ qh_page_start(
|
||||
<section class="panel-card admin-form-card">
|
||||
<div class="admin-section-head">
|
||||
<div>
|
||||
<span class="section-kicker"><?= qh_h($editDoctor ? qh_t('Edit doctor', 'تعديل الطبيب') : qh_t('New doctor', 'طبيب جديد')) ?></span>
|
||||
<h2 class="section-title mt-2 mb-1"><?= qh_h($editDoctor ? qh_t('Update doctor profile', 'تحديث ملف الطبيب') : qh_t('Create doctor profile', 'إنشاء ملف الطبيب')) ?></h2>
|
||||
<p class="section-copy mb-0"><?= qh_h(qh_t('Store both English and Arabic names while keeping the page language separate.', 'احفظ الاسمين الإنجليزي والعربي مع إبقاء لغة الصفحة منفصلة.')) ?></p>
|
||||
<span class="section-kicker"><?= qh_h($editDoctor ? qh_t('Edit room', 'تعديل الغرفة') : qh_t('New room', 'غرفة جديدة')) ?></span>
|
||||
<h2 class="section-title mt-2 mb-1"><?= qh_h($editDoctor ? qh_t('Update room profile', 'تحديث ملف الغرفة') : qh_t('Create room profile', 'إنشاء ملف الغرفة')) ?></h2>
|
||||
<p class="section-copy mb-0"><?= qh_h(qh_t('Create each room using only its room number and clinic assignment.', 'أنشئ كل غرفة باستخدام رقم الغرفة وتعيين العيادة فقط.')) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($clinics === []): ?>
|
||||
<div class="empty-state compact mt-4"><strong><?= qh_h(qh_t('Clinics are required first.', 'يجب إعداد العيادات أولاً.')) ?></strong><span><?= qh_h(qh_t('Create at least one clinic before assigning doctors.', 'أنشئ عيادة واحدة على الأقل قبل تعيين الأطباء.')) ?></span></div>
|
||||
<div class="empty-state compact mt-4"><strong><?= qh_h(qh_t('Clinics are required first.', 'يجب إعداد العيادات أولاً.')) ?></strong><span><?= qh_h(qh_t('Create at least one clinic before adding rooms.', 'أنشئ عيادة واحدة على الأقل قبل إضافة الغرف.')) ?></span></div>
|
||||
<a class="btn btn-dark mt-3" href="<?= qh_h(qh_url('admin_clinics.php')) ?>"><?= qh_h(qh_t('Open clinics page', 'فتح صفحة العيادات')) ?></a>
|
||||
<?php else: ?>
|
||||
<form method="post" class="vstack gap-3 mt-4">
|
||||
@ -150,16 +145,6 @@ qh_page_start(
|
||||
<input type="hidden" name="doctor_id" value="<?= qh_h((string) $editDoctor['id']) ?>">
|
||||
<?php endif; ?>
|
||||
|
||||
<div>
|
||||
<label class="form-label" for="doctorNameEn"><?= qh_h(qh_t('Doctor name (English)', 'اسم الطبيب بالإنجليزية')) ?></label>
|
||||
<input id="doctorNameEn" class="form-control" type="text" name="name_en" value="<?= qh_h((string) ($editDoctor['name_en'] ?? '')) ?>" required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="form-label" for="doctorNameAr"><?= qh_h(qh_t('Doctor name (Arabic)', 'اسم الطبيب بالعربية')) ?></label>
|
||||
<input id="doctorNameAr" class="form-control" type="text" name="name_ar" value="<?= qh_h((string) ($editDoctor['name_ar'] ?? '')) ?>" required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="form-label" for="doctorClinic"><?= qh_h(qh_t('Clinic', 'العيادة')) ?></label>
|
||||
<select id="doctorClinic" class="form-select" name="clinic_id" required>
|
||||
@ -181,7 +166,7 @@ qh_page_start(
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-wrap gap-2 pt-2">
|
||||
<button class="btn btn-dark" type="submit"><?= qh_h($editDoctor ? qh_t('Save changes', 'حفظ التعديلات') : qh_t('Add doctor', 'إضافة طبيب')) ?></button>
|
||||
<button class="btn btn-dark" type="submit"><?= qh_h($editDoctor ? qh_t('Save changes', 'حفظ التعديلات') : qh_t('Add room', 'إضافة غرفة')) ?></button>
|
||||
<?php if ($editDoctor): ?>
|
||||
<a class="btn btn-outline-dark" href="<?= qh_h(qh_url('admin_doctors.php')) ?>"><?= qh_h(qh_t('Cancel edit', 'إلغاء التعديل')) ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
5
cookies.txt
Normal file
5
cookies.txt
Normal file
@ -0,0 +1,5 @@
|
||||
# Netscape HTTP Cookie File
|
||||
# https://curl.se/docs/http-cookies.html
|
||||
# This file was generated by libcurl! Edit at your own risk.
|
||||
|
||||
127.0.0.1 FALSE / FALSE 0 PHPSESSID 9optbb072qiaveg8isb51b72e4
|
||||
@ -189,7 +189,7 @@ qh_page_start(
|
||||
<?= qh_h(qh_t('Vitals', 'العلامات الحيوية')) ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="small text-muted mb-1 text-truncate w-100" title="<?= qh_h(qh_name($ticket, 'doctor_name', qh_t('Doctor', 'الطبيب'))) ?>"><?= qh_h(qh_name($ticket, 'doctor_name', qh_t('Doctor', 'الطبيب'))) ?></div>
|
||||
<div class="small text-muted mb-1 text-truncate w-100" title="<?= qh_h(qh_name($ticket, 'clinic_name')) ?>"><?= qh_h(qh_name($ticket, 'clinic_name')) ?></div>
|
||||
<div class="bg-primary text-white rounded px-2 py-1 small fw-bold mt-1 mb-2">
|
||||
<?= qh_h(qh_t('Room', 'غرفة')) ?> <?= qh_h($ticket['doctor_room'] ?? '--') ?>
|
||||
</div>
|
||||
@ -232,7 +232,7 @@ qh_page_start(
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<span class="text-muted fw-semibold lh-sm" style="font-size: 0.7rem;"><?= qh_h(qh_t('Doctor Wait', 'انتظار الطبيب')) ?></span>
|
||||
<span class="text-muted fw-semibold lh-sm" style="font-size: 0.7rem;"><?= qh_h(qh_t('Room Wait', 'انتظار الغرف')) ?></span>
|
||||
<span class="badge bg-info text-dark rounded-pill px-2"><?= qh_h((string) $row['doctor_waiting']) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
22
doctor.php
22
doctor.php
@ -11,14 +11,14 @@ $doctorQueue = $selectedDoctorId > 0 ? qh_fetch_tickets(['ready_for_doctor', 'ca
|
||||
|
||||
qh_page_start(
|
||||
'doctor',
|
||||
qh_t('Doctor queue', 'طابور الطبيب'),
|
||||
qh_t('Doctor workspace.', 'مساحة عمل الطبيب.')
|
||||
qh_t('Room queue', 'طابور الغرفة'),
|
||||
qh_t('Room 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('Doctor Workspace', 'مساحة عمل الطبيب')) ?></h1>
|
||||
<h1 class="h3 mb-0 text-gray-800 fw-bold"><?= qh_h(qh_t('Room Workspace', 'مساحة عمل الغرفة')) ?></h1>
|
||||
<p class="text-muted mb-0 mt-1"><?= qh_h(qh_t('Call the next patient and manage room flow.', 'نادِ المريض التالي وأدر حركة الغرفة.')) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -33,17 +33,17 @@ qh_page_start(
|
||||
<form method="get" class="vstack gap-3">
|
||||
<input type="hidden" name="lang" value="<?= qh_h(qh_locale()) ?>">
|
||||
<div>
|
||||
<label class="form-label fw-semibold text-dark"><?= qh_h(qh_t('Doctor room', 'غرفة الطبيب')) ?></label>
|
||||
<label class="form-label fw-semibold text-dark"><?= qh_h(qh_t('Room', 'الغرفة')) ?></label>
|
||||
<select class="form-select bg-light" name="doctor_id" onchange="this.form.submit()">
|
||||
<?php foreach ($doctors as $doctor): ?>
|
||||
<option value="<?= qh_h((string) $doctor['id']) ?>" <?= (int) $doctor['id'] === $selectedDoctorId ? 'selected' : '' ?>><?= qh_h(qh_name($doctor)) ?> · <?= qh_h(qh_t('Rm', 'غرفة')) ?> <?= qh_h($doctor['room_number']) ?></option>
|
||||
<option value="<?= qh_h((string) $doctor['id']) ?>" <?= (int) $doctor['id'] === $selectedDoctorId ? 'selected' : '' ?>><?= qh_h(qh_t('Room', 'غرفة')) ?> <?= qh_h($doctor['room_number']) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php if ($selectedDoctor): ?>
|
||||
<div class="p-3 bg-light rounded border mt-2">
|
||||
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1 small"><?= qh_h(qh_t('Active Doctor', 'الطبيب النشط')) ?></div>
|
||||
<div class="fw-bold text-dark fs-5 mb-1"><?= qh_h(qh_name($selectedDoctor)) ?></div>
|
||||
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1 small"><?= qh_h(qh_t('Active Room', 'الغرفة النشطة')) ?></div>
|
||||
<div class="fw-bold text-dark fs-5 mb-1"><?= qh_h(qh_t('Room', 'غرفة')) ?> <?= qh_h($selectedDoctor['room_number'] ?? '--') ?></div>
|
||||
<div class="text-muted small"><i class="bi bi-door-open me-1"></i><?= qh_h(qh_t('Room', 'الغرفة')) ?> <?= qh_h($selectedDoctor['room_number'] ?? '--') ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -61,7 +61,7 @@ qh_page_start(
|
||||
<div class="card-body p-0">
|
||||
<?php if (!$selectedDoctor): ?>
|
||||
<div class="text-center py-5 text-muted">
|
||||
<p class="mb-0"><?= qh_h(qh_t('Please select a doctor to view the queue.', 'يرجى اختيار طبيب لعرض الطابور.')) ?></p>
|
||||
<p class="mb-0"><?= qh_h(qh_t('Please select a room to view the queue.', 'يرجى اختيار غرفة لعرض الطابور.')) ?></p>
|
||||
</div>
|
||||
<?php elseif (empty($doctorQueue)): ?>
|
||||
<div class="text-center py-5 text-muted">
|
||||
@ -100,12 +100,12 @@ qh_page_start(
|
||||
|
||||
<div class="input-group input-group-sm ms-lg-2 mt-2 mt-lg-0" style="max-width: 180px;">
|
||||
<select name="refer_to_doctor_id" class="form-select border-secondary text-secondary">
|
||||
<option value=""><?= qh_h(qh_t('Refer to...', 'تحويل إلى...')) ?></option>
|
||||
<option value=""><?= qh_h(qh_t('Move to room...', 'نقل إلى...')) ?></option>
|
||||
<?php foreach ($doctors as $d): if ($d['id'] == $selectedDoctorId) continue; ?>
|
||||
<option value="<?= qh_h((string) $d['id']) ?>"><?= qh_h(qh_name($d)) ?></option>
|
||||
<option value="<?= qh_h((string) $d['id']) ?>"><?= qh_h(qh_t('Room', 'غرفة')) ?> <?= qh_h($d['room_number'] ?? '--') ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button class="btn btn-outline-secondary bg-white" type="submit" name="action" value="refer_ticket" title="<?= qh_h(qh_t('Refer Patient', 'تحويل المريض')) ?>">
|
||||
<button class="btn btn-outline-secondary bg-white" type="submit" name="action" value="refer_ticket" title="<?= qh_h(qh_t('Move ticket', 'نقل التذكرة')) ?>">
|
||||
<i class="bi bi-arrow-right-circle"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -270,7 +270,7 @@ function qh_project_name(string $fallback = 'Hospital Queue'): string
|
||||
return $candidate !== '' ? $candidate : $fallback;
|
||||
}
|
||||
|
||||
function qh_project_description(string $fallback = 'Bilingual hospital queue workflow for reception, nursing, doctors, and the public display.'): string
|
||||
function qh_project_description(string $fallback = 'Bilingual hospital queue workflow for reception, nursing, rooms, and the public display.'): string
|
||||
{
|
||||
$candidate = trim((string) ($_SERVER['PROJECT_DESCRIPTION'] ?? ''));
|
||||
return $candidate !== '' ? $candidate : $fallback;
|
||||
@ -487,8 +487,8 @@ function qh_admin_sections(): array
|
||||
'icon' => 'users',
|
||||
],
|
||||
'admin_doctors.php' => [
|
||||
'label' => qh_t('Doctors', 'الأطباء'),
|
||||
'description' => qh_t('Manage doctors, rooms, and assignments.', 'إدارة الأطباء والغرف والتعيينات.'),
|
||||
'label' => qh_t('Rooms', 'الغرف'),
|
||||
'description' => qh_t('Manage rooms, clinic mapping, and assignments.', 'إدارة الغرف وربطها بالعيادات والتعيينات.'),
|
||||
'icon' => 'doctor',
|
||||
],
|
||||
];
|
||||
@ -556,7 +556,7 @@ function qh_render_admin_sidebar(string $activePage, array $stats = []): void
|
||||
echo ' </nav>';
|
||||
echo ' <div class="admin-sidebar-meta">';
|
||||
echo ' <div class="admin-mini-stat"><span class="admin-mini-stat-value">' . qh_h((string) ($stats['clinics'] ?? 0)) . '</span><span class="admin-mini-stat-label">' . qh_h(qh_t('Clinics', 'العيادات')) . '</span></div>';
|
||||
echo ' <div class="admin-mini-stat"><span class="admin-mini-stat-value">' . qh_h((string) ($stats['doctors'] ?? 0)) . '</span><span class="admin-mini-stat-label">' . qh_h(qh_t('Doctors', 'الأطباء')) . '</span></div>';
|
||||
echo ' <div class="admin-mini-stat"><span class="admin-mini-stat-value">' . qh_h((string) ($stats['doctors'] ?? 0)) . '</span><span class="admin-mini-stat-label">' . qh_h(qh_t('Rooms', 'الغرف')) . '</span></div>';
|
||||
echo ' <div class="admin-mini-stat"><span class="admin-mini-stat-value">' . qh_h((string) ($stats['vitals_clinics'] ?? 0)) . '</span><span class="admin-mini-stat-label">' . qh_h(qh_t('Vitals-first clinics', 'العيادات التي تبدأ بالعلامات')) . '</span></div>';
|
||||
echo ' </div>';
|
||||
echo '</div>';
|
||||
@ -566,15 +566,15 @@ function qh_ticket_next_stop(array $ticket): string
|
||||
{
|
||||
return (int) ($ticket['clinic_requires_vitals'] ?? 0) === 1
|
||||
? qh_t('Nursing vitals', 'العلامات الحيوية في التمريض')
|
||||
: qh_t('Doctor waiting area', 'منطقة انتظار الطبيب');
|
||||
: qh_t('Room waiting area', 'منطقة انتظار الغرفة');
|
||||
}
|
||||
|
||||
function qh_ticket_last_note(array $ticket): string
|
||||
{
|
||||
return match ((string) ($ticket['status'] ?? '')) {
|
||||
'waiting_vitals' => qh_t('Proceed to nursing vitals first.', 'يرجى التوجه أولاً إلى العلامات الحيوية في التمريض.'),
|
||||
'ready_for_doctor' => qh_t('Wait for the doctor call on the public display.', 'انتظر نداء الطبيب على الشاشة العامة.'),
|
||||
'called' => qh_t('The patient has been called to the doctor room.', 'تم نداء المريض إلى غرفة الطبيب.'),
|
||||
'ready_for_doctor' => qh_t('Wait for the room call on the public display.', 'انتظر نداء الغرفة على الشاشة العامة.'),
|
||||
'called' => qh_t('The ticket has been called to the room.', 'تم نداء التذكرة إلى الغرفة.'),
|
||||
'in_progress' => qh_t('The consultation is currently in progress.', 'الاستشارة جارية حالياً.'),
|
||||
'done' => qh_t('The visit has been completed.', 'تم إكمال الزيارة.'),
|
||||
'no_show' => qh_t('The patient was marked as no-show.', 'تم تسجيل المريض كحالة عدم حضور.'),
|
||||
@ -666,7 +666,7 @@ function qh_render_nav(string $activePage): void
|
||||
'admin' => ['href' => qh_url('admin.php'), 'label' => qh_t('Admin', 'الإدارة')],
|
||||
'reception' => ['href' => qh_url('reception.php'), 'label' => qh_t('Reception', 'الاستقبال')],
|
||||
'nursing' => ['href' => qh_url('nursing.php'), 'label' => qh_t('Nursing', 'التمريض')],
|
||||
'doctor' => ['href' => qh_url('doctor.php'), 'label' => qh_t('Doctor', 'الطبيب')],
|
||||
'doctor' => ['href' => qh_url('doctor.php'), 'label' => qh_t('Room', 'الغرفة')],
|
||||
'users' => ['href' => qh_url('admin_users.php'), 'label' => qh_t('Users', 'المستخدمون')],
|
||||
'display' => ['href' => qh_url('display.php'), 'label' => qh_t('Display', 'الشاشة')],
|
||||
];
|
||||
@ -917,10 +917,11 @@ function qh_create_ticket(string $patientName, int $clinicId, int $doctorId, str
|
||||
|
||||
$doctor = qh_fetch_doctor($doctorId);
|
||||
if (!$doctor || (int) $doctor['clinic_id'] !== $clinicId) {
|
||||
throw new RuntimeException(qh_t('The doctor does not belong to the selected clinic.', 'الطبيب لا يتبع العيادة المحددة.'));
|
||||
throw new RuntimeException(qh_t('The selected room does not belong to the selected clinic.', 'الغرفة المحددة لا تتبع العيادة المحددة.'));
|
||||
}
|
||||
|
||||
$ticketNumber = qh_generate_ticket_number($clinic['code']);
|
||||
$patientName = trim($patientName) !== '' ? trim($patientName) : $ticketNumber;
|
||||
$status = $forcedStatus ?: ((int) $clinic['requires_vitals'] === 1 ? 'waiting_vitals' : 'ready_for_doctor');
|
||||
|
||||
$stmt = $pdo->prepare(
|
||||
@ -938,7 +939,7 @@ function qh_create_ticket(string $patientName, int $clinicId, int $doctorId, str
|
||||
'status' => $status,
|
||||
'display_note' => $status === 'waiting_vitals'
|
||||
? 'Proceed to nursing vitals first.'
|
||||
: 'Wait for your doctor call on the public screen.',
|
||||
: 'Wait for your room call on the public screen.',
|
||||
]);
|
||||
|
||||
return (int) $pdo->lastInsertId();
|
||||
@ -980,7 +981,7 @@ function qh_status_meta(string $status): array
|
||||
$map = [
|
||||
'waiting_vitals' => ['class' => 'warning', 'en' => 'Waiting for vitals', 'ar' => 'بانتظار العلامات الحيوية'],
|
||||
'nursing_called' => ['class' => 'primary', 'en' => 'Nursing Call', 'ar' => 'نداء التمريض'],
|
||||
'ready_for_doctor' => ['class' => 'info', 'en' => 'Ready for doctor', 'ar' => 'جاهز للطبيب'],
|
||||
'ready_for_doctor' => ['class' => 'info', 'en' => 'Ready for room', 'ar' => 'جاهز للغرفة'],
|
||||
'called' => ['class' => 'primary', 'en' => 'Called', 'ar' => 'تم النداء'],
|
||||
'in_progress' => ['class' => 'secondary', 'en' => 'In consultation', 'ar' => 'داخل العيادة'],
|
||||
'done' => ['class' => 'success', 'en' => 'Completed', 'ar' => 'مكتمل'],
|
||||
@ -1022,15 +1023,13 @@ function qh_call_message(array $ticket): array
|
||||
];
|
||||
}
|
||||
|
||||
$doctorNameEn = $ticket['doctor_name_en'] ?? 'Doctor';
|
||||
$doctorNameAr = $ticket['doctor_name_ar'] ?? 'الطبيب';
|
||||
$room = $ticket['doctor_room'] ?? '--';
|
||||
|
||||
return [
|
||||
'en' => sprintf('Ticket %s, please proceed to room %s for %s.', $ticketNumber, $room, $doctorNameEn),
|
||||
'ar' => sprintf('رقم التذكرة %s، يرجى التوجه إلى الغرفة %s إلى %s.', $ticketNumber, $room, $doctorNameAr),
|
||||
'speech_en' => sprintf('Ticket %s, please proceed to room %s for %s.', $speechEn, $room, $doctorNameEn),
|
||||
'speech_ar' => sprintf('رقم التذكرة %s، يرجى التوجه إلى الغرفة %s إلى %s.', $speechAr, $room, $doctorNameAr),
|
||||
'en' => sprintf('Ticket %s, please proceed to room %s.', $ticketNumber, $room),
|
||||
'ar' => sprintf('رقم التذكرة %s، يرجى التوجه إلى الغرفة %s.', $ticketNumber, $room),
|
||||
'speech_en' => sprintf('Ticket %s, please proceed to room %s.', $speechEn, $room),
|
||||
'speech_ar' => sprintf('رقم التذكرة %s، يرجى التوجه إلى الغرفة %s.', $speechAr, $room),
|
||||
];
|
||||
}
|
||||
|
||||
@ -1173,39 +1172,37 @@ function qh_admin_handle_request(): void
|
||||
$ticketCountStmt->execute(['clinic_id' => $clinicId]);
|
||||
$ticketCount = (int) $ticketCountStmt->fetchColumn();
|
||||
if ($doctorCount > 0 || $ticketCount > 0) {
|
||||
throw new InvalidArgumentException(qh_t('This clinic cannot be deleted because it is linked to doctors or patient tickets.', 'لا يمكن حذف هذه العيادة لأنها مرتبطة بأطباء أو تذاكر مرضى.'));
|
||||
throw new InvalidArgumentException(qh_t('This clinic cannot be deleted because it is linked to rooms or patient tickets.', 'لا يمكن حذف هذه العيادة لأنها مرتبطة بغرف أو تذاكر مرضى.'));
|
||||
}
|
||||
$stmt = $pdo->prepare("DELETE FROM hospital_queue_records WHERE item_type = 'clinic' AND id = :clinic_id");
|
||||
$stmt->execute(['clinic_id' => $clinicId]);
|
||||
qh_set_flash('success', qh_t('Clinic deleted successfully.', 'تم حذف العيادة بنجاح.'));
|
||||
} elseif ($action === 'add_doctor') {
|
||||
$nameEn = trim((string) ($_POST['name_en'] ?? ''));
|
||||
$nameAr = trim((string) ($_POST['name_ar'] ?? ''));
|
||||
$clinicId = (int) ($_POST['clinic_id'] ?? 0);
|
||||
$roomNumber = trim((string) ($_POST['room_number'] ?? ''));
|
||||
if ($nameEn === '' || $nameAr === '' || $clinicId <= 0 || $roomNumber === '') {
|
||||
throw new InvalidArgumentException(qh_t('Please complete the doctor form before saving.', 'يرجى إكمال بيانات الطبيب قبل الحفظ.'));
|
||||
$roomLabel = $roomNumber;
|
||||
if ($clinicId <= 0 || $roomNumber === '') {
|
||||
throw new InvalidArgumentException(qh_t('Please complete the room form before saving.', 'يرجى إكمال بيانات الغرفة قبل الحفظ.'));
|
||||
}
|
||||
$stmt = $pdo->prepare(
|
||||
"INSERT INTO hospital_queue_records (item_type, name_en, name_ar, clinic_id, room_number, sort_order, status)
|
||||
VALUES ('doctor', :name_en, :name_ar, :clinic_id, :room_number, :sort_order, 'active')"
|
||||
);
|
||||
$stmt->execute([
|
||||
'name_en' => $nameEn,
|
||||
'name_ar' => $nameAr,
|
||||
'name_en' => $roomLabel,
|
||||
'name_ar' => $roomLabel,
|
||||
'clinic_id' => $clinicId,
|
||||
'room_number' => $roomNumber,
|
||||
'sort_order' => max((int) ($_POST['sort_order'] ?? 50), 1),
|
||||
]);
|
||||
qh_set_flash('success', qh_t('Doctor profile saved.', 'تم حفظ ملف الطبيب.'));
|
||||
qh_set_flash('success', qh_t('Room saved.', 'تم حفظ الغرفة.'));
|
||||
} elseif ($action === 'update_doctor') {
|
||||
$doctorId = (int) ($_POST['doctor_id'] ?? 0);
|
||||
$nameEn = trim((string) ($_POST['name_en'] ?? ''));
|
||||
$nameAr = trim((string) ($_POST['name_ar'] ?? ''));
|
||||
$clinicId = (int) ($_POST['clinic_id'] ?? 0);
|
||||
$roomNumber = trim((string) ($_POST['room_number'] ?? ''));
|
||||
if ($doctorId <= 0 || $nameEn === '' || $nameAr === '' || $clinicId <= 0 || $roomNumber === '') {
|
||||
throw new InvalidArgumentException(qh_t('Please complete the doctor details before updating.', 'يرجى إكمال بيانات الطبيب قبل التحديث.'));
|
||||
$roomLabel = $roomNumber;
|
||||
if ($doctorId <= 0 || $clinicId <= 0 || $roomNumber === '') {
|
||||
throw new InvalidArgumentException(qh_t('Please complete the room details before updating.', 'يرجى إكمال بيانات الغرفة قبل التحديث.'));
|
||||
}
|
||||
$stmt = $pdo->prepare(
|
||||
"UPDATE hospital_queue_records
|
||||
@ -1217,28 +1214,28 @@ function qh_admin_handle_request(): void
|
||||
WHERE item_type = 'doctor' AND id = :doctor_id"
|
||||
);
|
||||
$stmt->execute([
|
||||
'name_en' => $nameEn,
|
||||
'name_ar' => $nameAr,
|
||||
'name_en' => $roomLabel,
|
||||
'name_ar' => $roomLabel,
|
||||
'clinic_id' => $clinicId,
|
||||
'room_number' => $roomNumber,
|
||||
'sort_order' => max((int) ($_POST['sort_order'] ?? 50), 1),
|
||||
'doctor_id' => $doctorId,
|
||||
]);
|
||||
qh_set_flash('success', qh_t('Doctor assignment updated.', 'تم تحديث تعيين الطبيب.'));
|
||||
qh_set_flash('success', qh_t('Room updated.', 'تم تحديث الغرفة.'));
|
||||
} elseif ($action === 'delete_doctor') {
|
||||
$doctorId = (int) ($_POST['doctor_id'] ?? 0);
|
||||
if ($doctorId <= 0) {
|
||||
throw new InvalidArgumentException(qh_t('Invalid doctor selected.', 'تم اختيار طبيب غير صالح.'));
|
||||
throw new InvalidArgumentException(qh_t('Invalid room selected.', 'تم اختيار غرفة غير صالحة.'));
|
||||
}
|
||||
$ticketCountStmt = $pdo->prepare("SELECT COUNT(*) FROM hospital_queue_records WHERE item_type = 'ticket' AND doctor_id = :doctor_id");
|
||||
$ticketCountStmt->execute(['doctor_id' => $doctorId]);
|
||||
$ticketCount = (int) $ticketCountStmt->fetchColumn();
|
||||
if ($ticketCount > 0) {
|
||||
throw new InvalidArgumentException(qh_t('This doctor cannot be deleted because patient tickets are linked to the profile.', 'لا يمكن حذف هذا الطبيب لأن هناك تذاكر مرضى مرتبطة بالملف.'));
|
||||
throw new InvalidArgumentException(qh_t('This room cannot be deleted because tickets are linked to the profile.', 'لا يمكن حذف هذه الغرفة لأن هناك تذاكر مرتبطة بالملف.'));
|
||||
}
|
||||
$stmt = $pdo->prepare("DELETE FROM hospital_queue_records WHERE item_type = 'doctor' AND id = :doctor_id");
|
||||
$stmt->execute(['doctor_id' => $doctorId]);
|
||||
qh_set_flash('success', qh_t('Doctor deleted successfully.', 'تم حذف الطبيب بنجاح.'));
|
||||
qh_set_flash('success', qh_t('Room deleted successfully.', 'تم حذف الغرفة بنجاح.'));
|
||||
} elseif ($action === 'save_hospital_profile') {
|
||||
$nameEn = trim((string) ($_POST['name_en'] ?? ''));
|
||||
$nameAr = trim((string) ($_POST['name_ar'] ?? ''));
|
||||
@ -1356,8 +1353,8 @@ function qh_reception_handle_request(): void
|
||||
$doctorId = (int) ($_POST['doctor_id'] ?? 0);
|
||||
$languagePref = trim((string) ($_POST['language_pref'] ?? 'en'));
|
||||
|
||||
if ($patientName === '' || $clinicId <= 0 || $doctorId <= 0) {
|
||||
throw new InvalidArgumentException(qh_t('Please complete the patient name, clinic, and doctor.', 'يرجى إدخال اسم المريض والعيادة والطبيب.'));
|
||||
if ($clinicId <= 0 || $doctorId <= 0) {
|
||||
throw new InvalidArgumentException(qh_t('Please choose the clinic and room.', 'يرجى اختيار العيادة والغرفة.'));
|
||||
}
|
||||
|
||||
$ticketId = qh_create_ticket($patientName, $clinicId, $doctorId, $languagePref);
|
||||
@ -1401,14 +1398,14 @@ function qh_nursing_handle_request(): void
|
||||
"UPDATE hospital_queue_records
|
||||
SET vitals_notes = :vitals_notes,
|
||||
status = 'ready_for_doctor',
|
||||
display_note = 'Vitals completed. Wait for doctor call.'
|
||||
display_note = 'Vitals completed. Wait for room call.'
|
||||
WHERE item_type = 'ticket' AND id = :ticket_id AND status IN ('waiting_vitals', 'nursing_called')"
|
||||
);
|
||||
$stmt->execute([
|
||||
'vitals_notes' => $vitalsNotes,
|
||||
'ticket_id' => $ticketId,
|
||||
]);
|
||||
qh_set_flash('success', qh_t('Vitals captured and patient moved to the doctor queue.', 'تم حفظ العلامات الحيوية ونقل المريض إلى طابور الطبيب.'));
|
||||
qh_set_flash('success', qh_t('Vitals captured and patient moved to the room queue.', 'تم حفظ العلامات الحيوية ونقل المريض إلى طابور الغرفة.'));
|
||||
}
|
||||
} catch (Throwable $exception) {
|
||||
qh_set_flash('danger', $exception->getMessage());
|
||||
@ -1429,7 +1426,7 @@ function qh_doctor_handle_request(): void
|
||||
$action = trim((string) ($_POST['action'] ?? ''));
|
||||
$ticket = qh_fetch_ticket($ticketId);
|
||||
if (!$ticket || $doctorId <= 0 || (int) $ticket['doctor_id'] !== $doctorId) {
|
||||
throw new InvalidArgumentException(qh_t('That ticket is not available for the selected doctor.', 'هذه التذكرة غير متاحة للطبيب المحدد.'));
|
||||
throw new InvalidArgumentException(qh_t('That ticket is not available for the selected room.', 'هذه التذكرة غير متاحة للغرفة المحددة.'));
|
||||
}
|
||||
|
||||
if ($action === 'call_ticket') {
|
||||
@ -1463,7 +1460,7 @@ function qh_doctor_handle_request(): void
|
||||
} elseif ($action === 'refer_ticket') {
|
||||
$referToDoctorId = (int) ($_POST["refer_to_doctor_id"] ?? 0);
|
||||
if ($referToDoctorId <= 0 || $referToDoctorId === $doctorId) {
|
||||
throw new InvalidArgumentException(qh_t('Please select a valid doctor to refer the patient to.', 'يرجى اختيار طبيب صالح لتحويل المريض إليه.'));
|
||||
throw new InvalidArgumentException(qh_t('Please select a valid room to move the ticket to.', 'يرجى اختيار غرفة صالحة لنقل التذكرة إليها.'));
|
||||
}
|
||||
$stmt = db()->prepare(
|
||||
"UPDATE hospital_queue_records
|
||||
@ -1474,7 +1471,7 @@ function qh_doctor_handle_request(): void
|
||||
'refer_to_doctor_id' => $referToDoctorId,
|
||||
'ticket_id' => $ticketId,
|
||||
]);
|
||||
qh_set_flash('success', qh_t('Patient referred successfully.', 'تم تحويل المريض بنجاح.'));
|
||||
qh_set_flash('success', qh_t('Ticket moved successfully.', 'تم نقل التذكرة بنجاح.'));
|
||||
} elseif ($action === 'mark_no_show') {
|
||||
$stmt = db()->prepare(
|
||||
"UPDATE hospital_queue_records
|
||||
|
||||
@ -12,14 +12,14 @@ $todayTickets = qh_fetch_tickets(['waiting_vitals', 'nursing_called', 'ready_for
|
||||
qh_page_start(
|
||||
'reception',
|
||||
qh_t('Reception', 'الاستقبال'),
|
||||
qh_t('Issue new tickets and manage patient flow.', 'إصدار التذاكر الجديدة وإدارة حركة المرضى.')
|
||||
qh_t('Issue privacy-friendly tickets by clinic and room.', 'إصدار تذاكر تراعي الخصوصية حسب العيادة والغرفة.')
|
||||
);
|
||||
?>
|
||||
<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('Reception', 'الاستقبال')) ?></h1>
|
||||
<p class="text-muted mb-0 mt-1"><?= qh_h(qh_t('Issue new tickets and manage patient flow.', 'إصدار التذاكر الجديدة وإدارة حركة المرضى.')) ?></p>
|
||||
<p class="text-muted mb-0 mt-1"><?= qh_h(qh_t('Issue privacy-friendly tickets by clinic and room.', 'إصدار تذاكر تراعي الخصوصية حسب العيادة والغرفة.')) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -31,10 +31,6 @@ qh_page_start(
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post" class="vstack gap-3" novalidate>
|
||||
<div>
|
||||
<label class="form-label fw-semibold text-dark"><?= qh_h(qh_t('Patient name', 'اسم المريض')) ?></label>
|
||||
<input class="form-control" type="text" name="patient_name" placeholder="Maha Ali" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="form-label fw-semibold text-dark"><?= qh_h(qh_t('Clinic', 'العيادة')) ?></label>
|
||||
<select class="form-select js-clinic-select" name="clinic_id" required>
|
||||
@ -45,13 +41,14 @@ qh_page_start(
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="form-label fw-semibold text-dark"><?= qh_h(qh_t('Doctor', 'الطبيب')) ?></label>
|
||||
<label class="form-label fw-semibold text-dark"><?= qh_h(qh_t('Room', 'الغرفة')) ?></label>
|
||||
<select class="form-select js-doctor-select" name="doctor_id" required>
|
||||
<option value=""><?= qh_h(qh_t('Choose doctor', 'اختر الطبيب')) ?></option>
|
||||
<option value=""><?= qh_h(qh_t('Choose room', 'اختر الغرفة')) ?></option>
|
||||
<?php foreach ($doctors as $doctor): ?>
|
||||
<option value="<?= qh_h((string) $doctor['id']) ?>" data-clinic-id="<?= qh_h((string) $doctor['clinic_id']) ?>"><?= qh_h(qh_name($doctor)) ?> · <?= qh_h(qh_t('Rm', 'غرفة')) ?> <?= qh_h($doctor['room_number']) ?></option>
|
||||
<option value="<?= qh_h((string) $doctor['id']) ?>" data-clinic-id="<?= qh_h((string) $doctor['clinic_id']) ?>"><?= qh_h(qh_t('Room', 'غرفة')) ?> <?= qh_h($doctor['room_number'] ?: '--') ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="form-text"><?= qh_h(qh_t('Each room is linked to the selected clinic behind the scenes.', 'كل غرفة مرتبطة بالعيادة المحددة في الخلفية.')) ?></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="form-label fw-semibold text-dark"><?= qh_h(qh_t('Preferred language', 'اللغة المفضلة')) ?></label>
|
||||
@ -74,8 +71,8 @@ qh_page_start(
|
||||
<div>
|
||||
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1 small"><?= qh_h(qh_t('Ticket Issued Successfully', 'تم إصدار التذكرة بنجاح')) ?></div>
|
||||
<div class="display-6 fw-bold mt-2 text-dark"><?= qh_h($currentTicket['ticket_number']) ?></div>
|
||||
<div class="mt-2 fw-semibold fs-5 text-dark"><?= qh_h($currentTicket['patient_name']) ?></div>
|
||||
<div class="text-muted mt-1"><?= qh_h(qh_name($currentTicket, 'clinic_name')) ?> • <?= qh_h(qh_name($currentTicket, 'doctor_name')) ?> • <?= qh_h(qh_t('Rm', 'غرفة')) ?> <?= qh_h($currentTicket['doctor_room'] ?? '--') ?></div>
|
||||
<div class="mt-2 fw-semibold fs-5 text-dark"><?= qh_h(qh_name($currentTicket, 'clinic_name')) ?></div>
|
||||
<div class="text-muted mt-1"><?= qh_h(qh_t('Room', 'غرفة')) ?> <?= qh_h($currentTicket['doctor_room'] ?? '--') ?></div>
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-lg-end gap-2">
|
||||
<?= qh_status_badge($currentTicket['status']) ?>
|
||||
@ -107,8 +104,8 @@ qh_page_start(
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="border-0 px-4 py-3"><?= qh_h(qh_t('Ticket', 'التذكرة')) ?></th>
|
||||
<th class="border-0 py-3"><?= qh_h(qh_t('Patient', 'المريض')) ?></th>
|
||||
<th class="border-0 py-3"><?= qh_h(qh_t('Clinic', 'العيادة')) ?></th>
|
||||
<th class="border-0 py-3"><?= qh_h(qh_t('Room', 'الغرفة')) ?></th>
|
||||
<th class="border-0 py-3"><?= qh_h(qh_t('Status', 'الحالة')) ?></th>
|
||||
<th class="border-0 px-4 py-3 text-end"></th>
|
||||
</tr>
|
||||
@ -117,8 +114,8 @@ qh_page_start(
|
||||
<?php foreach ($todayTickets as $ticket):
|
||||
?><tr >
|
||||
<td class="fw-bold px-4 py-3 text-dark"><?= qh_h($ticket['ticket_number']) ?></td>
|
||||
<td class="py-3"><?= qh_h($ticket['patient_name']) ?></td>
|
||||
<td class="py-3 text-muted"><?= qh_h(qh_name($ticket, 'clinic_name')) ?></td>
|
||||
<td class="py-3 text-muted"><?= qh_h(qh_t('Room', 'غرفة')) ?> <?= qh_h($ticket['doctor_room'] ?? '--') ?></td>
|
||||
<td class="py-3"><?= qh_status_badge($ticket['status']) ?></td>
|
||||
<td class="text-end px-4 py-3"><a class="btn btn-sm btn-light border shadow-sm" href="<?= qh_h(qh_url('ticket.php', ['id' => (int) $ticket['id']])) ?>"><?= qh_h(qh_t('View', 'عرض')) ?></a></td>
|
||||
</tr>
|
||||
@ -144,12 +141,8 @@ qh_page_start(
|
||||
<div class="pt-token-number">
|
||||
<?= qh_h($currentTicket["ticket_number"]) ?>
|
||||
</div>
|
||||
<div class="pt-patient-name">
|
||||
<?= qh_h($currentTicket["patient_name"]) ?>
|
||||
</div>
|
||||
<div class="pt-divider"></div>
|
||||
<div class="pt-detail">
|
||||
<span class="pt-label"><?= qh_h(qh_t("Doctor", "الطبيب")) ?>:</span> <?= qh_h(qh_name($currentTicket, "doctor_name")) ?>
|
||||
<span class="pt-label"><?= qh_h(qh_t("Clinic", "العيادة")) ?>:</span> <?= qh_h(qh_name($currentTicket, "clinic_name")) ?>
|
||||
</div>
|
||||
<div class="pt-detail">
|
||||
<span class="pt-label"><?= qh_h(qh_t("Room", "الغرفة")) ?>:</span> <?= qh_h($currentTicket["doctor_room"] ?? "--") ?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user