FHM09062601IBL - get_vaccines: decode nat_test dan child_test jadi array
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3236,7 +3236,13 @@ function get_data_order_anamnesis($orderID){
|
||||
$q = $this->db_onedev->query($sql);
|
||||
if (!$q) { $this->sys_error_db("get jenis vaksin", $this->db_onedev); exit; }
|
||||
|
||||
$this->sys_ok(['records' => $q->result_array()]);
|
||||
$records = array_map(function($row) {
|
||||
$row['nat_test'] = json_decode($row['nat_test'] ?? '[]', true) ?: [];
|
||||
$row['child_test'] = json_decode($row['child_test'] ?? '[]', true) ?: [];
|
||||
return $row;
|
||||
}, $q->result_array());
|
||||
|
||||
$this->sys_ok(['records' => $records]);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user