This commit is contained in:
2023-05-17 15:19:24 +07:00
parent a10fa9db21
commit 31423c255e
4 changed files with 47 additions and 1 deletions

View File

@@ -253,7 +253,7 @@ class MemberEnrollmentService
"Payor ID",
"Member ID",
"Mapping ID",
"Link Medis Member ID",
"LinkSehat Member ID",
"Corporate ID",
"NIK",
"Division",
@@ -374,6 +374,15 @@ class MemberEnrollmentService
if (empty($row['principal_id'])) {
throw new ImportRowException(__('enrollment.PRINCIPAL_ID_REQUIRED'), 0, null, $row);
}
if (empty($row['relationship_with_principal'])){
throw new ImportRowException(__('enrollment.RELATIONSHIP_WITH_PRICIPAL_REQUIRED'), 0, null, $row);
}
if (!empty($row['relationship_with_principal']) && !in_array($row['relationship_with_principal'], ['H', 'W', 'D', 'S'])){
throw new ImportRowException(__('enrollment.RELATIONSHIP_WITH_PRICIPAL_REQUIRED'), 0, null, $row);
}
if ($row['principal_id'] == $row['member_id']){
throw new ImportRowException(__('enrollment.PRINCIPAL_ID_NOT_SAME_MEMBER_ID'), 0, null, $row);
}
}
// TODO RECORD BCA ONLY
@@ -518,6 +527,7 @@ class MemberEnrollmentService
"race" => $row['race'] ?? null,
"marital_status" => $row['marital_status'] ?? null,
"record_type" => $row['record_type'] ?? null,
"record_mode" => $row['record_mode'] ?? null,
"principal_id" => $row['principal_id'] ?? null,
"relation_with_principal" => $row['relationship_with_principal'] ?? null,
"bpjs_class" => $row['bpjs_class'] ?? null,