

<?php $__env->startSection('content'); ?>

<style type="text/css">
    table{
        width: 100%;
    }
</style>


    <div class="row">
        <div class="large-12 columns">
            <div class="row">
                <div class="small-12 medium-12 large-12 columns">
                    <h4>Patients Dashboard</h4>
                </div>
            </div>

            <div class="row">
                <div class="small-12 medium-12 large-12 columns">
                    <p>Review of provider patient list. </p>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
      	<div class="small-12 medium-12 large-12 columns">
          <table>
                    <thead>
                        <tr>
                            <th>Medical ID</th>
                            <th>Name</th>
                            <th>Gender</th>
                            <th>Date Of Birth</th>
                            <th>Password</th> 
                            
                        </tr>
                    </thead>
                    <tbody>
                        
                        <?php foreach($patients as $patient): ?>
                            <tr>
                                <td><a href="<?php echo e(URL::to('patients', $patient->pid)); ?>"><?php echo $patient->pid; ?></a></td>
                                <td><a href="<?php echo e(URL::to('patients', $patient->pid)); ?>"><?php echo $patient->fname; ?> <?php echo $patient->lname; ?></a></td>
                                <td><?php echo $patient->sex; ?></td>
                                <td><?php echo date("F d Y",strtotime($patient->DOB)); ?></td>
                                <td>
                                <?php if($patient->email): ?>
                                    <form action="<?php echo e(URL::to('password-reminder')); ?>" method="POST" data-abide>
                                            <div class="row">
                                                <div class="small-12 medium-6 large-6 columns">
                                                    <label>Username</label><input required type="email" id="username" name="username" readonly="true" value="<?php echo $patient->email; ?>">
                                                </div>
                                                <div class="small-12 medium-6 large-6 columns">
                                                    <label>&nbsp;</label><button class="expand">Send Reminder</button>
                                                </div>
                                            </div>
                                    </form> 
                                    <?php else: ?>
                                    
                                            <div class="row">
                                                <div class="small-12 medium-6 large-6 columns">
                                                    <label>Username</label><input required type="email" id="email" name="email">
                                                </div>
                                                <div class="small-12 medium-6 large-6 columns">
                                                    <label>&nbsp;</label><button class="expand">Create User</button>
                                                </div>
                                            </div>

                                <?php endif; ?>
                                </td>
                            </tr>
                        <?php endforeach; ?>

                    </tbody>
                    
                </table>
                
                <?php echo $patients->links(); ?>

      	</div>
    </div>

    <div class="row">
        <div class="small-6 medium-3 large-3 columns">
            <a href="<?php echo e(URL::to('patients/create')); ?>" class="button expand">New Patient</a>
        </div>
        
        <div class="small-6 medium-3 large-3 end columns">
            <a href="<?php echo e(URL::to('patient-data/upload')); ?>" class="button expand">Data Upload/Download</a>
        </div>
        
        
    </div>

    
<?php $__env->stopSection(); ?>

<?php echo $__env->make('master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>