diff --git a/includes/actions.php b/includes/actions.php
index c7e4b34..3ee6bbd 100644
--- a/includes/actions.php
+++ b/includes/actions.php
@@ -4,6 +4,7 @@ if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST')
require_once __DIR__ . '/../helpers.php';
$db = db();
+
// Check for post_max_size overflow
if (empty($_POST) && empty($_FILES) && isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > 0) {
$_SESSION['flash_message'] = 'Error: File too large (exceeds post_max_size).';
@@ -310,7 +311,7 @@ if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST')
} elseif ($_POST['action'] === 'edit_visit') {
$id = $_POST['id'] ?? '';
// Note: patient_id is not updated as it should be immutable
- $doctor_id = $_POST['doctor_id'] ?? '';
+ $doctor_id = $_POST['doctor_id'] ?: null;
$weight = $_POST['weight'] ?? '';
$bp = $_POST['blood_pressure'] ?? '';
$hr = $_POST['heart_rate'] ?? '';
@@ -343,7 +344,7 @@ if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST')
}
}
- if ($id && $doctor_id) {
+ if ($id) {
// Removed patient_id from UPDATE
$stmt = $db->prepare("UPDATE visits SET doctor_id = ?, weight = ?, blood_pressure = ?, heart_rate = ?, temperature = ?, symptoms = ?, diagnosis = ?, treatment_plan = ?, nursing_notes = ? WHERE id = ?");
$stmt->execute([$doctor_id, $weight, $bp, $hr, $temp, $symptoms, $diagnosis, $treatment, $nursing_notes, $id]);
diff --git a/includes/layout/footer.php b/includes/layout/footer.php
index 36f542c..a5797b6 100644
--- a/includes/layout/footer.php
+++ b/includes/layout/footer.php
@@ -1032,7 +1032,10 @@
-
+
+
@@ -1387,6 +1390,7 @@ function showRecordVisitModal(patientId = null) {
$('#visit_symptoms').summernote('code', '');
$('#visit_diagnosis').summernote('code', '');
$('#visit_treatment_plan').summernote('code', '');
+ $('#visit_nursing_notes').summernote('code', '');
// Clear dynamic rows
document.querySelector('#prescriptionTable tbody').innerHTML = '';
@@ -1456,8 +1460,7 @@ function showEditVisitModal(data) {
document.getElementById('visit_blood_pressure').value = data.blood_pressure || '';
document.getElementById('visit_heart_rate').value = data.heart_rate || '';
document.getElementById('visit_temperature').value = data.temperature || '';
- document.getElementById('visit_nursing_notes').value = data.nursing_notes || '';
-
+
// Populate new fields
$('#visit_patient_gender').val(data.patient_gender || '');
$('#visit_patient_dob').val(data.patient_dob || '');
@@ -1478,6 +1481,7 @@ function showEditVisitModal(data) {
$('#visit_symptoms').summernote('code', data.symptoms || '');
$('#visit_diagnosis').summernote('code', data.diagnosis || '');
$('#visit_treatment_plan').summernote('code', data.treatment_plan || '');
+ $('#visit_nursing_notes').summernote('code', data.nursing_notes || '');
// Populate prescriptions
const tbody = document.querySelector('#prescriptionTable tbody');
@@ -1518,6 +1522,7 @@ function showVisitResultsModal(data) {
BP: ${data.blood_pressure || '-'},
Weight: ${data.weight || '-'} kg,
Temp: ${data.temperature || '-'}°C
+ ,
Nursing Notes: ${data.nursing_notes || '-'}
`;
diff --git a/lang.php b/lang.php
index e6fb049..0ba5b69 100644
--- a/lang.php
+++ b/lang.php
@@ -367,6 +367,7 @@ $translations = array (
'dosage' => 'Dosage',
'instructions' => 'Instructions',
'add_drug' => 'Add Drug',
+ 'nursing_notes' => 'Nursing Notes',
),
'ar' =>
array (
@@ -735,5 +736,6 @@ $translations = array (
'dosage' => 'الجرعة',
'instructions' => 'التعليمات',
'add_drug' => 'إضافة دواء',
+ 'nursing_notes' => 'ملاحظات التمريض',
),
-);
\ No newline at end of file
+);
diff --git a/queue_display.php b/queue_display.php
index 0080994..2a9cb33 100644
--- a/queue_display.php
+++ b/queue_display.php
@@ -37,6 +37,7 @@ try {
padding: 20px;
text-align: center;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
+ position: relative;
}
.dept-card {
background: white;
@@ -168,6 +169,9 @@ try {
@@ -184,6 +188,17 @@ try {