prepare( "SELECT pr.*, p.patient_name, p.patient_id as patient_system_id, p.address, p.phone_number, u.username as doctor_name FROM prescriptions pr JOIN patients p ON pr.patient_id = p.id JOIN users u ON pr.doctor_id = u.id WHERE pr.id = ?" ); $stmt->execute([$prescription_id]); $prescription = $stmt->fetch(PDO::FETCH_ASSOC); if (!$prescription) { die("Prescription not found."); } ?> Prescription for <?= htmlspecialchars($prescription['patient_name']) ?>

Prescription

Date:

Patient Details
Name:
Patient ID:
Address:
Prescribing Doctor
Dr.
ClinicFlow Medical Center

Rx

Medication Dosage Frequency
Notes:

Back to Profile