This commit is contained in:
Olusesan Ameye
2021-02-20 21:16:59 -05:00
parent 25bd22d245
commit 77255bba83
4 changed files with 21 additions and 14 deletions
@@ -69,8 +69,6 @@ class Patient extends Provider_Controller {
$out = array(); $out = array();
$out = $this->getPatientList(); $out = $this->getPatientList();
$data["patient_list"] = $out["patient_list"]; $data["patient_list"] = $out["patient_list"];
$this->renderProviderSecurePage('patient/findpatient', $data); $this->renderProviderSecurePage('patient/findpatient', $data);
} }
@@ -97,7 +95,7 @@ private function selectedPatientView($patient_id){
private function getPatientList() { private function getPatientList() {
$mysql = "SELECT p.practice_id,p.id AS patient_id,p.member_id,p.long_id,m.firstname,m.lastname,m.phone,p.added " $mysql = "SELECT p.practice_id,p.id AS patient_id,p.member_id,p.long_id,m.firstname,m.lastname,m.phone,p.added,m.gender,m.dob::date AS dob "
. " FROM patients p LEFT JOIN members m ON m.id=p.member_id ORDER BY p.added DESC"; . " FROM patients p LEFT JOIN members m ON m.id=p.member_id ORDER BY p.added DESC";
$query = $this->db->query($mysql); $query = $this->db->query($mysql);
$num = $query->num_rows(); $num = $query->num_rows();
@@ -13,12 +13,15 @@
<table id="datatable" class="table table-borderless table-striped"> <table id="datatable" class="table table-borderless table-striped">
<thead> <thead>
<tr> <tr>
<th>#</th> <th style="width:10px;">#</th>
<th style="width:40px;">Select</th>
<th>Name</th> <th>Name</th>
<th>Gender</th>
<th>Age</th>
<th style="width:40px;">DOB</th>
<th>Phone</th> <th>Phone</th>
<th>Chart</th> <th style="width:20px;">Status</th>
<th>Status</th> <!--th>Action</!--th-->
<th>Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -33,11 +36,14 @@
<tr> <tr>
<td><?= $icc ?></td> <td><?= $icc ?></td>
<td><a href="/patient/selectPatient/<?= $prow->patient_id ?>"><button type="button" class="btn btn-info btn-sm">Select</button></a></td>
<td><?= $prow->firstname ?> <?= $prow->lastname ?></td> <td><?= $prow->firstname ?> <?= $prow->lastname ?></td>
<td><?= $prow->gender ?></td>
<td><?= $prow->dob ?></td>
<td><?= $prow->dob ?></td>
<td><?= $prow->phone ?></td> <td><?= $prow->phone ?></td>
<td><a href="/patient/chart/<?= $prow->patient_id ?>"><button type="button" class="btn btn-info btn-sm">Chart</button></a></td>
<td><span class="badge badge-success-inverse">Active</span></td> <td><span class="badge badge-success-inverse">Active</span></td>
<td> <a class="mr-3" href="javascript:void(0);" onclick="selectPatient(<?= $prow->patient_id ?>)" ><i class="fe fe-edit"></i></a><a href="javascript:void(0);" onclick="calendarPatient(<?= $prow->patient_id ?>)"><i class="fe fe-calendar"></i></a></td> <!--td> <a class="mr-3" href="javascript:void(0);" onclick="selectPatient(<?= $prow->patient_id ?>)" ><i class="fe fe-edit"></i></a><a href="javascript:void(0);" onclick="calendarPatient(<?= $prow->patient_id ?>)"><i class="fe fe-calendar"></i></a></td -->
</tr> </tr>
<? <?
} }
@@ -48,12 +54,15 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<th>#</th> <th style="width:10px;">#</th>
<th style="width:40px;">Select</th>
<th>Name</th> <th>Name</th>
<th>Gender</th>
<th>Age</th>
<th>DOB</th>
<th>Phone</th> <th>Phone</th>
<th>Chart</th>
<th>Status</th> <th>Status</th>
<th>Action</th> <!--th>Action</!--th-->
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
@@ -44,7 +44,7 @@
<div id="link_result">[]</div> <div id="link_result">[]</div>
</div> </div>
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<button type="submit" id="link_submit" class="btn btn-primary" onclick="return connectLinkID()">Search</button> <button type="submit" id="link_submit" class="btn btn-primary btn-block" onclick="return connectLinkID()">Search</button>
</div> </div>
</div> </div>
</form> </form>
@@ -69,7 +69,7 @@
</a> </a>
<div class="dropdown-menu animated fadeIn" aria-labelledby="navbarDropdown"> <div class="dropdown-menu animated fadeIn" aria-labelledby="navbarDropdown">
<a class="dropdown-item nav-link" href="/patient/addnew">Add Patient</a> <a class="dropdown-item nav-link" href="/patient/addnew">Add Patient</a>
<a class="dropdown-item nav-link" href="/patient/report">Find Patient</a> <a class="dropdown-item nav-link" href="/patient/findpatient">Find Patient</a>
</div> </div>
</li> </li>
<li class="nav-item full-screen d-none d-lg-block" id="btnFullscreen"> <li class="nav-item full-screen d-none d-lg-block" id="btnFullscreen">