From 3222e4fdd8ee21d4a3589d84a6be69be3bb2e7fa Mon Sep 17 00:00:00 2001 From: "sas.fajri" Date: Sun, 24 May 2026 13:19:32 +0700 Subject: [PATCH] Fix sampling status always Y when count_all = 0 for flag_nonlab = Y Co-Authored-By: Claude Sonnet 4.6 --- .../mockup/status_timeline/Patientstatusday.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/controllers/mockup/status_timeline/Patientstatusday.php b/application/controllers/mockup/status_timeline/Patientstatusday.php index 403cf405..aa1daa9e 100644 --- a/application/controllers/mockup/status_timeline/Patientstatusday.php +++ b/application/controllers/mockup/status_timeline/Patientstatusday.php @@ -656,18 +656,18 @@ class Patientstatusday extends MY_Controller //echo $this->db_onedev->last_query(); $status = 'N'; - if(intval($count_all) == intval($count_done)) + if(intval($count_all) > 0 && intval($count_all) == intval($count_done)) $status = 'Y'; else if(intval($count_all) > intval($count_done) && intval($count_done) > 0) - $status = 'P'; - + $status = 'P'; + $details_sampling[$i]['status'] = $status ; - + } else{ $details_sampling[$i]['status'] = 'N'; } - + } $rows[$k]['details_sampling'] = $details_sampling;