This commit is contained in:
Olusesan Ameye
2021-02-20 22:09:42 -05:00
parent 77255bba83
commit 67f744c1f2
7 changed files with 47 additions and 18 deletions
@@ -61,8 +61,8 @@ class Patient extends Provider_Controller {
$patient_id = $this->uri->segment(3);
}
// echo $patient_id;
$this->selectedPatientView($patient_id);
// echo $patient_id;
$this->selectedPatientView($patient_id);
}
public function findpatient(){
@@ -79,10 +79,10 @@ class Patient extends Provider_Controller {
}
private function selectedPatientView($patient_id){
$data=[];
$data['patient_id'] =$patient_id;
$this->load->model('patient_model');
$out = $this->patient_model->LoadPatient(0, $data['patient_id']);
$out = $this->patient_model->LoadPatient($_SESSION['practice_id'], $data['patient_id']);
// print_r($out);
$data['firstname'] = $out["patient_return"][0]->firstname;
@@ -8,7 +8,7 @@ class Patient_model extends CI_Model {
public 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::date "
$mysql = "SELECT p.practice_id,p.id AS patient_id,p.member_id,p.long_id,m.firstname,m.lastname,m.phone,p.added::date ,m.gender,m.dob::date AS dob"
. " FROM patients p LEFT JOIN members m ON m.id=p.member_id WHERE p.practice_id=" . $_SESSION['practice_id'] . " ORDER BY p.added DESC";
$query = $this->db->query($mysql);
$num = $query->num_rows();
@@ -16,18 +16,19 @@
<thead>
<tr>
<th style="width:20px;">#</th>
<th style="width:40px;">Select</th>
<th>Name</th>
<th style="width:20px;">DOB</th>
<th style="width:20px;">Gender</th>
<th style="width:80px;">Phone</th>
<th style="width:50px;">Chart</th>
<th style="width:50px;">Status</th>
<th style="width:20px;">Action</th>
</tr>
</thead>
<tbody>
<?php
$darr = array();
$patient_list = isset($patient_list) ? $patient_list : $darr;
//print_r($patient_list);
$icc = 0;
foreach ($patient_list as $prow) {
$icc++;
@@ -35,11 +36,13 @@
<tr>
<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><a href="/patient/selectPatient/<?=$prow->patient_id ?>"><?= $prow->firstname ?> <?= $prow->lastname ?></a></td>
<td><?=$prow->dob ?></td>
<td><?=$prow->gender ?></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> <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></!-->
</tr>
<?
}
@@ -50,12 +53,13 @@
</tbody>
<tfoot>
<tr>
<th>#</th>
<th style="width:20px;">#</th>
<th style="width:40px;">Select</th>
<th>Name</th>
<th>Phone</th>
<th>Chart</th>
<th>Status</th>
<th>Action</th>
<th style="width:20px;">DOB</th>
<th style="width:20px;">Gender</th>
<th style="width:80px;">Phone</th>
<th style="width:50px;">Status</th>
</tr>
</tfoot>
</table>
@@ -36,9 +36,9 @@
</div>
<div class="dropdown">
<!-- a class="btn btn-round btn-inverse-primary btn-xs" href="#">View all </a -->
<button type="button" class="btn btn-primary btn-sm">Reminders</button>
<button type="button" class="btn btn-outline-primary btn-sm">Tracking</button>
<button type="button" class="btn btn-info btn-sm">Charts</button>
<button type="button" onclick="selectPatienFetures(<?=$patient_id?>,'REMIDERS');" class="btn btn-primary btn-sm">Reminders</button>
<button type="button" onclick="selectPatienFetures(<?=$patient_id?>,'TRACKING');" class="btn btn-outline-primary btn-sm">Tracking</button>
<button type="button" onclick="selectPatienFetures(<?=$patient_id?>,'CHARTS');" class="btn btn-info btn-sm">Charts</button>
</div>
</div>
<div class="card-body">
@@ -148,6 +148,9 @@
<div class="col-lg-6 col-xxl-4 m-b-30">
<div id="action_detail">
</div>
<div class="card card-statistics h-100 mb-0">
<div class="card-header d-flex justify-content-between">
@@ -393,3 +396,25 @@
<!-- end app-container -->
<!-- begin footer -->
<script type="text/javascript">
<!--
function selectPatienFetures(patient_id,patient_action) {
// alert(pending_practice_id);
$('#action_detail').html('Processing...');
// $('#acc' + pending_practice_id).prop('disabled', true);
$.ajax({
url: "/practice/selectPatienFetures?proc=PROCESS&patient_id=" + patient_id + "&patient_action=" +patient_action
}).done(function (data) {
$('#action_detail').html(data);
// $('#acc' + pending_practice_id).prop('disabled', false);
});
return false;
}
// -->
</script>