diff --git a/Modules/Internal/Services/RequestLogService.php b/Modules/Internal/Services/RequestLogService.php index 5aab262f..cdc4c184 100644 --- a/Modules/Internal/Services/RequestLogService.php +++ b/Modules/Internal/Services/RequestLogService.php @@ -168,6 +168,10 @@ class RequestLogService throw new ImportRowException(__('Provider Required'), 0, null, $row); } + if (!$row['record_mode']){ + throw new ImportRowException(__('Record Mode Required'), 0, null, $row); + } + // Membuat singkatan dari nama rumah sakit // $singkatan = ""; // $words = explode(' ', $row['organization_id']); @@ -278,7 +282,14 @@ class RequestLogService } if ($row['record_mode'] == 1){ - $requestLog = RequestLog::updateOrCreate(["code" => $code], $data); + $requestLog = RequestLog::updateOrCreate( + [ + 'member_id' => $member->id, + 'submission_date' => $row['submission_date'], + 'organization_id' => $organization_id, + ], + $data + ); } else if ($row['record_mode'] == 2) { $requestLog = RequestLog::updateOrCreate( [