<?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('jadwalperiksan', function (Blueprint $table) {
            $table->id();
            $table->timestamp('mulai')->nullable();
            $table->timestamp('akhir')->nullable();
            $table->string('nofoto', 50)->nullable();
            $table->integer('noloket')->nullable();
            $table->string('noregister', 150)->nullable();
            $table->string('ayah', 150)->nullable();
            $table->string('asalpasien', 250)->nullable();
            $table->string('nmrs', 150)->nullable();
            $table->integer('pasien_id')->nullable();
            $table->string('reques', 150)->nullable();
            $table->string('usia', 25)->nullable();
            $table->decimal('berat', $precision = 8, $scale = 2)->nullable();
            $table->integer('ruangan_id')->nullable();
            $table->string('ruangan', 250)->nullable();
            $table->integer('dokter_id')->nullable();
            $table->integer('ppdssenior')->nullable();
            $table->integer('middleppds')->nullable();
            $table->integer('ppdsjunior')->nullable();
            $table->integer('radiografer')->nullable();
            $table->integer('excutor')->nullable();
            $table->integer('poli_id')->nullable();
            $table->string('klinisi', 250)->nullable();
            $table->string('klinis', 250)->nullable();
            $table->text('keterangan')->nullable();
            $table->text('kesimpulan')->nullable();
            $table->string('asuransi', 25)->nullable();
            $table->string('urgensi', 25)->nullable();
            $table->integer('diagnosa')->nullable();
            $table->string('modality', 50)->nullable();
            $table->string('kilovolt', 50)->nullable();
            $table->string('mas', 25)->nullable();
            $table->string('dlp', 50)->nullable();
            $table->timestamp('daftar')->nullable();
            $table->timestamp('foto')->nullable();
            $table->timestamp('baca')->nullable();
            $table->timestamp('verifikasi')->nullable();
            $table->timestamp('export')->nullable();
            $table->string('filefoto', 150)->nullable();
            $table->string('status', 150)->nullable();
            $table->string('tandatangan', 150)->nullable();
            $table->integer('jenisfont')->nullable();
            $table->integer('jumlah')->nullable();
            $table->timestamp('created_at')->useCurrent();
            $table->timestamp('updated_at')->useCurrent();
        });
    }

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