<?= $this->extend('layout/management_layout') ?>
<?= $this->section('content') ?>
<div class="container-fluid">
    <div class="wrapper">
        <div class="content"></div>
                <h1>Health Records</h1>
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>Student ID</th>
                            <th>Name</th>
                            <th>Date of Birth</th>
                            <th>Allergies</th>
                            <th>Medical Conditions</th>
                            <th>Emergency Contact</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        // Example data - in a real scenario, this will be fetched from the database
                        $healthRecords = [
                            ['student_id' => 'S001', 'name' => 'John Doe', 'dob' => '2008-05-01', 'allergies' => 'Peanuts', 'conditions' => 'Asthma', 'emergency_contact' => 'john.doe@example.com'],
                            ['student_id' => 'S002', 'name' => 'Jane Smith', 'dob' => '2007-03-15', 'allergies' => 'None', 'conditions' => 'None', 'emergency_contact' => 'jane.smith@example.com'],
                            ['student_id' => 'S003', 'name' => 'Michael Johnson', 'dob' => '2006-09-20', 'allergies' => 'Latex', 'conditions' => 'Diabetes', 'emergency_contact' => 'michael.johnson@example.com'],
                            // Add more records as needed
                        ];

                        foreach ($healthRecords as $record) {
                            echo "<tr>
                                    <td>{$record['student_id']}</td>
                                    <td>{$record['name']}</td>
                                    <td>{$record['dob']}</td>
                                    <td>{$record['allergies']}</td>
                                    <td>{$record['conditions']}</td>
                                    <td>{$record['emergency_contact']}</td>
                                  </tr>";
                        }
                        ?>
                    </tbody>
                </table>
            </div>
        </div>
       <?= $this->endSection() ?>