{% extends 'dashboard_screen/base.html' %}

{% block content %}

            <!-- ============================================================== -->
            <!-- Start right Content here -->
            <!-- ============================================================== -->
            <div class="content-page">
                <!-- Start content -->
                <div class="content">
                    <div class="container">
                        <div class="row">

                            <div class="col-lg-12">
                                 <!-- Basic Form Wizard -->

                            	<div class="card-box">
                            		<h4 class="m-t-0 header-title"><b>All Patients</b></h4>
                                <div class="panel">
                                        {% if Patients %}

                                        <div class="panel-body">


                                            <div class="">
                                	            <table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
                                                    <thead>
                                                        <tr>
                                                            <th>External ID</th>
                                                            <th>Full Name</th>
                                                            <th>DOB</th>
                                                            <th>SSN</th>
                                                            <th>Actions</th>
                                                        </tr>
                                                    </thead>
	                                                <tbody>
                                                    {% for patient in Patients %}

                                                        {% if forloop.counter|divisibleby:2 %}
                                                            <tr class="gradeX">
                                                                <td>{{ patient.ext_id }}</td>
                                                                <td>{{ patient.first_name }} {{ patient.last_name }}</td>
                                                                <td>{{ patient.dob }}</td>
                                                                <td>{{ patient.show_SSN }}</td>
                                                               <td class="actions">
                                                                    <a href="/dashboard/edit_patient/{{ patient.patient_id }}/" class="on-default edit-row"><i class="fa fa-pencil"></i></a>
                                                                    <a href="/dashboard/del_patient/{{ patient.patient_id }}/" class="on-default remove-row"><i class="fa fa-trash-o"></i></a>
                                                                    <a href="/dashboard/new_entry/{{ patient.patient_id }}/" class="on-default edit-row"><i class="fa ion-aperture"></i></a>
                                                                </td>
                                                            </tr>
                                                        {% else %}
                                                            <tr class="gradeC">
                                                                <td>{{ patient.ext_id }}</td>
                                                                <td>{{ patient.first_name }} {{ patient.last_name }}</td>
                                                                <td>{{ patient.dob }}</td>
                                                                <td>{{ patient.show_SSN }}</td>
                                                                <td class="actions">
                                                                    <a href="/dashboard/edit_patient/{{ patient.patient_id }}/" class="on-default edit-row"><i class="fa fa-pencil"></i></a>
                                                                    <a href="/dashboard/del_patient/{{ patient.patient_id }}/" class="on-default remove-row"><i class="fa fa-trash-o"></i></a>
                                                                    <a href="/dashboard/new_entry/{{ patient.patient_id }}/" class="on-default edit-row"><i class="fa ion-aperture"></i></a>
                                                                </td>
                                                            </tr>
                                                        {% endif %}

                                                    {% endfor %}



                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                        <!-- end: page -->
                                        {% endif %}

                                    </div> <!-- end Panel -->



                            	</div>


                            <!-- End row -->

                            </div> <!-- end col -->
                        </div>

						<!-- end row -->



                    </div> <!-- container -->

                </div> <!-- content -->


{% endblock %}