generated from spatie/package-skeleton-php
-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from ivanwilliammd/64-loinc-terminology
64 loinc terminology
- Loading branch information
Showing
11 changed files
with
226,470 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
database/migrations/create_satusehat_loinc_answer_table.php.stub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateSatusehatLoincTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::connection(config('satusehatintegration.database_connection_master'))->create(config('satusehatintegration.loinc_answer_table_name'), function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->string('LoincNumber')->nullable(); | ||
$table->string('AnswerListId')->nullable(); | ||
$table->string('AnswerListName')->nullable(); | ||
$table->string('AnswerStringId')->nullable(); | ||
$table->integer('SequenceNumber')->nullable(); | ||
$table->string('DisplayText')->nullable(); | ||
$table->string('ExtCodeId')->nullable(); | ||
$table->string('ExtCodeDisplayName')->nullable(); | ||
$table->string('ExtCodeSystem')->nullable(); | ||
$table->timestamps(); | ||
$table->softDeletes(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::connection(config('satusehatintegration.database_connection_master'))->dropIfExists(config('satusehatintegration.loinc_answer_table_name')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateSatusehatLoincTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::connection(config('satusehatintegration.database_connection_master'))->create(config('satusehatintegration.loinc_table_name'), function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->string('LOINC_NUM')->unique(); | ||
$table->string('COMPONENT')->nullable(); | ||
$table->string('PROPERTY')->nullable(); | ||
$table->string('TIME_ASPCT')->nullable(); | ||
$table->string('SYSTEM')->nullable(); | ||
$table->string('SCALE_TYP')->nullable(); | ||
$table->string('METHOD_TYP')->nullable(); | ||
$table->string('CLASS')->nullable(); | ||
$table->string('CLASSTYPE')->nullable(); | ||
$table->string('LONG_COMMON_NAME')->nullable(); | ||
$table->string('SHORTNAME')->nullable(); | ||
$table->longText('EXTERNAL_COPYRIGHT_NOTICE')->nullable(); | ||
$table->string('STATUS')->nullable(); | ||
$table->string('VersionFirstReleased')->nullable(); | ||
$table->string('VersionLastChanged')->nullable(); | ||
$table->timestamps(); | ||
$table->softDeletes(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::connection(config('satusehatintegration.database_connection_master'))->dropIfExists(config('satusehatintegration.loinc_table_name')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
namespace Database\Seeders; | ||
|
||
use JeroenZwart\CsvSeeder\CsvSeeder; | ||
use DB; | ||
|
||
class LoincAnswerSeeder extends CsvSeeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(){ | ||
$this->file = base_path().'/database/seeders/csv/loinc_answer.csv'; | ||
$this->tablename = config('satusehatintegration.loinc_answer_table_name'); | ||
$this->delimiter = ';'; | ||
} | ||
|
||
public function run() | ||
{ | ||
// Recommended when importing larger CSVs | ||
DB::disableQueryLog(); | ||
|
||
parent::run(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
namespace Database\Seeders; | ||
|
||
use JeroenZwart\CsvSeeder\CsvSeeder; | ||
use DB; | ||
|
||
class LoincSeeder extends CsvSeeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(){ | ||
$this->file = base_path().'/database/seeders/csv/loinc.csv'; | ||
$this->tablename = config('satusehatintegration.loinc_table_name'); | ||
$this->delimiter = ';'; | ||
} | ||
|
||
public function run() | ||
{ | ||
// Recommended when importing larger CSVs | ||
DB::disableQueryLog(); | ||
|
||
parent::run(); | ||
} | ||
} |
Oops, something went wrong.