Dr-Panel/database/migrations/2026_03_17_000001_create_pa...

61 lines
2.7 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('patients', function (Blueprint $table) {
$table->id();
$table->string('icno', 11)->index();
$table->string('first_name', 50)->nullable();
$table->string('last_name', 50)->nullable();
$table->string('father_name', 50)->nullable();
$table->string('gender', 50)->nullable();
$table->string('birth_date', 50)->nullable();
$table->integer('age')->nullable();
$table->string('marital_status', 50)->nullable();
$table->string('education', 50)->nullable();
$table->string('job', 50)->nullable();
$table->string('hand_phone', 50)->nullable();
$table->string('home_phone', 50)->nullable();
$table->string('work_phone', 50)->nullable();
$table->string('other_phone', 50)->nullable();
$table->mediumText('home_address')->nullable();
$table->mediumText('work_address')->nullable();
$table->string('refered_by', 50)->nullable();
$table->mediumText('referal_reason')->nullable();
$table->string('doc_id', 50)->nullable();
$table->string('insurance', 50)->nullable();
$table->string('insurance_no', 50)->nullable();
$table->integer('blood_pressure')->nullable();
$table->integer('blood_sugar')->nullable();
$table->string('current_illness_1', 50)->nullable();
$table->string('current_illness_2', 50)->nullable();
$table->string('is_undercare', 50)->nullable();
$table->string('undercare_reason', 50)->nullable();
$table->string('is_usingdrug', 50)->nullable();
$table->string('underdrug_reason', 50)->nullable();
$table->string('has_alergyto', 50)->nullable();
$table->string('alergy_reason', 50)->nullable();
$table->string('description', 50)->nullable();
$table->boolean('has_surgery_appointment')->default(false);
$table->mediumText('surgery_before')->nullable();
$table->mediumText('sergery_after')->nullable();
$table->mediumText('photos_before')->nullable();
$table->mediumText('photos_after')->nullable();
$table->mediumText('videos')->nullable();
$table->mediumText('audio_files')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('patients');
}
};