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,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAtencaoBasicaFichaComplementarTesteOlhinhoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('atencao_basica_ficha_complementar_teste_olhinho', function (Blueprint $table) {
$table->id();
$table->integer('codigo');
$table->string('descricao');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('atencao_basica_ficha_complementar_teste_olhinho');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAtencaoBasicaFichaComplementarFundoOlhoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('atencao_basica_ficha_complementar_fundo_olho', function (Blueprint $table) {
$table->id();
$table->integer('codigo');
$table->string('descricao');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('atencao_basica_ficha_complementar_fundo_olho');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAtencaoBasicaFichaComplementarTesteOrelhinhaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('atencao_basica_ficha_complementar_teste_orelhinha', function (Blueprint $table) {
$table->id();
$table->integer('codigo');
$table->string('descricao');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('atencao_basica_ficha_complementar_teste_orelhinha');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAtencaoBasicaFichaComplementarUsTransfontanelaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('atencao_basica_ficha_complementar_us_transfontanela', function (Blueprint $table) {
$table->id();
$table->integer('codigo');
$table->string('descricao');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('atencao_basica_ficha_complementar_us_transfontanela');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAtencaoBasicaFichaComplementarTomografiaComputadorizadaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('atencao_basica_ficha_complementar_tomografia_computadorizada', function (Blueprint $table) {
$table->id();
$table->integer('codigo');
$table->string('descricao');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('atencao_basica_ficha_complementar_tomografia_computadorizada');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAtencaoBasicaFichaComplementarRessonanciaMagneticaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('atencao_basica_ficha_complementar_ressonancia_magnetica', function (Blueprint $table) {
$table->id();
$table->integer('codigo');
$table->string('descricao');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('atencao_basica_ficha_complementar_ressonancia_magnetica');
}
}

View File

@@ -0,0 +1,75 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAtencaoBasicaFichaComplementarTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('atencao_basica_ficha_complementar', function (Blueprint $table) {
$table->id();
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
$table->foreignId('usuario_id')->constrained('cadastro_usuario');
$table->foreignId('cbo_id')->constrained('sigtap.ocupacao');
$table->foreignId('unidade_id')->constrained('cadastro_unidade');
$table->foreignId('equipe_id')->constrained('atencao_basica_parametrizacao_equipe');
$table->integer('tipo_cds_origem');
$table->foreignId('turno_id')->constrained('geral_turno');
$table->date('data_atendimento');
$table->date('data_realizacao_teste_olhinho')->nullable(true);
$table->foreignId('resultado_teste_olhinho_id')
->nullable(true)
->constrained('atencao_basica_ficha_complementar_teste_olhinho');
$table->date('data_realizacao_fundo_olho')->nullable(true);
$table->foreignId('resultado_fundo_olho_id')
->nullable(true)
->constrained('atencao_basica_ficha_complementar_fundo_olho');
$table->date('data_realizacao_teste_orelhinha')->nullable(true);
$table->foreignId('resultado_teste_orelhinha_id')
->nullable(true)
->constrained('atencao_basica_ficha_complementar_teste_orelhinha');
$table->date('data_realizacao_us_transfontanela')->nullable(true);
$table->foreignId('resultado_us_transfontanela_id')
->nullable(true)
->constrained('atencao_basica_ficha_complementar_us_transfontanela');
$table->date('data_realizacao_tomografia_computadorizada')->nullable(true);
$table->foreignId('resultado_tomografia_computadorizada_id')
->nullable(true)
->constrained('atencao_basica_ficha_complementar_tomografia_computadorizada');
$table->date('data_realizacao_ressonancia_magnetica')->nullable(true);
$table->foreignId('resultado_ressonancia_magnetica_id')
->nullable(true)
->constrained('atencao_basica_ficha_complementar_ressonancia_magnetica');
$table->longText('uuid_ficha');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('atencao_basica_ficha_complementar');
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAtencaoBasicaFichaComplementarAtendimentoPermitido extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('atencao_basica_ficha_complementar_atendimento_permitido', 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('atencao_basica_ficha_complementar_atendimento_permitido');
}
}

View File

@@ -0,0 +1,55 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFieldsExportacaoToAtencaoBasicaFichaComplementarTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('atencao_basica_ficha_complementar', function (Blueprint $table) {
$table
->foreignId('exportacao_id')
->nullable()
->after('id')
->constrained('atencao_basica_exportacao');
$table
->foreignId('usuario_exportacao_id')
->nullable()
->after('uuid_ficha')
->constrained('cadastro_usuario');
$table
->dateTime('data_hora_exportacao')
->nullable()
->after('usuario_exportacao_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('atencao_basica_ficha_complementar', function (Blueprint $table) {
$table->dropForeign(['exportacao_id']);
$table->dropColumn(['exportacao_id']);
$table->dropForeign(['usuario_exportacao_id']);
$table->dropColumn(['usuario_exportacao_id']);
$table->dropColumn('data_hora_exportacao');
});
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFieldsGeolocalizacaoToAtencaoBasicaFichaComplementarTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('atencao_basica_ficha_complementar', function (Blueprint $table) {
$table->string('latitude', 10)->nullable();
$table->string('longitude', 10)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('atencao_basica_ficha_complementar', function (Blueprint $table) {
$table->dropColumn('latitude');
$table->dropColumn('longitude');
});
}
}

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterAtencaoBasicaFichaComplementarNullableOnUuidFicha extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
Schema::table('atencao_basica_ficha_complementar', function (Blueprint $table) {
$table->longText('uuid_ficha')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
Schema::table('atencao_basica_ficha_complementar', function (Blueprint $table) {
$table->longText('uuid_ficha')->nullable(false)->change();
});
}
}