Skip to content

Commit

Permalink
added migration and seeder table
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwilliammd committed Nov 29, 2024
1 parent fe8c571 commit d04bd77
Show file tree
Hide file tree
Showing 5 changed files with 226,296 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/satusehatintegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@
*/
'log_table_name' => 'satusehat_log',
'token_table_name' => 'satusehat_token',

'icd10_table_name' => 'satusehat_icd10',
'icd9cm_table_name' => 'satusehat_icd9cm',

'loinc_table_name' => 'satusehat_loinc',
'loinc_answer_table_name' => 'satusehat_loinc_answer',

'kode_wilayah_indonesia_table_name' => 'kode_wilayah_indonesia',

/*
Expand Down
41 changes: 41 additions & 0 deletions database/migrations/create_satusehat_loinc_answer_table.php.stub
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'));
}
}
47 changes: 47 additions & 0 deletions database/migrations/create_satusehat_loinc_table.php.stub
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'));
}
}
Loading

0 comments on commit d04bd77

Please sign in to comment.