This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoFaaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_faa', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_faa');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoRaatTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_raat', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('faa_id')->constrained('pronto_atendimento_faa');
|
||||
|
||||
$table->string('empresa_nome', 150);
|
||||
$table->string('empresa_ramo_atividade', 150)->nullable();
|
||||
$table->string('empresa_endereco', 150)->nullable();
|
||||
$table->string('empresa_telefone', 11)->nullable();
|
||||
|
||||
$table->date('acidente_data');
|
||||
$table->time('acidente_hora')->nullable();
|
||||
$table->foreignId('acidente_tipo_id')->nullable()->constrained('pronto_atendimento_raat_tipo_acidente');
|
||||
$table->string('acidente_local', 150)->nullable();
|
||||
$table->string('acidente_descricao', 250);
|
||||
|
||||
$table->foreignId('regime_trabalho_id')->nullable()->constrained('pronto_atendimento_raat_regime_trabalho');
|
||||
$table->string('regime_trabalho_outro', 50)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_raat');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('faa_id')->constrained('pronto_atendimento_faa');
|
||||
$table->foreignId('fila_id')->constrained('painel_senha_fila');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoMedicoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->boolean('simples');
|
||||
$table->string('evolucao', 500)->nullable();
|
||||
$table->string('queixa_principal_duracao', 300)->nullable();
|
||||
$table->string('historia', 300)->nullable();
|
||||
$table->string('exame_fisico', 300)->nullable();
|
||||
$table->string('diagnostico', 300)->nullable();
|
||||
$table->string('conduta', 300)->nullable();
|
||||
$table->string('atendimento_geral', 500)->nullable();
|
||||
$table->string('orientacoes', 150)->nullable();
|
||||
$table->boolean('solicitou_reavaliacao')->nullable();
|
||||
$table->string('observacoes_enfermagem', 500)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_medico');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoOrigemEntradaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_origem_entrada', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 30)->unique();
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_origem_entrada');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoRecepcaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
|
||||
// Não deveria ser nullable, mas se não for, o Laravel está adicionando automanticamente
|
||||
// "current_timestamp() ON UPDATE current_timestamp()" como default.
|
||||
$table->timestamp('atendido_em')->nullable();
|
||||
|
||||
$table->boolean('urgente')->nullable();
|
||||
$table->string('urgente_motivo', 100)->nullable();
|
||||
$table->foreignId('origem_entrada_id')->nullable()->constrained('pronto_atendimento_origem_entrada');
|
||||
$table->string('medico_samu', 150)->nullable();
|
||||
$table->string('motivo_atendimento', 3000)->nullable();
|
||||
$table->string('acompanhante', 150)->nullable();
|
||||
$table->foreignId('unidade_encaminhamento_id')->nullable()->constrained('cadastro_unidade');
|
||||
$table->string('medico_solicitante_encaminhamento', 150)->nullable();
|
||||
$table->foreignId('unidade_externa_encaminhamento_id')->nullable()->constrained('cadastro_unidade_externa');
|
||||
$table->foreignId('servico_id')->constrained('cadastro_servico');
|
||||
$table->foreignId('ocupacao_id')->nullable()->constrained('sigtap.ocupacao');
|
||||
$table->string('observacao', 500)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_recepcao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoRaatParecerMedicoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_raat_parecer_medico', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('raat_id')->constrained('pronto_atendimento_raat')->onDelete('cascade');
|
||||
$table->foreignId('atendimento_medico_id')->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->foreignId('agente_id')->constrained('pronto_atendimento_raat_agente');
|
||||
$table->string('parte_corpo_atingida_outras', 150)->nullable();
|
||||
$table->string('causa_acidente_outras', 150)->nullable();
|
||||
$table->string('diagnostico_outros', 150)->nullable();
|
||||
$table->string('observacao', 150)->nullable();
|
||||
$table->foreignId('classificacao_inicial_id')->constrained('pronto_atendimento_raat_classificacao_inicial');
|
||||
$table->boolean('afastado')->default(false);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_raat_parecer_medico');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoRaatParecerMedicoParteCorpoAtingidaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_raat_parecer_medico_parte_corpo_atingida', function (Blueprint $table) {
|
||||
|
||||
$table
|
||||
->foreignId('parecer_medico_id')
|
||||
->constrained('pronto_atendimento_raat_parecer_medico')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('parte_corpo_atingida_id');
|
||||
|
||||
$table->foreign('parte_corpo_atingida_id', 'pro_ate_raa_par_med_par_cor_ati_par_cor_ati_id_foreign')
|
||||
->references('id')
|
||||
->on('pronto_atendimento_raat_parte_corpo_atingida');
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['foreignNames' => [
|
||||
'created_centro_custo_id' => 'pro_ate_raa_par_med_par_cor_ati_cre_cen_cus_id_foreign',
|
||||
'updated_centro_custo_id' => 'pro_ate_raa_par_med_par_cor_ati_upd_cen_cus_id_foreign',
|
||||
]]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_raat_parecer_medico_parte_corpo_atingida');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoRaatParecerMedicoCausaAcidenteTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_raat_parecer_medico_causa_acidente', function (Blueprint $table) {
|
||||
|
||||
$table
|
||||
->foreignId('parecer_medico_id')
|
||||
->constrained('pronto_atendimento_raat_parecer_medico')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('causa_acidente_id');
|
||||
|
||||
$table->foreign('causa_acidente_id', 'pro_ate_raa_par_med_cau_aci_cau_aci_id_foreign')
|
||||
->references('id')
|
||||
->on('pronto_atendimento_raat_causa_acidente');
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['foreignNames' => [
|
||||
'created_centro_custo_id' => 'pro_ate_raa_par_med_cau_aci_cre_cen_cus_id_foreign',
|
||||
'updated_centro_custo_id' => 'pro_ate_raa_par_med_cau_aci_upd_cen_cus_id_foreign',
|
||||
]]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_raat_parecer_medico_causa_acidente');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoRaatParecerMedicoDiagnosticoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_raat_parecer_medico_diagnostico', function (Blueprint $table) {
|
||||
|
||||
$table
|
||||
->foreignId('parecer_medico_id')
|
||||
->constrained('pronto_atendimento_raat_parecer_medico')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('diagnostico_id');
|
||||
|
||||
$table->foreign('diagnostico_id', 'pro_ate_raa_par_med_dia_dia_id_foreign')
|
||||
->references('id')
|
||||
->on('pronto_atendimento_raat_diagnostico');
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['foreignNames' => [
|
||||
'created_centro_custo_id' => 'pro_ate_raa_par_med_dia_cre_cen_cus_id_foreign',
|
||||
'updated_centro_custo_id' => 'pro_ate_raa_par_med_dia_upd_cen_cus_id_foreign',
|
||||
]]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_raat_parecer_medico_diagnostico');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoDeclaracaoComparecimentoTipoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_declaracao_comparecimento_tipo', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 12)->unique();
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_declaracao_comparecimento_tipo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoMedicoAtestadoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_medico_atestado', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_medico_id')->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->boolean('imprime_cid');
|
||||
$table->unsignedSmallInteger('dias')->nullable();
|
||||
$table->foreignId('documento_tipo_id')->constrained('geral_documento_tipo');
|
||||
$table->string('documento_numero', 16);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_medico_atestado');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoMedicoEncaminhamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_medico_encaminhamento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_medico_id')->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->boolean('urgente');
|
||||
$table->foreignId('ocupacao_id')->constrained('sigtap.ocupacao');
|
||||
$table->string('motivo', 300);
|
||||
$table->string('observacoes', 300)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_medico_encaminhamento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoMedicoReceitaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_medico_receita', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_medico_id')->constrained('pronto_atendimento_atendimento_medico');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_medico_receita');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoMedicoReceitaMedicamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_medico_receita_medicamento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
|
||||
$table
|
||||
->foreignId('receita_id')
|
||||
->constrained('pronto_atendimento_atendimento_medico_receita')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('medicamento_id')->constrained('cadastro_medicamento');
|
||||
$table->string('via_administracao_outras', 100)->nullable();
|
||||
$table->unsignedSmallInteger('quantidade');
|
||||
$table->unsignedTinyInteger('intervalo_tempo')->nullable();
|
||||
$table->foreignId('intervalo_medida_tempo_id')->nullable()->constrained('geral_medida_tempo');
|
||||
$table->foreignId('turno_id')->nullable()->constrained('geral_turno');
|
||||
$table->unsignedTinyInteger('durante_tempo')->nullable();
|
||||
$table->foreignId('durante_medida_tempo_id')->nullable()->constrained('geral_medida_tempo');
|
||||
$table->string('recomendacoes', 250)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_medico_receita_medicamento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoMedicoDeclaracaoComparecimentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_medico_declaracao_comparecimento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_medico_id')->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->foreignId('tipo_id')->constrained('pronto_atendimento_declaracao_comparecimento_tipo');
|
||||
$table->string('nome', 255)->nullable();
|
||||
$table->foreignId('documento_tipo_id')->constrained('geral_documento_tipo');
|
||||
$table->string('documento_numero', 16);
|
||||
|
||||
// Não deveria ser nullable, mas se não for, o Laravel está adicionando automanticamente
|
||||
// "current_timestamp() ON UPDATE current_timestamp()" como default.
|
||||
$table->timestamp('de')->nullable();
|
||||
|
||||
// Não deveria ser nullable, mas se não for, o Laravel está adicionando automanticamente
|
||||
// "'0000-00-00 00:00:00'" como default.
|
||||
$table->timestamp('ate')->nullable();
|
||||
|
||||
$table->string('motivo', 50);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_medico_declaracao_comparecimento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoCidTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_cid', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->foreignId('cid_id')->constrained('sigtap.cid');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_cid');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoProcedimentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->foreignId('procedimento_id')->constrained('sigtap.procedimento');
|
||||
$table->foreignId('cid_principal_id')->nullable()->constrained('sigtap.cid');
|
||||
$table->foreignId('cid_secundario_id')->nullable()->constrained('sigtap.cid');
|
||||
$table->unsignedSmallInteger('quantidade');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_procedimento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoClassificacaoRiscoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_classificacao_risco', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->foreignId('classificacao_risco_id')->constrained('pronto_atendimento_classificacao_risco');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_classificacao_risco');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoGestacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_gestacao', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->boolean('gestante')->default(false);
|
||||
$table->date('dum')->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_gestacao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoMedicamentoUsoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_medicamento_uso', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->foreignId('atendimento_enfermagem_id')->nullable()->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
$table->string('descricao', 3000);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_medicamento_uso');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoSinalVitalTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_sinal_vital', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->decimal('pa', 6, 3)->nullable();
|
||||
$table->foreignId('pa_unidade_medida_id')->nullable()->constrained('cadastro_unidade_medida');
|
||||
$table->unsignedSmallInteger('glicemia')->nullable();
|
||||
$table->decimal('temperatura', 3, 1)->nullable();
|
||||
$table->unsignedSmallInteger('pulso')->nullable();
|
||||
$table->unsignedTinyInteger('respiracao')->nullable();
|
||||
$table->unsignedTinyInteger('saturacao')->nullable();
|
||||
$table->unsignedTinyInteger('intensidade_dor')->nullable();
|
||||
$table->unsignedSmallInteger('cintura')->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_sinal_vital');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoAvaliacaoAntropometricaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_avaliacao_antropometrica', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->decimal('massa', 8, 2)->nullable();
|
||||
$table->foreignId('massa_unidade_medida_id')->nullable()->constrained('cadastro_unidade_medida');
|
||||
$table->foreignId('altura_tipo_medida_id')->nullable()->constrained('geral_tipo_medida_altura');
|
||||
$table->decimal('altura', 5, 2)->nullable();
|
||||
$table->foreignId('altura_unidade_medida_id')->nullable()->constrained('cadastro_unidade_medida');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_avaliacao_antropometrica');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoObservacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_observacao', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->string('descricao', 3000);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_observacao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoTriagemTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_triagem', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->text('historico_individual_familiar', 3000)->nullable();
|
||||
$table->text('outras_avaliacoes_condicoes', 3000)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_triagem');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoEncaminhamentoEspecialidadeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_encaminhamento_especialidade', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('ocupacao_id')->constrained('sigtap.ocupacao');
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_encaminhamento_especialidade');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateServicoEnfermagemTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->foreignId('procedimento_id')->nullable()->constrained('sigtap.procedimento');
|
||||
$table->string('observacoes', 100)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_servico_enfermagem');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoPrescricaoInternaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_prescricao_interna', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_medico_id')->nullable()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->foreignId('via_administracao_id')->constrained('cadastro_via_administracao');
|
||||
$table->unsignedSmallInteger('frequencia_quantidade_vezes')->nullable();
|
||||
$table->unsignedTinyInteger('frequencia_tempo')->nullable();
|
||||
$table->foreignId('frequencia_medida_tempo_id')->nullable()->constrained('geral_medida_tempo');
|
||||
$table->string('observacoes', 250)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_prescricao_interna');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoPrescricaoInternaMedicamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_prescricao_interna_medicamento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('prescricao_interna_id')
|
||||
->constrained('pronto_atendimento_atendimento_prescricao_interna')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('medicamento_id')->constrained('cadastro_medicamento');
|
||||
$table->unsignedTinyInteger('quantidade');
|
||||
$table->string('administracao', 50)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
|
||||
$table->unique(['prescricao_interna_id', 'medicamento_id', 'deleted_at']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_prescricao_interna_medicamento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoFaaDesfechoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_faa_desfecho', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 30)->unique();
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_faa_desfecho');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddDesfechoIdToProntoAtendimentoFaaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_faa', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('desfecho_id')
|
||||
->nullable()
|
||||
->after('paciente_id')
|
||||
->constrained('pronto_atendimento_faa_desfecho');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_faa', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['desfecho_id']);
|
||||
$table->dropColumn(['desfecho_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoEncaminhamentoHospitalarTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_encaminhamento_hospitalar', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_medico_id')->unique()->constrained('pronto_atendimento_atendimento_medico');
|
||||
$table->foreignId('usuario_id')->constrained('cadastro_usuario');
|
||||
$table->foreignId('unidade_id')->nullable()->constrained('cadastro_unidade');
|
||||
$table->string('unidade_nome', 100)->nullable();
|
||||
$table->string('quarto', 3)->nullable();
|
||||
$table->string('leito', 3)->nullable();
|
||||
$table->foreignId('cid_id')->nullable()->constrained('sigtap.cid');
|
||||
$table->string('medico_hospitalar', 150)->nullable();
|
||||
$table->string('observacoes', 3000)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_encaminhamento_hospitalar');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoMedicoTipoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_medico_tipo', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->string('nome', 100)->unique();
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_medico_tipo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoEnfermagemTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->text('planejamento')->nullable();
|
||||
$table->text('avaliacao')->nullable();
|
||||
$table->text('diagnostico')->nullable();
|
||||
$table->text('implementacao')->nullable();
|
||||
$table->text('historico')->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_enfermagem');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoEnfermagemAnotacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_enfermagem_anotacao', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_enfermagem_id')->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
$table->datetime('anotado_em');
|
||||
$table->text('descricao');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_enfermagem_anotacao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnfermagemIdIntoProntoAtendimentoAtendimentoClassificacaoRisco extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_classificacao_risco', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->after('atendimento_medico_id')
|
||||
->nullable()
|
||||
->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_classificacao_risco', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_enfermagem_id']);
|
||||
$table->dropColumn(['atendimento_enfermagem_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnfermagemIdIntoProntoAtendimentoAtendimentoSinalVital extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_sinal_vital', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->after('atendimento_medico_id')
|
||||
->nullable()
|
||||
->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_sinal_vital', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_enfermagem_id']);
|
||||
$table->dropColumn(['atendimento_enfermagem_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnfermagemIdIntoProntoAtendimentoAtendimentoAvaliacaoAntropometrica extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_avaliacao_antropometrica', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->after('atendimento_medico_id')
|
||||
->nullable()
|
||||
->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_avaliacao_antropometrica', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_enfermagem_id']);
|
||||
$table->dropColumn(['atendimento_enfermagem_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnfermagemIdIntoProntoAtendimentoAtendimentoProcedimento extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->after('atendimento_medico_id')
|
||||
->nullable()
|
||||
->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_enfermagem_id']);
|
||||
$table->dropColumn(['atendimento_enfermagem_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnfermagemIdIntoProntoAtendimentoAtendimentoGestacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_gestacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->after('atendimento_medico_id')
|
||||
->nullable()
|
||||
->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_gestacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_enfermagem_id']);
|
||||
$table->dropColumn(['atendimento_enfermagem_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnfermagemIdIntoProntoAtendimentoAtendimentoObservacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_observacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->after('atendimento_medico_id')
|
||||
->nullable()
|
||||
->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_observacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_enfermagem_id']);
|
||||
$table->dropColumn(['atendimento_enfermagem_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnfermagemIdIntoProntoAtendimentoAtendimentoServicoEnfermagem extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->after('atendimento_medico_id')
|
||||
->nullable()
|
||||
->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_enfermagem_id']);
|
||||
$table->dropColumn(['atendimento_enfermagem_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoPrescricaoInternaAplicacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_prescricao_interna_aplicacao', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('prescricao_interna_medicamento_id')->constrained('pronto_atendimento_atendimento_prescricao_interna_medicamento');
|
||||
$table->foreignId('status_id')->constrained('cadastro_exame_status');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_prescricao_interna_aplicacao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnfermagemIdIntoProntoAtendimentoPedidoExame extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_pedido_exame', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->after('atendimento_medico_id')
|
||||
->nullable()
|
||||
->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_pedido_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_enfermagem_id']);
|
||||
$table->dropColumn(['atendimento_enfermagem_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\Parametrizacao\Exame\Status;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddStatusIdIntoProntoAtendimentoAtendimentoServicoEnfermagem extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('status_id')
|
||||
->after('observacoes')->default(Status::SOLICITADO)
|
||||
->constrained('cadastro_exame_status');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['status_id']);
|
||||
$table->dropColumn(['status_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnfermagemIdToProntoAtendimentoAtendimentoPrescricaoInternaAplicacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_prescricao_interna_aplicacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')->nullable()->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_prescricao_interna_aplicacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_enfermagem_id']);
|
||||
$table->dropColumn(['atendimento_enfermagem_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoHistoriaEnfermagemTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_historia_enfermagem', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->string('descricao', 3000);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_historia_enfermagem');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoEnfermagemHistoricoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_enfermagem_historico', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_enfermagem_id')->nullable()->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
$table->string('descricao', 3000);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_enfermagem_historico');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoEnfermagemDiagnosticoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_enfermagem_diagnostico', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_enfermagem_id')->nullable()->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
$table->string('descricao', 3000);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_enfermagem_diagnostico');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoEnfermagemPlanejamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_enfermagem_planejamento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_enfermagem_id')->nullable()->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
$table->string('descricao', 3000);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_enfermagem_planejamento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoEnfermagemImplementacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_enfermagem_implementacao', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_enfermagem_id')->nullable()->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
$table->string('descricao', 3000);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_enfermagem_implementacao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAtendimentoEnfermagemAvaliacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_enfermagem_avaliacao', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_enfermagem_id')->nullable()->constrained('pronto_atendimento_atendimento_enfermagem');
|
||||
$table->string('descricao', 6000);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_enfermagem_avaliacao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropFieldsFromProntoAtendimentoAtendimentoEnfermagem extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn([
|
||||
'planejamento',
|
||||
'avaliacao',
|
||||
'diagnostico',
|
||||
'implementacao',
|
||||
'historico',
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->text('planejamento')->nullable();
|
||||
$table->text('avaliacao')->nullable();
|
||||
$table->text('diagnostico')->nullable();
|
||||
$table->text('implementacao')->nullable();
|
||||
$table->text('historico')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoPacienteObservacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_paciente_observacao', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->string('quarto', 5)->nullable();
|
||||
$table->string('leito', 5)->nullable();
|
||||
$table->boolean('aguardando_vaga_hospitalar')->default(false);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_paciente_observacao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoClassificacaoRisco extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_classificacao_risco', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_classificacao_risco', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn(['paciente_observacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoGestacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_gestacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_gestacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn(['paciente_observacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoMedicamentoUso extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medicamento_uso', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medicamento_uso', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn(['paciente_observacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoSinalVital extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_sinal_vital', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_sinal_vital', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn(['paciente_observacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoProcedimento extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn(['paciente_observacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoAvaliacaoAntropometrica extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_avaliacao_antropometrica', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_avaliacao_antropometrica', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn(['paciente_observacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoServicoEnfermagem extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn(['paciente_observacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoPacienteTraumaStatusTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_paciente_trauma_status', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 50);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_paciente_trauma_status');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFieldsIntoProntoAtendimentoPacienteObservacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_paciente_observacao', function (Blueprint $table) {
|
||||
|
||||
$table->string('observacao', 3000)->nullable()->after('aguardando_vaga_hospitalar');
|
||||
$table->string('avaliacao_mmss_mmii', 3000)->nullable()->after('aguardando_vaga_hospitalar');
|
||||
$table->string('avaliacao_abdome', 3000)->nullable()->after('aguardando_vaga_hospitalar');
|
||||
$table->string('avaliacao_torax', 3000)->nullable()->after('aguardando_vaga_hospitalar');
|
||||
$table->string('avaliacao_cabeca_pescoco', 3000)->nullable()->after('aguardando_vaga_hospitalar');
|
||||
|
||||
$table->foreignId('exposicao_hipotermia_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->string('exposicao_hipotermia_observacao', 100)
|
||||
->nullable()
|
||||
->after('exposicao_hipotermia_trauma_status_id');
|
||||
|
||||
$table->foreignId('plegia_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->foreignId('paresias_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->foreignId('pupilas_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->foreignId('sangramento_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->string('sangramento_local', 100)
|
||||
->nullable()
|
||||
->after('sangramento_trauma_status_id');
|
||||
|
||||
$table->foreignId('perfuracao_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->string('perfuracao_lentificada', 100)
|
||||
->nullable()
|
||||
->after('perfuracao_trauma_status_id');
|
||||
|
||||
$table->foreignId('pele_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->string('pele_alteracao', 100)
|
||||
->nullable()
|
||||
->after('pele_trauma_status_id');
|
||||
|
||||
$table->foreignId('pulso_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->foreignId('oxigenacao_respiracao_ventilacao_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->foreignId('vias_aerias_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->string('vias_aerias_obstrucao_por', 100)
|
||||
->nullable()
|
||||
->after('vias_aerias_trauma_status_id');
|
||||
|
||||
$table->foreignId('hemorragia_externa_grave_trauma_status_id')
|
||||
->nullable()
|
||||
->after('aguardando_vaga_hospitalar')
|
||||
->constrained('pronto_atendimento_paciente_trauma_status');
|
||||
|
||||
$table->string('hemorragia_externa_grave_local', 100)
|
||||
->nullable()
|
||||
->after('hemorragia_externa_grave_trauma_status_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_paciente_observacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['hemorragia_externa_grave_trauma_status_id']);
|
||||
$table->dropForeign(['vias_aerias_trauma_status_id']);
|
||||
$table->dropForeign(['oxigenacao_respiracao_ventilacao_trauma_status_id']);
|
||||
$table->dropForeign(['pulso_trauma_status_id']);
|
||||
$table->dropForeign(['pele_trauma_status_id']);
|
||||
$table->dropForeign(['perfuracao_trauma_status_id']);
|
||||
$table->dropForeign(['sangramento_trauma_status_id']);
|
||||
$table->dropForeign(['pupilas_trauma_status_id']);
|
||||
$table->dropForeign(['paresias_trauma_status_id']);
|
||||
$table->dropForeign(['plegia_trauma_status_id']);
|
||||
$table->dropForeign(['exposicao_hipotermia_trauma_status_id']);
|
||||
|
||||
$table->dropColumn([
|
||||
'hemorragia_externa_grave_trauma_status_id',
|
||||
'hemorragia_externa_grave_local',
|
||||
'vias_aerias_trauma_status_id',
|
||||
'vias_aerias_obstrucao_por',
|
||||
'oxigenacao_respiracao_ventilacao_trauma_status_id',
|
||||
'pulso_trauma_status_id',
|
||||
'pele_trauma_status_id',
|
||||
'pele_alteracao',
|
||||
'perfuracao_trauma_status_id',
|
||||
'perfuracao_lentificada',
|
||||
'sangramento_trauma_status_id',
|
||||
'sangramento_local',
|
||||
'pupilas_trauma_status_id',
|
||||
'paresias_trauma_status_id',
|
||||
'plegia_trauma_status_id',
|
||||
'exposicao_hipotermia_trauma_status_id',
|
||||
'exposicao_hipotermia_observacao',
|
||||
'avaliacao_cabeca_pescoco',
|
||||
'avaliacao_torax',
|
||||
'avaliacao_abdome',
|
||||
'avaliacao_mmss_mmii',
|
||||
'observacao',
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoEnfermagemAnotacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_anotacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->nullable()
|
||||
->change();
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_anotacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_enfermagem_id')
|
||||
->nullable(false)
|
||||
->change();
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn(['paciente_observacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoPrescricaoInternaAplicacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_prescricao_interna_aplicacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('status_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_prescricao_interna_aplicacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn(['paciente_observacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoPacienteObservacaoEscalaComaGlasgowTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_paciente_observacao_escala_coma_glasgow', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('paciente_observacao_id')->constrained('pronto_atendimento_paciente_observacao');
|
||||
$table->foreignId('abertura_ocular_id')->constrained('geral_glasgow_abertura_ocular');
|
||||
$table->foreignId('resposta_verbal_id')->constrained('geral_glasgow_resposta_verbal');
|
||||
$table->foreignId('resposta_motora_id')->constrained('geral_glasgow_resposta_motora');
|
||||
$table->foreignId('reatividade_pupilar_id')->constrained('geral_glasgow_reatividade_pupilar');
|
||||
$table->string('observacao', 2500);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_paciente_observacao_escala_coma_glasgow');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddDesfechoIdIntoProntoAtendimentoAtendimentoMedico extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('desfecho_id')
|
||||
->after('atendimento_id')
|
||||
->nullable()
|
||||
->constrained('pronto_atendimento_faa_desfecho');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['desfecho_id']);
|
||||
$table->dropColumn('desfecho_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropSolicitouReavaliacaoFromProntoAtendimentoAtendimentoMedico extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('solicitou_reavaliacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->boolean('solicitou_reavaliacao')
|
||||
->after('orientacoes')
|
||||
->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddMotivoEvasaoIntoProntoAtendimentoAtendimentoMedico extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->text('motivo_evasao')
|
||||
->after('desfecho_id')
|
||||
->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('motivo_evasao');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoEnfermagemHistorico extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_historico', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_historico', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn('paciente_observacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoEnfermagemDiagnostico extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_diagnostico', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_diagnostico', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn('paciente_observacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoEnfermagemPlanejamento extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_planejamento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_planejamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn('paciente_observacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoEnfermagemImplementacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_implementacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_implementacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn('paciente_observacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoEnfermagemAvaliacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_avaliacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_avaliacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn('paciente_observacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoAtendimentoEncaminhamentoHospitalar extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_encaminhamento_hospitalar', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_medico_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_encaminhamento_hospitalar', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn('paciente_observacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterProntoAtendimentoAtendimentoEncaminhamentoHospitalarMakeAtendimentoMedicoIdNullable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_encaminhamento_hospitalar', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_medico_id')
|
||||
->nullable()
|
||||
->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_encaminhamento_hospitalar', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_medico_id')
|
||||
->nullable(false)
|
||||
->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPacienteObservacaoIdIntoProntoAtendimentoPedidoExame extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_pedido_exame', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('paciente_observacao_id')
|
||||
->nullable()
|
||||
->after('atendimento_enfermagem_id')
|
||||
->constrained('pronto_atendimento_paciente_observacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_pedido_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['paciente_observacao_id']);
|
||||
$table->dropColumn('paciente_observacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFieldDataHoraProximaReavaliacaoIntoProntoAtendimentoAtendimentoMedico extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->timestamp('data_hora_proxima_reavaliacao')
|
||||
->after('observacoes_enfermagem')
|
||||
->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('data_hora_proxima_reavaliacao');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPlantaoIdToProntoAtendimentoAtendimentoRecepcaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('plantao_id')->after('id')->nullable()->constrained('pronto_atendimento_plantao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['plantao_id']);
|
||||
$table->dropColumn('plantao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class SetMotivoAtendimentoToNotNullOnProntoAtendimentoAtendimentoRecepcao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->string('motivo_atendimento', 3000)->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->string('motivo_atendimento', 3000)->nullable(true)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddBpaProcedimentoIdIntoProntoAtendimentoAtendimentoProcedimento extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
$table->foreignId('bpa_procedimento_id')->after('paciente_observacao_id')->nullable()->constrained('bpa_procedimento');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
$table->dropForeign(['bpa_procedimento_id']);
|
||||
$table->dropColumn(['bpa_procedimento_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPlantaoIdToProntoAtendimentoAtendimentoTriagemTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_triagem', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('plantao_id')->after('id')->constrained('pronto_atendimento_plantao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_triagem', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['plantao_id']);
|
||||
$table->dropColumn('plantao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddIsParametrizadoIntoProntoAtendimentoAtendimentoProcedimento extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
|
||||
$table->boolean('is_parametrizado')
|
||||
->after('quantidade')
|
||||
->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('is_parametrizado');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPlantaoIdIntoProntoAtendimentoAtendimentoMedico extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('plantao_id')->after('id')->constrained('pronto_atendimento_plantao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['plantao_id']);
|
||||
$table->dropColumn('plantao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddAtendimentoTriagemIdIntoProntoAtendimentoAtendimentoEnfermagemHistorico extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_historico', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_triagem_id')
|
||||
->nullable()
|
||||
->after('atendimento_id')
|
||||
->constrained('pronto_atendimento_atendimento_triagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem_historico', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['atendimento_triagem_id']);
|
||||
$table->dropColumn('atendimento_triagem_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropProntoAtendimentoAtendimentoHistoriaEnfermagem extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_atendimento_historia_enfermagem');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::create('pronto_atendimento_atendimento_historia_enfermagem', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('atendimento_triagem_id')->nullable()->constrained('pronto_atendimento_atendimento_triagem');
|
||||
$table->string('descricao', 3000);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterStatusIdForeignKeyOnPrescricaoInternaAplicacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_prescricao_interna_aplicacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['status_id']);
|
||||
|
||||
$table->foreign('status_id')->references('id')->on('parametrizacao_exame_status');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_prescricao_interna_aplicacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['status_id']);
|
||||
|
||||
$table->foreign('status_id')->references('id')->on('cadastro_exame_status');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterStatusIdForeignKeyOnProntoAtendimentoAtendimentoServicoEnfermagem extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['status_id']);
|
||||
|
||||
$table->foreign('status_id')->references('id')->on('parametrizacao_exame_status');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['status_id']);
|
||||
|
||||
$table->foreign('status_id')->references('id')->on('cadastro_exame_status');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFinalizadoIntoProntoAtendimentoFaa extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_faa', function (Blueprint $table) {
|
||||
|
||||
$table->boolean('finalizado')->default(false)->after('desfecho_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_faa', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('finalizado');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddCidIdToProntoAtendimentoAtendimentoServicoEnfermagemTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('cid_id')->nullable()->after('status_id')->constrained('sigtap.cid');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::dropColumnWithForeign($table, 'cid_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddLotacaoIdIntoProntoAtendimentoAtendimentoProcedimento extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('lotacao_id')
|
||||
->nullable()
|
||||
->after('procedimento_id')
|
||||
->constrained('cadastro_lotacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_procedimento', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['lotacao_id']);
|
||||
$table->dropColumn('lotacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUsuarioIdIntoCadastroObito extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('cadastro_obito', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('usuario_id')
|
||||
->nullable()
|
||||
->after('cid_id')
|
||||
->constrained('cadastro_usuario');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('cadastro_obito', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['usuario_id']);
|
||||
$table->dropColumn('usuario_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUsuarioIdIntoProntoAtendimentoFaa extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_faa', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('usuario_id')
|
||||
->nullable()
|
||||
->after('finalizado')
|
||||
->constrained('cadastro_usuario');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_faa', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['usuario_id']);
|
||||
$table->dropColumn('usuario_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class SetAtendimentoIdAsNullOnProntoAtendimentoAtendimentoRecepcao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_id')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_id')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class SetServicoIdAsNullOnProntoAtendimentoAtendimentoRecepcao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('servico_id')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('servico_id')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterPaOnProntoAtendimentoAtendimentoSinalVitalTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_sinal_vital', function (Blueprint $table) {
|
||||
|
||||
$table->string('pa', 7)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_sinal_vital', function (Blueprint $table) {
|
||||
|
||||
$table->decimal('pa', 6, 3)->nullable()->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class SetFilaIdAsNullOnProntoAtendimentoAtendimento extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('fila_id')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('fila_id')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class SetAtendimentoIdAsNotNullOnProntoAtendimentoAtendimentoRecepcao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_id')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_recepcao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('atendimento_id')->nullable()->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPlantaoIdIntoProntoAtendimentoAtendimentoEnfermagem extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('plantao_id')->after('id')->constrained('pronto_atendimento_plantao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_atendimento_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['plantao_id']);
|
||||
$table->dropColumn('plantao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPlantaoIdIntoProntoAtendimentoPacienteObservacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_paciente_observacao', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('plantao_id')->after('id')->constrained('pronto_atendimento_plantao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_paciente_observacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['plantao_id']);
|
||||
$table->dropColumn('plantao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user