From a287885db2a0a35667c5de51db0bb95f9d40f503 Mon Sep 17 00:00:00 2001 From: bhaktiar-igd Date: Sat, 8 Aug 2026 11:32:48 +0700 Subject: [PATCH] Perbaikan monitoring pasien ambulans 119 --- app/Config/Routes.php | 2 +- app/Controllers/Dashboard.php | 9 +- app/Controllers/Pasien.php | 37 +- app/Controllers/Pegawai.php | 2 +- app/Views/dashboard.php | 39 +- app/Views/input.php | 11 + app/Views/pasien/detail_riwayat.php | 223 +++++++++ app/Views/pasien/edit.php | 175 +++++++ app/Views/pasien/list.php | 662 +++++++++++++++++++++++++++ app/Views/pasien_aktif.php | 72 ++- app/Views/predispatch.php | 14 +- app/Views/tindakan/inputtindakan.php | 240 ++++++++++ app/Views/tindakan/pilih_pasien.php | 65 +++ 13 files changed, 1494 insertions(+), 57 deletions(-) create mode 100644 app/Views/pasien/detail_riwayat.php create mode 100644 app/Views/pasien/edit.php create mode 100644 app/Views/pasien/list.php create mode 100644 app/Views/tindakan/inputtindakan.php create mode 100644 app/Views/tindakan/pilih_pasien.php diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 7220821..42391cd 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -34,7 +34,7 @@ $routes->post('pasien/aktifkan', 'Pasien::aktifkan'); $routes->get('pasien/list', 'Pasien::list'); $routes->get('pasien/detail/(:num)', 'Pasien::detail/$1'); -$routes->match(['get','post'], 'pasien/hapus/(:num)', 'Pasien::hapus/$1'); +$routes->post('pasien/hapus/(:num)', 'Pasien::hapus/$1'); // BIODATA PASIEN $routes->get('pasien/biodata/(:any)', 'Pasien::biodata/$1'); diff --git a/app/Controllers/Dashboard.php b/app/Controllers/Dashboard.php index 0f9a9cc..05b95ae 100644 --- a/app/Controllers/Dashboard.php +++ b/app/Controllers/Dashboard.php @@ -6,11 +6,16 @@ class Dashboard extends BaseController { public function index() { - // Cek apakah user sudah login + // Cek login if (!session()->get('logged_in')) { return redirect()->to('/login'); } - return view('dashboard'); + // ambil versi aplikasi + $app = include(APPPATH . '../app_version.php'); + + return view('dashboard', [ + 'app' => $app + ]); } } \ No newline at end of file diff --git a/app/Controllers/Pasien.php b/app/Controllers/Pasien.php index 8a0c68c..805c44b 100644 --- a/app/Controllers/Pasien.php +++ b/app/Controllers/Pasien.php @@ -399,6 +399,7 @@ class Pasien extends BaseController 'tujuan' => $this->request->getPost('tujuan') ?? '', 'tujuan_detail' => $this->request->getPost('tujuan_detail') ?? '', 'informasi_lain'=> $this->request->getPost('informasi_lain') ?? '', + 'kie_transfer' => $this->request->getPost('kie_transfer') ?? '', 'persetujuan' => $this->request->getPost('persetujuan') ?? 'menunggu', 'biaya' => $this->request->getPost('biaya') ?? 0, @@ -563,17 +564,34 @@ class Pasien extends BaseController r.order_type, r.fase, r.status, + r.alasan_batal, r.created_at, p.nama, p.atribut, p.gender, p.alamat, p.tgl_lahir, - o.tujuan + o.tujuan, + pg.nama AS petugas_predispatch '); - $builder->join('pasien p', 'p.rm = r.rm', 'left'); - $builder->join('pasien_order o', 'o.register_id = r.id', 'left'); + $builder->join( + 'pasien_order o', + 'o.register_id = r.id', + 'left' + ); + + $builder->join( + 'pegawai pg', + 'pg.id = o.petugas_id', + 'left' + ); + + $builder->join( + 'pasien p', + 'p.rm = r.rm', + 'left' + ); // filter bulan $builder->where('MONTH(r.created_at)', $bulan); @@ -724,6 +742,7 @@ class Pasien extends BaseController 'persetujuan' => $this->request->getPost('persetujuan'), 'biaya' => $this->request->getPost('biaya'), 'informasi_lain' => $this->request->getPost('informasi_lain') ?? '', + 'kie_transfer' => $this->request->getPost('kie_transfer') ?? '', 'validasi' => $this->request->getPost('validasi'), 'petugas_id' => $petugasId, ]; @@ -756,14 +775,20 @@ class Pasien extends BaseController return view('list', $data); } - public function detail($id) + public function detail($id) { $db = \Config\Database::connect(); $pasien = $db->table('register_ambulans r') - ->select('r.*, p.nama, p.alamat, p.gender') + ->select(' + r.*, + p.nama, + p.alamat, + p.gender, + p.tgl_lahir + ') ->join('pasien p', 'p.rm = r.rm', 'left') - ->where('r.id', $id) // ๐Ÿ”ฅ INI KUNCI + ->where('r.id', $id) ->get() ->getRowArray(); diff --git a/app/Controllers/Pegawai.php b/app/Controllers/Pegawai.php index 5ae1abf..6771967 100644 --- a/app/Controllers/Pegawai.php +++ b/app/Controllers/Pegawai.php @@ -17,7 +17,7 @@ class Pegawai extends BaseController ->orLike('jabatan', $term) ->groupEnd() ->orderBy('nama', 'ASC') - ->findAll(10); + ->findAll(16); $result = []; diff --git a/app/Views/dashboard.php b/app/Views/dashboard.php index 318c7b4..0da4b02 100644 --- a/app/Views/dashboard.php +++ b/app/Views/dashboard.php @@ -220,7 +220,7 @@ body{
& Evaluasi
- +
diff --git a/app/Views/pasien/detail_riwayat.php b/app/Views/pasien/detail_riwayat.php new file mode 100644 index 0000000..ba0ac51 --- /dev/null +++ b/app/Views/pasien/detail_riwayat.php @@ -0,0 +1,223 @@ + + + + +Detail Riwayat Ambulans + + + + + + + + + +
+ + + + +
+
+
+ ๐Ÿ‘ค +
+ Riwayat Detail Pasien - Silaras 119 +
+ +
+
RM:
+
Register:
+
+ Tanggal Lahir: + + + +
+
Jenis Kelamin:
+
+ +
+ Alamat: +
+
+ + +
+ + + + - + +
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + + + +
+
+ + +
+ +
+
+
Petugas
+
+ Dokter:
+ Perawat:
+ Driver: +
+
+
+ +
+
+
Operasional
+
+ KM: โ†’
+ Biaya: +
+
+
+ +
+ +
+ + + + + + \ No newline at end of file diff --git a/app/Views/pasien/edit.php b/app/Views/pasien/edit.php new file mode 100644 index 0000000..9cb4b58 --- /dev/null +++ b/app/Views/pasien/edit.php @@ -0,0 +1,175 @@ + +
+ + +
+ + +
+ + get('role') !== 'admin') ? 'readonly' : '' ?>> +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ +
+ + +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + + +
+ + +
+ +
+ + +
+ + +
+ +
\ No newline at end of file diff --git a/app/Views/pasien/list.php b/app/Views/pasien/list.php new file mode 100644 index 0000000..d2daadd --- /dev/null +++ b/app/Views/pasien/list.php @@ -0,0 +1,662 @@ + + + + + + E-Rekam Medik - SiLARAS 119 + + + + + + + +
+ + +
+
+ +

+ ๐Ÿงพ E-Rekam Medik SiLARAS 119 +

+ +
+ + +
+ + + +
+ + + + + + + Kembali Ke Dashboard Utama + + +
+ +
+
+ + +
+ + +
+
+
+
+
Total Permintaan Ambulans 119
+

+
+
+ +
+
+
+
+ + +
+
+
+
+
Total Pasien Yang Sudah Terlayani
+

+
+
+ +
+
+
+
+ + +
+
+
+
+
Total Pasien Dalam Proses Pelayanan
+

+
+
+ +
+
+
+
+ + +
+
+
+
+
Total Permintaan Batal
+

+
+
+ +
+
+
+
+ +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + 'Rumah ke Faskes Dalam Kota', + 'F-FDK' => 'Fasilitas Umum ke Faskes Dalam Kota', + 'AFDK' => 'Antar Faskes Dalam Kota', + 'AFLK' => 'Antar Faskes Luar Kota', + 'PDK' => 'Pulang Dalam Kota', + 'PLK' => 'Pulang Luar Kota', + ]; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NoRegisterNo RMNama PasienTanggal Lahir
(Umur)
Jenis KelaminAlamatTujuanStatus OrderDurasi TugasWaktu InputPetugasAksi
+ diff($lahir)->y; + + echo date('d/m/Y', strtotime($tgl)); + echo "
{$umur} th"; + } else { + echo '-'; + } + ?> +
+ + + +
+ + + + +
+
+ + + + + + + + โŒ BATAL + + + + + + + + + + + + + + + + 'Predispatch', + $fase == 2 => 'On Scene', + $fase == 3 => 'Transport', + $fase == 4 => 'Arrival RS', + $fase == 5 => 'Handover', + $fase >= 6 => 'Selesai', + default => 'Predispatch' + } ?> + + + + +
+
+ + + Predispatch:
+ +
+ Tim Ambulans 119:
+ +
+ + ๐Ÿ” Detail + +
+ + + + + + +
+
+ Belum ada data pasien. +
+
+
+
+
+ + + \ No newline at end of file diff --git a/app/Views/pasien_aktif.php b/app/Views/pasien_aktif.php index b43d552..270f8f5 100644 --- a/app/Views/pasien_aktif.php +++ b/app/Views/pasien_aktif.php @@ -334,7 +334,7 @@ body{ opacity: .55; transform: scale(.98); filter: blur(.2px); - transition: all .4s ease; + transition: all .30s ease; } /* supaya masih enak dibaca */ @@ -525,7 +525,7 @@ foreach ($pasien as $p) { diff --git a/app/Views/predispatch.php b/app/Views/predispatch.php index c02dfe7..64c8659 100644 --- a/app/Views/predispatch.php +++ b/app/Views/predispatch.php @@ -207,7 +207,11 @@ b {
Tgl Lahir
:
-
+
+ +
@@ -594,6 +598,14 @@ $tujuan = $order['tujuan'] ?? '-';
+ +
+
+ KIE Proses Transfer + : +
+
+
Validasi & Petugas
diff --git a/app/Views/tindakan/inputtindakan.php b/app/Views/tindakan/inputtindakan.php new file mode 100644 index 0000000..df2ac5a --- /dev/null +++ b/app/Views/tindakan/inputtindakan.php @@ -0,0 +1,240 @@ + + + + +Input Tindakan Ambulans + + + + + + + + + +
+ + +
+
Pilih Pasien Ambulans
+ + +
+ + + + + +
+ +
+ + + + + +
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+ + + + + + + + + + + + +
KodeUraianQtyHargaTotal
+ + + +
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/app/Views/tindakan/pilih_pasien.php b/app/Views/tindakan/pilih_pasien.php new file mode 100644 index 0000000..17f6aea --- /dev/null +++ b/app/Views/tindakan/pilih_pasien.php @@ -0,0 +1,65 @@ + + + + +Cari Pasien + + + + + +
+ +

Input Tindakan Ambulans

+ + +
+
+ + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
RMRegisterNama PasienAksi
Data tidak ditemukan
+ + Pilih + +
+
+ +
+ + + \ No newline at end of file