first commit
This commit is contained in:
42
application/models/m_pasien.php
Normal file
42
application/models/m_pasien.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
class M_pasien extends CI_Model {
|
||||
function index() {
|
||||
$this->db->where('pp_tanggal_periksa', date("Y-m-d"));
|
||||
$this->db->join('proses_ruang_tunggu', 'prt_pengunjung_id = pp_id', 'LEFT');
|
||||
$this->db->join('master_klinik', 'mk_id = pp_klinik_id');
|
||||
$query = $this->db->get('proses_pengunjung');
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function edit($id) {
|
||||
$this->db->where('pp_id', $id);
|
||||
$this->db->join('proses_ruang_tunggu', 'prt_pengunjung_id = pp_id', 'LEFT');
|
||||
$this->db->join('master_klinik', 'mk_id = pp_klinik_id');
|
||||
$query = $this->db->get('proses_pengunjung');
|
||||
return $query;
|
||||
}
|
||||
|
||||
function prosesedit() {
|
||||
$update_pp = array(
|
||||
'pp_rekamedik' => $this->input->post('norek'),
|
||||
//'pp_klinik_id' => $this->input->post('klinik'),
|
||||
//'pp_shift' => $this->input->post('shift'),
|
||||
//'pp_pembayaran' => $this->input->post('pembayaran'),
|
||||
);
|
||||
$id = $this->input->post('id');
|
||||
$this->db->where('pp_id', $id);
|
||||
$this->db->update('proses_pengunjung', $update_pp);
|
||||
}
|
||||
|
||||
function view($id) {
|
||||
$this->db->where('mu_id', $id);
|
||||
$query = $this->db->get('master_user');
|
||||
return $query;
|
||||
}
|
||||
|
||||
function delete($id) {
|
||||
$this->db->where('mu_id', $id);
|
||||
$this->db->delete('master_user');
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user