This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterArquivosLaudosExameImagemTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
|
||||
$cliente = app('config')->get('database.default');
|
||||
$destino = storage_path("app/exame-imagem/laudos/" . $cliente);
|
||||
|
||||
if (!File::exists($destino)) {
|
||||
File::makeDirectory($destino, 0775, true);
|
||||
}
|
||||
|
||||
DB::table('exame_imagem_agendamento_exame')
|
||||
->select(['arquivo'])
|
||||
->whereNotNull('arquivo')
|
||||
->orderBy('id')
|
||||
->get()
|
||||
->each(function ($registro) use ($destino) {
|
||||
$origem = storage_path('app/exame-imagem/laudos/' . $registro->arquivo);
|
||||
|
||||
if (File::exists($origem)) {
|
||||
File::move($origem, $destino . DIRECTORY_SEPARATOR . $registro->arquivo);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemAgendamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_agendamento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->char('agendamento_numero', 15);
|
||||
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
|
||||
$table->foreignId('medico_id')->constrained('cadastro_usuario');
|
||||
$table->foreignId('unidade_id')->constrained('cadastro_unidade');
|
||||
$table->foreignId('infraestrutura_id')->constrained('cadastro_infraestrutura');
|
||||
$table->foreignId('unidade_solicitante_id')->constrained('cadastro_unidade');
|
||||
$table->foreignId('infraestrutura_solicitante_id')->constrained('cadastro_infraestrutura');
|
||||
$table->foreignId('jornada_id')->constrained('exame_imagem_jornada');
|
||||
$table->foreignId('profissional_id')->constrained('cadastro_usuario');
|
||||
$table->foreignId('exame_id')->nullable();
|
||||
$table->date('data');
|
||||
$table->boolean('gestante')->default(false);
|
||||
$table->date('data_menstruacao')->nullable();
|
||||
$table->time('hora_exame');
|
||||
$table->boolean('urgente')->default(false);
|
||||
$table->text('nome_responsavel', 3000)->nullable();
|
||||
$table->string('observacao', 3000)->nullable();
|
||||
$table->foreignId('supervisor_id')->nullable()->constrained('cadastro_usuario');
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_agendamento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('agendamento_id')->constrained('exame_imagem_agendamento');
|
||||
$table->foreignId('exame_id')->constrained('parametrizacao_exame');
|
||||
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_agendamento_exame');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddStatusIdExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('status_id')->nullable()->constrained('exame_imagem_fechamento_status')->after('paciente_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['status_id']);
|
||||
$table->dropColumn(['status_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddResultadoExameImagemAgendamentoResultadoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->string('resultado', 1500)->after('status_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('resultado');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddArquivoFileToExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->string('arquivo', 100)->nullable()->after('paciente_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn(['arquivo']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFieldsToExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->string('laudo_nome', 1500)->nullable()->after('arquivo');
|
||||
$table->date('laudo_data')->nullable()->after('laudo_nome');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn(['laudo_nome']);
|
||||
$table->dropColumn(['laudo_data']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddStatusLancamentoToExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->boolean('status_troca')->default(false)->after('status_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn(['status_troca']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddStatusPrincipalLancamentoToExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->boolean('principal')->default(false)->after('status_troca');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn(['principal']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUsuarioIdLancamentoToExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('usuario_id')->nullable()->constrained('cadastro_usuario')->after('laudo_data');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', 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 AlterResultadoSizeToExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->string('resultado', 3500)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->string('resultado', 1500)->nullable()->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFieldRetroativoToExameImagemAgendamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento', function (Blueprint $table) {
|
||||
|
||||
$table->boolean('retroativo')->after('supervisor_id')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('retroativo');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddAgendadorIdToExameImagemAgendamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('agendador_id')->nullable()->constrained('cadastro_usuario');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['agendador_id']);
|
||||
$table->dropColumn(['agendador_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddRegulacaoSolicitacaoIdToExameImagemAgendamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('regulacao_solicitacao_id')
|
||||
->nullable()
|
||||
->after('retroativo')
|
||||
->constrained('regulacao_solicitacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropConstrainedForeignId('regulacao_solicitacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemAgendamentoHistoricoExclusaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_agendamento_historico_exclusao', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('agendamento_id');
|
||||
$table->unsignedBigInteger('agendamento_agendador_id')->nullable();
|
||||
$table->dateTime('data_hora_criacao')->nullable();
|
||||
$table->unsignedBigInteger('paciente_id');
|
||||
$table->string('agendamento_numero');
|
||||
$table->unsignedBigInteger('exame_id');
|
||||
$table->dateTime('data_hora_exclusao')->nullable();
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_agendamento_historico_exclusao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUsuarioIdDeleteDataHoraExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('usuario_id_cancelado')
|
||||
->nullable()
|
||||
->after('usuario_id')
|
||||
->constrained('cadastro_usuario');
|
||||
|
||||
$table->dateTime('data_hora_cancelado')->nullable()->after('usuario_id_cancelado');
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['usuario_id_cancelado']);
|
||||
$table->dropColumn(['usuario_id_cancelado']);
|
||||
$table->dropColumn(['data_hora_cancelado']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddSoapSolicitacaoExameItemIdToExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('soap_solicitacao_exame_item_id')
|
||||
->nullable()
|
||||
->after('agendamento_id')
|
||||
->constrained('ambulatorio_atendimento_soap_solicitacao_exame_item');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropConstrainedForeignId('soap_solicitacao_exame_item_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddAcompanhamentoOciIdToExameImagemAgendamentoExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('acompanhamento_oci_id')
|
||||
->nullable()
|
||||
->constrained('ambulatorio_acompanhamento_oci');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento_exame', function (Blueprint $table) {
|
||||
|
||||
$table->dropConstrainedForeignId('acompanhamento_oci_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddAppConectasusCidadaoToExameImagemAgendamentoTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento', function (Blueprint $table) {
|
||||
$table->boolean('app_conectasus_cidadao')->default(false)->after('retroativo');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_agendamento', function (Blueprint $table) {
|
||||
$table->dropColumn('app_conectasus_cidadao');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemHistoricoAlteracaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_historico_alteracao', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('agendamento_id')->constrained('exame_imagem_agendamento');
|
||||
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
|
||||
$table->foreignId('agendamento_exame_id')->constrained('exame_imagem_agendamento_exame');
|
||||
$table->string('resultado', 3000)->nullable();
|
||||
$table->string('arquivo', 100)->nullable();
|
||||
$table->string('laudo_nome', 1500);
|
||||
$table->date('laudo_data')->nullable();
|
||||
$table->foreignId('usuario_id')->nullable()->constrained('cadastro_usuario');
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_historico_alteracao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterLaudoNomeNullableToExameImagemHistoricoAlteracaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_historico_alteracao', function (Blueprint $table) {
|
||||
|
||||
$table->string('laudo_nome', 1500)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_historico_alteracao', function (Blueprint $table) {
|
||||
|
||||
$table->string('laudo_nome', 1500)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemFechamentoStatusTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_fechamento_status', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 10);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_fechamento_status');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterFieldNomeSizeFromExameImagemFechamentoStatusTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_status', function (Blueprint $table) {
|
||||
|
||||
$table->string('nome', 180)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_status', function (Blueprint $table) {
|
||||
|
||||
$table->string('nome', 10)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemFechamentoFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->date('data');
|
||||
$table->foreignId('agendamento_id')->constrained('exame_imagem_agendamento');
|
||||
$table->foreignId('exame_id')->constrained('parametrizacao_exame');
|
||||
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
|
||||
$table->foreignId('grupo_id')->constrained('cadastro_grupo');
|
||||
$table->foreignId('unidade_id')->constrained('cadastro_unidade');
|
||||
$table->foreignId('agendamento_exame_id')->constrained('exame_imagem_agendamento_exame');
|
||||
$table->decimal('valor', 8, 2)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_fechamento_faturamento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddValorNormalToExameImagemFechamentoFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->decimal('valor_normal', 8, 2)->after('valor')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('valor_normal');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddBpaProcedimentoIdToExameImagemFechamentoFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
$table->foreignId('bpa_procedimento_id')->after('valor_normal')->nullable()->constrained('bpa_procedimento');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
$table->dropForeign(['bpa_procedimento_id']);
|
||||
$table->dropColumn(['bpa_procedimento_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFieldsToExameImagemFechamentoFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('procedimento_id')->nullable()->after('bpa_procedimento_id')->constrained('sigtap.procedimento');
|
||||
$table->foreignId('lotacao_id')->nullable()->after('procedimento_id')->constrained('cadastro_lotacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['procedimento_id']);
|
||||
$table->dropColumn('procedimento_id');
|
||||
$table->dropForeign(['lotacao_id']);
|
||||
$table->dropColumn('lotacao_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddQuantidadeToExameImagemFechamentoFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->unsignedSmallInteger('quantidade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('quantidade');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddOcupacaoIdToExameImagemFechamentoFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('ocupacao_id')->after('lotacao_id')->nullable()->constrained('sigtap.ocupacao');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
$table->dropForeign(['ocupacao_id']);
|
||||
$table->dropColumn(['ocupacao_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddCidsIdToExameImagemFechamentoFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('cid_principal_id')->after('ocupacao_id')->nullable()->constrained('sigtap.cid');
|
||||
$table->foreignId('cid_secundario_id')->after('cid_principal_id')->nullable()->constrained('sigtap.cid');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['cid_principal_id']);
|
||||
$table->dropColumn(['cid_principal_id']);
|
||||
$table->dropForeign(['cid_secundario_id']);
|
||||
$table->dropColumn(['cid_secundario_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUsuarioIdToExameImagemFechamentoFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('usuario_id')->nullable()->after('cid_secundario_id')->constrained('cadastro_usuario');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['usuario_id']);
|
||||
$table->dropColumn('usuario_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddApacProcedimentoSecundarioIdToExameImagemFechamentoFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('apac_procedimento_secundario_id')
|
||||
->nullable()
|
||||
->after('bpa_procedimento_id')
|
||||
->constrained('apac_solicitacao_autorizacao_procedimento_secundario');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_fechamento_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->dropConstrainedForeignId('apac_procedimento_secundario_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaTipoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_tipo', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 10);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada_tipo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaStatusTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_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('exame_imagem_jornada_status');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaSemanaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_semana', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 10);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada_semana');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('unidade_id')->constrained('cadastro_unidade');
|
||||
$table->foreignId('infraestrutura_id')->constrained('cadastro_infraestrutura');
|
||||
$table->foreignId('exame_id')->nullable();
|
||||
$table->foreignId('prestador_id')->nullable()->constrained('exame_imagem_parametrizacao_unidade');
|
||||
$table->foreignId('usuario_id')->constrained('cadastro_usuario');
|
||||
$table->foreignId('semana_id')->constrained('exame_imagem_jornada_semana');
|
||||
$table->foreignId('status_id')->constrained('exame_imagem_jornada_status');
|
||||
$table->foreignId('tipo_id')->constrained('exame_imagem_jornada_tipo');
|
||||
$table->bigInteger('vagas');
|
||||
$table->date('data');
|
||||
$table->time('hora_inicial');
|
||||
$table->time('hora_fim');
|
||||
$table->bigInteger('tempo_atendimento');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_exame', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 255);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada_exame');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropExameImagemJornadaExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada_exame');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_exame', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->string('nome');
|
||||
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddControleJornadaIdExameImagemJornadaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('controle_jornada_id')->constrained('exame_imagem_parametrizacao_controle_jornada_tipo')->after('id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['controle_jornada_id']);
|
||||
$table->dropColumn(['controle_jornada_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterTempoAtendimentoNullableToExameImagemJornadaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->bigInteger('tempo_atendimento')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->bigInteger('tempo_atendimento')->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddSupervisorIdToExameImagemJornadaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('supervisor_id')->nullable()->after('usuario_id')->constrained('cadastro_usuario');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['supervisor_id']);
|
||||
$table->dropColumn(['supervisor_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterExameImagemJornadaAddVagasApp extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('vagas_app')->nullable()->after('vagas');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
$table->dropColumn('vagas_app');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoUnidadeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_unidade', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('unidade_id')->constrained('cadastro_unidade');
|
||||
$table->boolean('solicitante');
|
||||
$table->boolean('prestador');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_unidade');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoCotaPrestador extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_cota_prestador', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('unidade_id')->constrained('cadastro_unidade');
|
||||
$table->tinyInteger('cota_tipo');
|
||||
$table->decimal('cota_valor', 10, 2)->nullable();
|
||||
$table->bigInteger('cota_unidade')->nullable();
|
||||
$table->tinyInteger('cota_mes');
|
||||
$table->smallInteger('cota_ano');
|
||||
$table->text('observacao', 500)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_cota_prestador');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoCotaPrestadorTipoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_cota_prestador_tipo', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('descricao');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_cota_prestador_tipo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoCotaPrestadorMesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_cota_prestador_mes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('descricao');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_cota_prestador_mes');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterInfraestruturaIdFromExameImagemParametrizacaoUnidadeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_unidade', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('infraestrutura_id')->constrained('cadastro_infraestrutura');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_unidade', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::dropColumnWithForeign($table, 'infraestrutura_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterInfraestruturaIdFromExameImagemParametrizacaoCotaPrestadorTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_cota_prestador', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('infraestrutura_id')->constrained('cadastro_infraestrutura');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_cota_prestador', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::dropColumnWithForeign($table, 'infraestrutura_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterExecutanteOnExameImagemParametrizacaoUnidadeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_unidade', function(Blueprint $table){
|
||||
|
||||
$table->dropColumn([
|
||||
'solicitante',
|
||||
]);
|
||||
|
||||
$table->boolean('executante');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_unidade', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn(['executante']);
|
||||
|
||||
$table->boolean('solicitante');
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoMensagemProtocoloTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_mensagem_protocolo', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->string('mensagem');
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_mensagem_protocolo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoOcupacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_ocupacao', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('ocupacao_id')->constrained('sigtap.ocupacao');
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_ocupacao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoSupervisorTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_supervisor', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('usuario_id')->constrained('cadastro_usuario');
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_supervisor');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddInicioFimToExameImagemParametrizacaoCotaPrestadorTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_cota_prestador', function (Blueprint $table) {
|
||||
|
||||
$table->date('inicio')->after('unidade_id');
|
||||
$table->date('fim')->after('inicio');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_cota_prestador', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('inicio');
|
||||
$table->dropColumn('fim');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropCotaTipoMesAnoOnExameImagemParametrizacaoCotaPrestadorTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_cota_prestador', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('cota_tipo');
|
||||
$table->dropColumn('cota_mes');
|
||||
$table->dropColumn('cota_ano');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_cota_prestador', function (Blueprint $table) {
|
||||
|
||||
$table->tinyInteger('cota_tipo');
|
||||
$table->tinyInteger('cota_mes');
|
||||
$table->smallInteger('cota_ano');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddCotaTipoIdToExameImagemParametrizacaoCotaPrestadorTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_cota_prestador', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('cota_tipo_id')->nullable()->after('unidade_id')->constrained('exame_imagem_parametrizacao_cota_prestador_tipo');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_cota_prestador', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['cota_tipo_id']);
|
||||
$table->dropColumn(['cota_tipo_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoControleJornadaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_controle_jornada', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->tinyInteger('tipo_controle');
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_controle_jornada');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoControleJornadaTipoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_controle_jornada_tipo', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('descricao');
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_controle_jornada_tipo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterMensagemSizeToExameImagemParametrizacaoMensagemProtocoloTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_mensagem_protocolo', function (Blueprint $table) {
|
||||
|
||||
$table->string('mensagem', 500)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_mensagem_protocolo', function (Blueprint $table) {
|
||||
|
||||
$table->string('mensagem', 255)->nullable()->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoUnidadeSmsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_unidade_sms', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('parametrizacao_unidade_id')
|
||||
->constrained('exame_imagem_parametrizacao_unidade')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedSmallInteger('dia_antecedencia');
|
||||
$table->date('envio_de')->nullable();
|
||||
$table->date('envio_ate')->nullable();
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_unidade_sms');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoUnidadeSmsExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_unidade_sms_exame', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('parametrizacao_unidade_sms_id')
|
||||
->constrained('exame_imagem_parametrizacao_unidade_sms')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('exame_id')->constrained('parametrizacao_exame');
|
||||
|
||||
$table->primary(['parametrizacao_unidade_sms_id', 'exame_id']);
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_unidade_sms_exame');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddEnviaSmsToExameImagemParametrizacaoUnidadeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_unidade', function (Blueprint $table) {
|
||||
|
||||
$table->boolean('envia_sms')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_parametrizacao_unidade', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('envia_sms');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoExameAmbulatorioAtendimentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_exame_ambulatorio_atendimento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->boolean('exibir')->default(true);
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_exame_ambulatorio_atendimento');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoIntegracaoAplicativoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_integracao_aplicativo', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->boolean('habilita_agendamento_conectasus_cidadao')->nullable()->default(false);
|
||||
$table->boolean('habilita_consulta_imagem_conectasus_cidadao')->nullable()->default(false);
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_integracao_aplicativo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemParametrizacaoAppConectasusCidadaoPrestadorTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_parametrizacao_app_conectasus_cidadao_prestador', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('infraestrutura_id')
|
||||
->constrained('cadastro_infraestrutura');
|
||||
|
||||
$table->decimal('percentual_financeiro', 5, 2)->nullable();
|
||||
$table->decimal('percentual_quantitativo', 5, 2)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_parametrizacao_app_conectasus_cidadao_prestador');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user