fix code practitionerseeder
This commit is contained in:
@@ -29,7 +29,7 @@ class PractitionerSeeder extends Seeder
|
||||
$specialities = Speciality::pluck('id', 'name')->toArray();
|
||||
|
||||
foreach ($organizations as $organization) {
|
||||
$response = Http::get('https://api.primaya.id/temp/practitioners?code='.$organization->meta->KodeRS);
|
||||
$response = Http::get('https://app.primaya.id/temp/practitioners?code=' . $organization->meta->KodeRS);
|
||||
|
||||
foreach ($response->json()['practitioners'] as $practitioner) {
|
||||
$practitioner = json_decode(json_encode($practitioner));
|
||||
@@ -57,7 +57,7 @@ class PractitionerSeeder extends Seeder
|
||||
|
||||
$newPractitioner = Practitioner::updateOrCreate([
|
||||
'person_id' => $newPerson->id
|
||||
],[
|
||||
], [
|
||||
'person_id' => $newPerson->id
|
||||
]);
|
||||
$newPractitioner->metas()->create([
|
||||
@@ -109,7 +109,7 @@ class PractitionerSeeder extends Seeder
|
||||
if (empty($newPractitionerRole->speciality_id)) {
|
||||
$newPractitionerRole->metas()->updateOrCreate([
|
||||
'type' => 'speciality_code',
|
||||
],[
|
||||
], [
|
||||
'system' => 'default',
|
||||
'type' => 'speciality_code',
|
||||
'value' => $practitioner->speciality->code ?? null,
|
||||
@@ -117,7 +117,7 @@ class PractitionerSeeder extends Seeder
|
||||
|
||||
$newPractitionerRole->metas()->updateOrCreate([
|
||||
'type' => 'speciality',
|
||||
],[
|
||||
], [
|
||||
'system' => 'default',
|
||||
'type' => 'speciality',
|
||||
'value' => $practitioner->speciality->name ?? null,
|
||||
@@ -125,7 +125,7 @@ class PractitionerSeeder extends Seeder
|
||||
|
||||
$newPractitionerRole->metas()->updateOrCreate([
|
||||
'type' => 'speciality_image',
|
||||
],[
|
||||
], [
|
||||
'system' => 'default',
|
||||
'type' => 'speciality_image',
|
||||
'value' => $practitioner->speciality->name ?? null,
|
||||
@@ -135,7 +135,7 @@ class PractitionerSeeder extends Seeder
|
||||
$newPractitionerRole->metas()->updateOrCreate([
|
||||
'type' => 'primaya-his',
|
||||
'type' => 'DokterID',
|
||||
],[
|
||||
], [
|
||||
'system' => 'primaya-his',
|
||||
'type' => 'DokterID',
|
||||
'value' => $practitioner->meta->DokterID ?? null,
|
||||
|
||||
Reference in New Issue
Block a user