update import

This commit is contained in:
2024-02-17 11:25:54 +07:00
parent 99bab5e75d
commit 4b0b68b58d

View File

@@ -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(
[