diff --git a/application/controllers/klinik/doctorv5/Anamnesedoctor.php b/application/controllers/klinik/doctorv5/Anamnesedoctor.php index 6acb4185..2029d4c3 100644 --- a/application/controllers/klinik/doctorv5/Anamnesedoctor.php +++ b/application/controllers/klinik/doctorv5/Anamnesedoctor.php @@ -3267,11 +3267,14 @@ function get_data_order_anamnesis($orderID){ $expired = trim($prm['expired_date'] ?? ''); $dosis = max(1, intval($prm['dosis'] ?? 1)); $site_code = trim($prm['injection_site_code'] ?? ''); - $route_code = trim($prm['route_code'] ?? ''); - $petugas_id = isset($prm['petugas_id']) && $prm['petugas_id'] ? intval($prm['petugas_id']) : null; - $given_at = trim($prm['given_at'] ?? ''); - $next_date = trim($prm['next_date'] ?? ''); - $catatan = trim($prm['catatan'] ?? ''); + $route_code = trim($prm['route_code'] ?? ''); + $petugas_id = isset($prm['petugas_id']) && $prm['petugas_id'] ? intval($prm['petugas_id']) : null; + $given_at = trim($prm['given_at'] ?? ''); + $next_date = trim($prm['next_date'] ?? ''); + $catatan = trim($prm['catatan'] ?? ''); + $kipi = trim($prm['kipi'] ?? ''); + $observasi15 = ($prm['observasi_15'] ?? false) ? 'Y' : 'N'; + $reaksi_alergi = ($prm['reaksi_alergi'] ?? false) ? 'Y' : 'N'; $given_at_sql = ($given_at && strtotime($given_at)) ? date('Y-m-d H:i:s', strtotime($given_at)) : date('Y-m-d H:i:s'); $expired_val = ($expired && strtotime($expired)) ? date('Y-m-d', strtotime($expired)) : null; @@ -3290,12 +3293,16 @@ function get_data_order_anamnesis($orderID){ orderVaccineGivenAt = ?, orderVaccineNextDate = ?, orderVaccineCatatan = ?, + orderVaccineKipi = ?, + orderVaccineObservasi15 = ?, + orderVaccineReaksiAlergi = ?, orderVaccineUserID = ? WHERE orderVaccineID = ? AND orderVaccineOrderID = ?", [ $t_test_id, $batch ?: null, $expired_val, $dosis, $site_code ?: null, $route_code ?: null, $petugas_id, $given_at_sql, $next_date_val, $catatan ?: null, + $kipi ?: null, $observasi15, $reaksi_alergi, $userID, $vaccine_id, $orderid ] ); @@ -3305,12 +3312,15 @@ function get_data_order_anamnesis($orderID){ (orderVaccineOrderID, orderVaccineT_TestID, orderVaccineBatchNumber, orderVaccineExpiredDate, orderVaccineDosis, orderVaccineInjectionSiteCode, orderVaccineRouteCode, orderVaccinePetugasM_StaffID, orderVaccineGivenAt, - orderVaccineNextDate, orderVaccineCatatan, orderVaccineUserID) - VALUES (?,?,?,?,?,?,?,?,?,?,?,?)", + orderVaccineNextDate, orderVaccineCatatan, + orderVaccineKipi, orderVaccineObservasi15, orderVaccineReaksiAlergi, + orderVaccineUserID) + VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", [ $orderid, $t_test_id, $batch ?: null, $expired_val, $dosis, $site_code ?: null, $route_code ?: null, $petugas_id, - $given_at_sql, $next_date_val, $catatan ?: null, $userID + $given_at_sql, $next_date_val, $catatan ?: null, + $kipi ?: null, $observasi15, $reaksi_alergi, $userID ] ); $vaccine_id = $this->db_oneklinik->insert_id(); diff --git a/sql/manual_changes/2026-06-11-alter-order-vaccine-add-kipi-fields.sql b/sql/manual_changes/2026-06-11-alter-order-vaccine-add-kipi-fields.sql new file mode 100644 index 00000000..caef3532 --- /dev/null +++ b/sql/manual_changes/2026-06-11-alter-order-vaccine-add-kipi-fields.sql @@ -0,0 +1,5 @@ +-- Tambah kolom KIPI, observasi 15 menit, dan reaksi alergi ke order_vaccine +ALTER TABLE one_klinik.order_vaccine + ADD COLUMN `orderVaccineKipi` text DEFAULT NULL AFTER `orderVaccineCatatan`, + ADD COLUMN `orderVaccineObservasi15` char(1) NOT NULL DEFAULT 'N' COMMENT 'Y=Sudah N=Belum' AFTER `orderVaccineKipi`, + ADD COLUMN `orderVaccineReaksiAlergi` char(1) NOT NULL DEFAULT 'N' COMMENT 'Y=Ada N=Tidak Ada' AFTER `orderVaccineObservasi15`;