Backend Service

This commit is contained in:
2019-03-16 02:48:45 +00:00
parent bccad002ff
commit bbaca4324e
3 changed files with 27 additions and 8 deletions
@@ -10,6 +10,7 @@ class Provider extends Provider_Controller {
$this->load->model('patient_model');
$out = $this->patient_model->getPatientList();
$data["patient_list"] = $out["patient_list"];
$_SESSION['patient_count']=5;
$this->renderProviderSecurePage('dash', $data);
}
@@ -0,0 +1,18 @@
<?php
class Dash_model extends CI_Model {
function __construct() {
}
public function getPatientCount(){
$mysql = "SELECT p.practice_id,p.id AS patient_id,p.member_id,p.long_id,m.firstname,m.lastname,m.phone,p.added "
." FROM patients p LEFT JOIN members m ON m.id=p.member_id ORDER BY p.added DESC";
$query = $this->db->query($mysql);
$num = $query->num_rows();
$data["patient_list"] = $query->result();
return $data;
}
}
@@ -5,7 +5,7 @@
<div class="col-xxl-3 col-lg-6">
<div class="p-20 border-lg-right border-bottom border-xxl-bottom-0">
<div class="d-flex m-b-10">
<p class="mb-0 font-regular text-muted font-weight-bold">Total Visits</p>
<p class="mb-0 font-regular text-muted font-weight-bold">Encounters</p>
<a class="mb-0 ml-auto font-weight-bold" href="#"><i class="ti ti-more-alt"></i> </a>
</div>
<div class="d-block d-sm-flex h-100 align-items-center">
@@ -13,8 +13,8 @@
<div id="analytics7"></div>
</div>
<div class="statistics mt-3 mt-sm-0 ml-sm-auto text-center text-sm-right">
<h3 class="mb-0"><i class="icon-arrow-up-circle"></i> 15,640</h3>
<p>Monthly visitor</p>
<h3 class="mb-0"><i class="icon-arrow-up-circle"></i> 0</h3>
<p>Find Encounter</p>
</div>
</div>
</div>
@@ -22,7 +22,7 @@
<div class="col-xxl-3 col-lg-6">
<div class="p-20 border-xxl-right border-bottom border-xxl-bottom-0">
<div class="d-flex m-b-10">
<p class="mb-0 font-regular text-muted font-weight-bold">Total Cost</p>
<p class="mb-0 font-regular text-muted font-weight-bold">Schedule</p>
<a class="mb-0 ml-auto font-weight-bold" href="#"><i class="ti ti-more-alt"></i> </a>
</div>
<div class="d-block d-sm-flex h-100 align-items-center">
@@ -30,7 +30,7 @@
<div id="analytics8"></div>
</div>
<div class="statistics mt-3 mt-sm-0 ml-sm-auto text-center text-sm-right">
<h3 class="mb-0"><i class="icon-arrow-up-circle"></i> 16,656</h3>
<h3 class="mb-0"><i class="icon-arrow-up-circle"></i>0</h3>
<p>This month</p>
</div>
</div>
@@ -39,7 +39,7 @@
<div class="col-xxl-3 col-lg-6">
<div class="p-20 border-lg-right border-bottom border-lg-bottom-0">
<div class="d-flex m-b-10">
<p class="mb-0 font-regular text-muted font-weight-bold">Total Sales</p>
<p class="mb-0 font-regular text-muted font-weight-bold">Patients</p>
<a class="mb-0 ml-auto font-weight-bold" href="#"><i class="ti ti-more-alt"></i> </a>
</div>
<div class="d-block d-sm-flex h-100 align-items-center">
@@ -47,8 +47,8 @@
<div id="analytics9"></div>
</div>
<div class="statistics mt-3 mt-sm-0 ml-sm-auto text-center text-sm-right">
<h3 class="mb-0"><i class="icon-arrow-up-circle"></i>569</h3>
<p>Avg. Sales per day</p>
<h3 class="mb-0"><i class="icon-arrow-up-circle"></i><?=!isset($_SESSION['patient_count'])?0:$_SESSION['patient_count'];?></h3>
<p>Find Patient</p>
</div>
</div>
</div>