diff --git a/application/controllers/klinik/doctorv5/Anamnesedoctor.php b/application/controllers/klinik/doctorv5/Anamnesedoctor.php index bd067068..bc7b935c 100644 --- a/application/controllers/klinik/doctorv5/Anamnesedoctor.php +++ b/application/controllers/klinik/doctorv5/Anamnesedoctor.php @@ -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; }