FHM09062601IBL - tambah kolom KIPI, observasi 15 menit, reaksi alergi ke order_vaccine

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sas.fajri
2026-06-11 14:55:44 +07:00
parent 11860743b8
commit e3c9909c84
2 changed files with 23 additions and 8 deletions

View File

@@ -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();

View File

@@ -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`;