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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user