<?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('periksa', function (Blueprint $table) {
            $table->id();
            $table->timestamp('mulai')->nullable();
            $table->timestamp('akhir')->nullable();
            $table->string('orderid', 255)->nullable();
            $table->string('nofoto', 50)->nullable();
            $table->integer('noloket')->nullable();
            $table->string('noregister', 150)->nullable();
            $table->string('asalpasien', 250)->nullable();
            $table->string('nmrs', 150)->nullable();
            $table->integer('pasien_id')->nullable();
            $table->string('nmpasien', 200)->nullable();
            $table->string('jkpasien', 5)->nullable();
            $table->date('tgllahirpasien')->nullable();
            $table->string('tlppasien', 50)->nullable();
            $table->text('alamatpasien')->nullable();
            $table->string('reques', 150)->nullable();
            $table->string('usia', 25)->nullable();
            $table->string('ktp', 25)->nullable();
            $table->string('bpjs', 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('ppdsmiddle2')->nullable();
            $table->integer('ppdsjunior2')->nullable();
            $table->integer('analis')->nullable();
            $table->integer('excutor')->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('nmanalis', 250)->nullable();
            $table->string('nmexcutor', 250)->nullable();
            $table->string('klinisi', 250)->nullable();
            $table->text('klinis')->nullable();
            $table->integer('poli_id')->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('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('nmdrafter', 250)->nullable();
            $table->string('nmpembaca', 250)->nullable();
            $table->string('nmadendum', 250)->nullable();
            $table->string('filefoto', 150)->nullable();
            $table->string('status', 150)->nullable();
            $table->string('tandatangan', 150)->nullable();
            $table->string('pendaftar')->nullable();
            $table->string('nmpendaftar')->nullable();
            $table->integer('bhp_media')->nullable();
            $table->integer('bhp_potsputum')->nullable();
            $table->integer('bhp_poturine')->nullable();
            $table->integer('bhp_oshe')->nullable();
            $table->integer('bhp_obyekglass')->nullable();
            $table->integer('bhp_botolbd')->nullable();
            $table->integer('bhp_parafilm')->nullable();
            $table->integer('bhp_tips')->nullable();
            $table->integer('bhp_cottonswab')->nullable();
            $table->integer('bhp_antibiotiktambahan')->nullable();
            $table->string('id_esbl', 5)->nullable();
            $table->string('id_mrsa', 5)->nullable();
            $table->integer('rating')->nullable();
            $table->timestamp('created_at')->useCurrent();
            $table->timestamp('updated_at')->useCurrent();
        });
    }

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