diff --git a/database/seeders/LoincAnswerSeeder.php.stub b/database/seeders/LoincAnswerSeeder.php.stub index e8be316..9de6fd7 100644 --- a/database/seeders/LoincAnswerSeeder.php.stub +++ b/database/seeders/LoincAnswerSeeder.php.stub @@ -4,7 +4,7 @@ namespace Database\Seeders; use JeroenZwart\CsvSeeder\CsvSeeder; use DB; -class Icd10Seeder extends CsvSeeder +class LoincAnswerSeeder extends CsvSeeder { /** * Run the database seeds. diff --git a/database/seeders/LoincSeeder.php.stub b/database/seeders/LoincSeeder.php.stub index 8163e22..020586b 100644 --- a/database/seeders/LoincSeeder.php.stub +++ b/database/seeders/LoincSeeder.php.stub @@ -4,7 +4,7 @@ namespace Database\Seeders; use JeroenZwart\CsvSeeder\CsvSeeder; use DB; -class Icd10Seeder extends CsvSeeder +class LoincSeeder extends CsvSeeder { /** * Run the database seeds. diff --git a/src/SatusehatIntegrationServiceProvider.php b/src/SatusehatIntegrationServiceProvider.php index 03b0417..87f59b7 100644 --- a/src/SatusehatIntegrationServiceProvider.php +++ b/src/SatusehatIntegrationServiceProvider.php @@ -75,6 +75,28 @@ public function boot() ], 'icd9cm'); } + // Publish LOINC & LOINC answer csv data + $this->publishes([ + __DIR__.'/../database/seeders/csv/loinc.csv.stub' => database_path('/seeders/csv/loinc.csv'), + ], 'loinc'); + + $this->publishes([ + __DIR__.'/../database/seeders/csv/loinc_answer.csv.stub' => database_path('/seeders/csv/loinc_answer.csv'), + ], 'loinc'); + + // Publish Seeder for LOINC & LOINC Answer + if (! class_exists('LoincSeeder')) { + $this->publishes([ + __DIR__.'/../database/seeders/LoincSeeder.php.stub' => database_path('/seeders/LoincSeeder.php'), + ], 'loinc'); + } + + if (! class_exists('LoincAnswerSeeder')) { + $this->publishes([ + __DIR__.'/../database/seeders/LoincAnswerSeeder.php.stub' => database_path('/seeders/LoincAnswerSeeder.php'), + ], 'loinc'); + } + // Publish Migrations for Kode Wilayah Indonesia if (! class_exists('CreateKodeWilayahIndonesiaTable')) { $timestamp = date('Y_m_d_His', time());