init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -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');
}
}

View File

@@ -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');
}
}

View File

@@ -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']);
});
}
}

View File

@@ -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');
});
}
}

View File

@@ -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']);
});
}
}

View File

@@ -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']);
});
}
}

View File

@@ -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']);
});
}
}

View File

@@ -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']);
});
}
}

View File

@@ -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']);
});
}
}

View File

@@ -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();
});
}
}

View File

@@ -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');
});
}
}

View File

@@ -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']);
});
}
}

View File

@@ -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');
});
}
}

View File

@@ -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');
}
}

View File

@@ -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']);
});
}
}

View File

@@ -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');
});
}
}

View File

@@ -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');
});
}
}

View File

@@ -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');
});
}
}