Backend Service
This commit is contained in:
@@ -51,5 +51,7 @@ class Patient extends Provider_Controller {
|
||||
$data = array();
|
||||
$this->renderProviderSecurePage('patient/patientreport', $data);
|
||||
}
|
||||
|
||||
public function chart(){
|
||||
echo "patientChart";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Provider extends Provider_Controller {
|
||||
|
||||
//var $patient_model;
|
||||
public function index() {
|
||||
$data = array();
|
||||
$out = array();
|
||||
$this->load->model('patient_model');
|
||||
$out = $this->patient_model->getPatientList();
|
||||
$data["patient_list"] = $out["patient_list"];
|
||||
$this->renderProviderSecurePage('dash', $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
class Patient_model extends CI_Model {
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
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 "
|
||||
." 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;
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ $icc++;
|
||||
<td><?=$icc?></td>
|
||||
<td><?=$prow->firstname?> <?=$prow->lastname?></td>
|
||||
<td><?=$prow->phone?></td>
|
||||
<td><button type="button" class="btn btn-info btn-sm">Chart</button></td>
|
||||
<td><a href="/patient/chart"><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);"><i class="fe fe-edit"></i></a><a href="javascript:void(0);"><i class="fe fe-trash-2"></i></a></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user