Exemple #1
0
 public function index()
 {
     $this->load->model('agama');
     $this->load->model('pendidikan');
     $this->load->model('daerah');
     $this->load->model('pasien_irj');
     $data['agama'] = $this->agama->get();
     $data['pendidikan'] = $this->pendidikan->get();
     $data['kabupaten'] = '[';
     foreach ($this->daerah->get_kabupaten() as $k) {
         $data['kabupaten'] .= '[\'' . $k->ID_DAERAH . '\',\'' . $k->NAMA_DAERAH . '\'],';
     }
     $data['kabupaten'] = substr($data['kabupaten'], 0, -1) . ']';
     $data['kecamatan'] = '[';
     foreach ($this->daerah->get_kecamatan() as $k) {
         $data['kecamatan'] .= '[\'' . $k->ID_KECAMATAN . '\',\'' . $k->NAMA_KECAMATAN . '\',\'' . $k->ID_DAERAH . '\'],';
     }
     $data['kecamatan'] = substr($data['kecamatan'], 0, -1) . ']';
     $data['kelurahan'] = '[';
     foreach ($this->daerah->get_kelurahan() as $k) {
         $data['kelurahan'] .= '[\'' . $k->ID_DESA . '\',\'' . $k->NAMA_DESA . '\',\'' . $k->ID_KECAMATAN . '\'],';
     }
     $data['kelurahan'] = substr($data['kelurahan'], 0, -1) . ']';
     load_main_template('Registrasi Pasien', 'Registrasi Pasien', 'registrasi_pasien', $data, 1);
 }
Exemple #2
0
 public function form($tipe = null, $nomor = null)
 {
     if ($tipe != 'medrec' && $tipe != 'ktp' || (!$nomor || $nomor == '')) {
         load_main_template('Pendaftaran Rawat Jalan', 'Pendaftaran Rawat Jalan', 'rawat_jalan', null, 2);
     } else {
         $this->load->model('pasien_irj');
         $this->load->model('r_jalan');
         $this->load->model('cara_bayar');
         $this->load->model('cara_berkunjung');
         $this->load->model('kontraktor');
         $this->load->model('poliklinik');
         $result = null;
         if ($tipe == 'medrec') {
             $result = $this->pasien_irj->cari_by_medrec($nomor);
         } else {
             if ($tipe == 'ktp') {
                 $result = $this->pasien_irj->cari_by_ktp($nomor);
             }
         }
         if ($result == null) {
             alert_fail('Pasien tidak ditemukan');
             redirect(base_url() . 'rawat_jalan/form');
         }
         $data['no_cm'] = $result->NO_MEDREC;
         $data['nama'] = $result->NAMA;
         $data['sex'] = $result->SEX;
         $data['no_bpjs'] = $result->NO_ASURANSI;
         $data['usia'] = $result->UMUR;
         $tgl_lahir = $result->TGL_LAHIR;
         $data['tgl_lahir'] = $tgl_lahir;
         if ($tgl_lahir != '') {
             $tgl_lahir_exploded = explode('-', $tgl_lahir);
             $usia = hitung_umur(intval($tgl_lahir_exploded[0]), intval($tgl_lahir_exploded[1]), intval($tgl_lahir_exploded[2]));
             $data['usia'] = $usia['tahun'] . ' tahun ' . $usia['bulan'] . ' bulan ' . $usia['hari'] . ' hari';
             //update usia pasien
             $data_update = ['NO_MEDREC' => $result->NO_MEDREC, 'UMUR' => $usia['tahun'], 'UBULAN' => $usia['bulan'], 'UHARI' => $usia['hari']];
             $this->pasien_irj->update($data_update);
             //selesai update usia pasien
         }
         $query = $this->r_jalan->get_historis($result->NO_MEDREC);
         $data['historis'] = $query;
         $query = $this->poliklinik->get_poli();
         $data['poli'] = $query;
         $query = $this->cara_berkunjung->get_cara_kunj();
         $data['kunj'] = $query;
         $query = $this->cara_bayar->get_cara_bayar();
         $data['bayar'] = $query;
         $query = $this->kontraktor->get_kontraktor();
         $data['perusahaan'] = $query;
         load_main_template('Pendaftaran Rawat Jalan', 'Pendaftaran Rawat Jalan', 'rawat_jalan', $data, 2);
     }
 }
Exemple #3
0
 public function form($tipe = null, $nomor = null)
 {
     if ($tipe != 'reg_irj' && $tipe != 'ipd' && $tipe != 'ktp' && $tipe != 'medrec' || (!$nomor || $nomor == '')) {
         load_main_template('Pendaftaran Rawat Inap', 'Pendaftaran Rawat Inap', 'rawat_inap', null, 3);
     } else {
         $data_pasien = null;
         if ($tipe == 'medrec') {
             $this->load->model('pasien_irj');
             $data_pasien = $this->pasien_irj->cari_by_medrec($nomor);
         } else {
             if ($tipe == 'ktp') {
                 $this->load->model('pasien_irj');
                 $data_pasien = $this->pasien_irj->cari_by_ktp($nomor);
             } else {
                 if ($tipe == 'reg_irj') {
                     $this->load->model('r_jalan');
                     $no_cm = $this->r_jalan->get_no_cm($nomor);
                     if ($no_cm) {
                         $this->load->model('pasien_irj');
                         $data_pasien = $this->pasien_irj->cari_by_medrec($no_cm);
                         $data_pasien->NOREGASAL = $nomor;
                     }
                 } else {
                     if ($tipe == 'ipd') {
                         $this->load->model('pasien_iri');
                         $entri_iri = $this->pasien_iri->get_pasien($nomor);
                         if ($entri_iri) {
                             $this->load->model('pasien_irj');
                             $data_pasien = $this->pasien_irj->cari_by_medrec($entri_iri->NO_CM);
                             $data_pasien = (object) array_merge((array) $data_pasien, (array) $entri_iri);
                         }
                     }
                 }
             }
         }
         if (!$data_pasien) {
             alert_fail('Pasien tidak ditemukan');
             redirect(base_url() . 'rawat_inap/form');
             return;
         }
         $this->load->model('cara_bayar');
         $this->load->model('cara_masuk');
         $this->load->model('dokter');
         $this->load->model('kontraktor');
         $this->load->model('ruang_rawat');
         $this->load->model('ruang_iri');
         $this->load->model('kelas');
         $this->load->model('bed');
         $this->load->model('smf');
         $data['dokter'] = $this->dokter->get_dokter();
         $data['kontraktor'] = $this->kontraktor->get_kontraktor();
         $data['cara_bayar'] = $this->cara_bayar->get_cara_bayar();
         $data['cara_masuk'] = $this->cara_masuk->get_cara_masuk();
         $data['ruang_rawat'] = $this->ruang_rawat->get_ruang_rawat();
         $data['kelas'] = $this->kelas->get_kelas();
         $data['bed'] = $this->bed->get_bed();
         $data['smf'] = $this->smf->get_smf();
         if ($tipe == 'ipd') {
             $data['ruang_iri'] = $this->ruang_iri->get_entri_by_ipd($nomor);
         }
         $tgl_lahir = $data_pasien->TGL_LAHIR;
         if ($tgl_lahir != '') {
             $tgl_lahir_exploded = explode('-', $tgl_lahir);
             $usia = hitung_umur(intval($tgl_lahir_exploded[0]), intval($tgl_lahir_exploded[1]), intval($tgl_lahir_exploded[2]));
             $data_pasien->UMUR = $usia['tahun'] . ' tahun ' . $usia['bulan'] . ' bulan ' . $usia['hari'] . ' hari';
             //update usia pasien
             $data_update = ['NO_MEDREC' => $data_pasien->NO_MEDREC, 'UMUR' => $usia['tahun'], 'UBULAN' => $usia['bulan'], 'UHARI' => $usia['hari']];
             $this->pasien_irj->update($data_update);
             //selesai update usia pasien
         }
         $data['pasien'] = $data_pasien;
         load_main_template('Pendaftaran Rawat Inap', 'Pendaftaran Rawat Inap', 'rawat_inap', $data, 3);
     }
 }
Exemple #4
0
 public function index()
 {
     $this->load->model('user');
     $data['user'] = $this->user->get_user();
     load_main_template('Manajemen', 'Manajemen Akun', 'manajemen', $data, 4);
 }
Exemple #5
0
 public function index()
 {
     load_main_template('Beranda', 'Sistem Informasi RSUP. Dr. Mohammad Hoesin', 'beranda', null, 0);
 }