<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('db_syncinsitu', function (Blueprint $table) {
            $table->id();
            $table->integer('noloket')->nullable();
            $table->string('nofoto', 50)->nullable();
            $table->string('noregister', 50)->nullable();
            $table->string('asalpasien', 150)->nullable();
            $table->string('nmrs', 150)->nullable();
            $table->string('nmpasien', 250)->nullable();
            $table->string('jkpasien', 15)->nullable();
            $table->date('tgllahirpasien')->nullable();
            $table->string('tlppasien', 150)->nullable();
            $table->string('alamatpasien', 250)->nullable();
            $table->string('reques', 150)->nullable();
            $table->string('usia', 25)->nullable();
            $table->decimal('berat', $precision = 8, $scale = 2)->nullable();
            $table->string('ruangan', 50)->nullable();
            $table->string('nmdokter', 250)->nullable();
            $table->string('nmppdssenior', 250)->nullable();
            $table->string('nmmiddleppds', 250)->nullable();
            $table->string('nmppdsjunior', 250)->nullable();
            $table->string('nmppdsmiddle2', 250)->nullable();
            $table->string('nmppdsjunior2', 250)->nullable();
            $table->string('nmradiografer', 250)->nullable();
            $table->string('nmexcutor', 250)->nullable();
            $table->string('klinisi', 250)->nullable();
            $table->string('klinis', 250)->nullable();
            $table->text('keterangan')->nullable();
            $table->string('asuransi', 25)->nullable();
            $table->string('urgensi', 25)->nullable();
            $table->string('diagnosa', 250)->nullable();
            $table->string('diagnosa2', 250)->nullable();
            $table->string('modality', 50)->nullable();
            $table->string('kd_spesimen', 255)->nullable();
            $table->string('nm_spesimen', 255)->nullable();
            $table->string('dlp', 50)->nullable();
            $table->timestamp('daftar')->nullable();
            $table->timestamp('foto')->nullable();
            $table->timestamp('tgldraft')->nullable();
            $table->timestamp('baca')->nullable();
            $table->timestamp('verifikasi')->nullable();
            $table->timestamp('export')->nullable();
            $table->timestamp('tgladendum')->nullable();
            $table->string('status', 150)->nullable();
            $table->string('spvsender', 150)->nullable();
            $table->string('created_by', 150)->nullable();
            $table->timestamp('created_at')->useCurrent();
            $table->timestamp('updated_at')->useCurrent();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('db_syncinsitu');
    }
};
