initial commit
This commit is contained in:
1
database/.gitignore
vendored
Normal file
1
database/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.sqlite*
|
44
database/factories/UserFactory.php
Normal file
44
database/factories/UserFactory.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The current password being used by the factory.
|
||||
*/
|
||||
protected static ?string $password;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
32
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
32
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?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('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
};
|
@@ -0,0 +1,33 @@
|
||||
<?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('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
$table->string('token', 64)->unique();
|
||||
$table->text('abilities')->nullable();
|
||||
$table->timestamp('last_used_at')->nullable();
|
||||
$table->timestamp('expires_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?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('admins', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('admins');
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?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('telemed_pros', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('telemed_pros');
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?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('patients', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('patients');
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?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('doctors', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('doctors');
|
||||
}
|
||||
};
|
@@ -0,0 +1,35 @@
|
||||
<?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()
|
||||
{
|
||||
Schema::create('appointments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('telemed_pros_id')->nullable();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->timestamp('appointment_time');
|
||||
$table->timestamps();
|
||||
$table->foreign('telemed_pros_id')->references('id')->on('telemed_pros');
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
});
|
||||
Schema::table('telemed_pros', function (Blueprint $table) {
|
||||
$table->boolean('is_busy')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('appointments');
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->boolean('in_call')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('appointments', function (Blueprint $table) {
|
||||
$table->dropColumn('in_call');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->string('meeting_id')->after('appointment_time')->nullable(); // Assuming string type and placement after appointment_time
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('appointments', function (Blueprint $table) {
|
||||
$table->dropColumn('meeting_id');
|
||||
});
|
||||
}
|
||||
};
|
43
database/migrations/2024_01_03_214543_create_queue_table.php
Normal file
43
database/migrations/2024_01_03_214543_create_queue_table.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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('queue', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unsignedBigInteger('patient_id');
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
|
||||
$table->unsignedBigInteger('telemed_pros_id')->nullable();
|
||||
$table->foreign('telemed_pros_id')->references('id')->on('telemed_pros');
|
||||
|
||||
$table->integer('queue_number');
|
||||
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index(['patient_id']);
|
||||
$table->index(['telemed_pros_id']);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('queue');
|
||||
}
|
||||
};
|
@@ -0,0 +1,34 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->string('address')->nullable();
|
||||
$table->string('city')->nullable();
|
||||
$table->string('state')->nullable();
|
||||
$table->string('zip_code')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('patients', function (Blueprint $table) {
|
||||
$table->dropColumn('address');
|
||||
$table->dropColumn('city');
|
||||
$table->dropColumn('state');
|
||||
$table->dropColumn('zip_code');
|
||||
});
|
||||
}
|
||||
};
|
32
database/migrations/2024_01_04_000654_create_labs_table.php
Normal file
32
database/migrations/2024_01_04_000654_create_labs_table.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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('labs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('city')->nullable();
|
||||
$table->string('state')->nullable();
|
||||
$table->string('zip_code')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('labs');
|
||||
}
|
||||
};
|
@@ -0,0 +1,31 @@
|
||||
<?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('patient_labs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->unsignedBigInteger('lab_id')->nullable();
|
||||
$table->timestamps();
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->foreign('lab_id')->references('id')->on('labs');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('patient_labs');
|
||||
}
|
||||
};
|
@@ -0,0 +1,35 @@
|
||||
<?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('doctor_appointments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->unsignedBigInteger('doctor_id')->nullable();
|
||||
$table->unsignedBigInteger('appointment_id')->nullable();
|
||||
$table->timestamp('appointment_time');
|
||||
$table->string('meeting_id')->nullable();
|
||||
$table->timestamps();
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->foreign('doctor_id')->references('id')->on('doctors');
|
||||
$table->foreign('appointment_id')->references('id')->on('appointments');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('doctor_appointments');
|
||||
}
|
||||
};
|
@@ -0,0 +1,31 @@
|
||||
<?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('patient_tasks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->boolean('is_solved')->default(false);
|
||||
$table->timestamps();
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('patient_tasks');
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('doctor_appointments', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('telemed_pros_id')->nullable();
|
||||
$table->foreign('telemed_pros_id')->references('id')->on('telemed_pros');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('labs', function (Blueprint $table) {
|
||||
$table->string("lang")->nullable();
|
||||
$table->string("lat")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('doctors', function (Blueprint $table) {
|
||||
$table->string("designation")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('doctors', function (Blueprint $table) {
|
||||
$table->dropColumn("designation");
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->string('lat')->nullable();
|
||||
$table->string('long')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('patients', function (Blueprint $table) {
|
||||
$table->removeColumn('lat');
|
||||
$table->removeColumn('long');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,36 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->text("agent_call_token")->nullable();
|
||||
$table->text("patient_call_token")->nullable();
|
||||
});
|
||||
Schema::table('doctor_appointments', function (Blueprint $table) {
|
||||
$table->text("doctor_call_token")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('appointments', function (Blueprint $table) {
|
||||
$table->dropColumn("agent_call_token");
|
||||
$table->dropColumn("patient_call_token");
|
||||
});
|
||||
Schema::table('doctor_appointments', function (Blueprint $table) {
|
||||
$table->dropColumn("doctor_call_token");
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,36 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->text("lab_address")->nullable();
|
||||
$table->text("lab_distance")->nullable();
|
||||
$table->text("lab_contact_no")->nullable();
|
||||
$table->text("lab_lang")->nullable();
|
||||
$table->text("lab_lat")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('appointments', function (Blueprint $table) {
|
||||
$table->dropColumn("lab_address");
|
||||
$table->dropColumn("lab_distance");
|
||||
$table->dropColumn("lab_contact_no");
|
||||
$table->dropColumn("lab_lang");
|
||||
$table->dropColumn("lab_lat");
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->text("lab_name")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('appointments', function (Blueprint $table) {
|
||||
$table->dropColumn("lab_name");
|
||||
});
|
||||
}
|
||||
};
|
28
database/migrations/2024_01_10_201655_adding_newcolumen_.php
Normal file
28
database/migrations/2024_01_10_201655_adding_newcolumen_.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->text("video_token")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('appointments', function (Blueprint $table) {
|
||||
$table->dropColumn("video_token");
|
||||
});
|
||||
}
|
||||
};
|
28
database/migrations/2024_01_10_221826_adding_coumns.php
Normal file
28
database/migrations/2024_01_10_221826_adding_coumns.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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::table('doctor_appointments', function (Blueprint $table) {
|
||||
$table->date('appointment_date')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('doctor_appointments', function (Blueprint $table) {
|
||||
$table->dropColumn('appointment_date');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('doctor_appointments', function (Blueprint $table) {
|
||||
$table->string('appointment_time', 19)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->removeColumn("lab_address");
|
||||
$table->removeColumn("lab_distance");
|
||||
$table->removeColumn("lab_contact_no");
|
||||
$table->removeColumn("lab_lang");
|
||||
$table->removeColumn("lab_lat");
|
||||
$table->removeColumn("lab_name");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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::table('labs', function (Blueprint $table) {
|
||||
$table->text("distance")->nullable();
|
||||
$table->text("contact_no")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('labs', function (Blueprint $table) {
|
||||
$table->dropColumn("distance");
|
||||
$table->dropColumn("contact_no");
|
||||
});
|
||||
}
|
||||
};
|
28
database/migrations/2024_01_11_181408_adding__columns.php
Normal file
28
database/migrations/2024_01_11_181408_adding__columns.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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::table('labs', function (Blueprint $table) {
|
||||
$table->dateTime("booking_time")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('labs', function (Blueprint $table) {
|
||||
$table->dropColumn("booking_time");
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,29 @@
|
||||
<?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::table('labs', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('appointment_id')->nullable();
|
||||
$table->foreign('appointment_id')->references('id')->on('appointments');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('labs', function (Blueprint $table) {
|
||||
$table->dropColumn('appointment_id');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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::table('labs', function (Blueprint $table) {
|
||||
$table->date('slot_date')->nullable();
|
||||
$table->time('slot_time')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('labs', function (Blueprint $table) {
|
||||
$table->dropColumn('slot_date');
|
||||
$table->dropColumn('slot_time');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->string('dob')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('patients', function (Blueprint $table) {
|
||||
$table->dropColumn('dob');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('questions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('question')->nullable();
|
||||
$table->string('type')->nullable();
|
||||
$table->string('options')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
DB::table('questions')->insert(
|
||||
array(
|
||||
[
|
||||
'question' => 'Any Drug allergies',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'question' => 'Medications currently taking',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'question' => 'Current hormone replacement?',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'question' => 'Past hormone replacement therapy',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'question' => 'How much cigarettes or cigars you smoke per day',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'question' => 'How much alcoholic beverages you drink per week',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'question' => 'Heart disease',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'question' => 'Diabetes',
|
||||
'type' => 'text'
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('questions');
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?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('patient_answers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('patient_id');
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->unsignedBigInteger('question_id');
|
||||
$table->foreign('question_id')->references('id')->on('questions');
|
||||
$table->string('answer')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('patient_answers');
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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::table('labs', function (Blueprint $table) {
|
||||
$table->dropColumn('slot_time');
|
||||
});
|
||||
Schema::table('labs', function (Blueprint $table) {
|
||||
$table->string('slot_time')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('patient_answers', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('appointment_id')->nullable();
|
||||
$table->foreign('appointment_id')->references('id')->on('appointments');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->boolean('recording_switch')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->string('country')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('telemed_pros', function (Blueprint $table) {
|
||||
$table->boolean('recording_switch')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('telemed_pros', function (Blueprint $table) {
|
||||
$table->dropColumn('recording_switch');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,37 @@
|
||||
<?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('question_groups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title')->nullable();
|
||||
$table->tinyInteger('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
Schema::table('questions', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('group_id')->nullable();
|
||||
$table->foreign('group_id')->references('id')->on('questions');
|
||||
$table->text('options')->nullable()->change();
|
||||
});
|
||||
Schema::table('patient_answers', function (Blueprint $table) {
|
||||
$table->longText('answer')->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('question_groups');
|
||||
}
|
||||
};
|
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
require __DIR__ . '/questionires.php';
|
||||
$date = Carbon::now()->format('Y-m-d H:i:s');
|
||||
foreach ($questionArray as $key => $value) {
|
||||
//insert question groups here with $key
|
||||
|
||||
$questionGroups = DB::table('question_groups')->insertGetId(
|
||||
array(
|
||||
'title' => $key,
|
||||
"created_at" => $date,
|
||||
"updated_at" => $date
|
||||
)
|
||||
);
|
||||
$type = '';
|
||||
$options = [];
|
||||
foreach ($value as $question => $type) {
|
||||
//insert question title here $question
|
||||
|
||||
if (is_array($type)) {
|
||||
//check if type is radio then add question options
|
||||
foreach ($type as $typeR => $options) {
|
||||
//insert option with type here
|
||||
$type = $typeR;
|
||||
$options = $options;
|
||||
}
|
||||
} else {
|
||||
//insert type onlye without options here
|
||||
$type = $type;
|
||||
}
|
||||
$questions = DB::table('questions')->insert(
|
||||
array(
|
||||
'question' => $question,
|
||||
'type' => $type,
|
||||
'options' => serialize($options),
|
||||
"created_at" => $date,
|
||||
"updated_at" => $date,
|
||||
"group_id" => $questionGroups
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,31 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->dropColumn("name");
|
||||
});
|
||||
Schema::table('patients', function (Blueprint $table) {
|
||||
$table->string("first_name")->nullable();
|
||||
$table->string("last_name")->nullable();
|
||||
$table->string("phone_no")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
}
|
||||
};
|
@@ -0,0 +1,146 @@
|
||||
<?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('medical_history_answer', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->text('question_key')->nullable();
|
||||
$table->unsignedBigInteger('patient_id');
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->string('type')->nullable();
|
||||
$table->text('answer')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
$json = '[
|
||||
{
|
||||
"KEY": "why_interested_hrt",
|
||||
"Value": "",
|
||||
"TYPE": "text"
|
||||
},
|
||||
{
|
||||
"KEY": "goal_loss_weight",
|
||||
"Value": "yes, no",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "what_biological_sex",
|
||||
"Value": "male, female",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "3_years_physical_test",
|
||||
"Value": "yes, no",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "medical_problems",
|
||||
"Value": "yes, no",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "have_prostate_cancer",
|
||||
"Value": "yes, no",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "what_height",
|
||||
"Value": "5 ft 1 in, 5 ft 2 in",
|
||||
"TYPE": "dropdown"
|
||||
},
|
||||
{
|
||||
"KEY": "whight",
|
||||
"Value": "",
|
||||
"TYPE": "text"
|
||||
},
|
||||
{
|
||||
"KEY": "birthdate",
|
||||
"Value": "12/03/1991",
|
||||
"TYPE": "date"
|
||||
},
|
||||
{
|
||||
"KEY": "past_harmone_treatments",
|
||||
"Value": "thyroid_medication, testosterone_treatment, estrogen_blocker, hgh, ipamoreline, colomipheine, hcg, other, none",
|
||||
"TYPE": "checkbox"
|
||||
},
|
||||
{
|
||||
"KEY": "take_medications",
|
||||
"Value": "yes, no",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "have_medications_allegies",
|
||||
"Value": "yes, no",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "plan_children",
|
||||
"Value": "yes, no",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "partner_pregnant",
|
||||
"Value": "yes, no, not applicab_e",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "experience_ed",
|
||||
"Value": "never, almost_never, occasionally, almost_always, always",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "thyroid_disorders",
|
||||
"Value": "yes, no",
|
||||
"TYPE": "radio"
|
||||
},
|
||||
{
|
||||
"KEY": "family_history",
|
||||
"Value": "drug_alcohol, cancer, heart_disease, thyroid_disease, low_testosterone, none",
|
||||
"TYPE": "checkbox"
|
||||
},
|
||||
{
|
||||
"KEY": "patient_concent",
|
||||
"Value": "",
|
||||
"TYPE": "checkbox"
|
||||
},
|
||||
{
|
||||
"KEY": "appointment_cancel",
|
||||
"Value": "",
|
||||
"TYPE": "checkbox"
|
||||
},
|
||||
{
|
||||
"KEY": "medicare_disclaimer",
|
||||
"Value": "",
|
||||
"TYPE": "checkbox"
|
||||
},
|
||||
{
|
||||
"KEY": "telehealth_concent",
|
||||
"Value": "",
|
||||
"TYPE": "checkbox"
|
||||
},
|
||||
{
|
||||
"KEY": "secondary_contact",
|
||||
"Value": "",
|
||||
"TYPE": "checkbox"
|
||||
}
|
||||
]';
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('medical_history_answer');
|
||||
}
|
||||
};
|
56
database/migrations/2024_01_25_220746_create_carts_table.php
Normal file
56
database/migrations/2024_01_25_220746_create_carts_table.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?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('carts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->date('date_of_birth')->nullable();
|
||||
|
||||
|
||||
$table->string('shipping_address1')->nullable();
|
||||
$table->string('shipping_address2')->nullable();
|
||||
$table->string('shipping_city')->nullable();
|
||||
$table->string('shipping_state')->nullable();
|
||||
$table->string('shipping_zipcode')->nullable();
|
||||
$table->string('shipping_country')->nullable();
|
||||
|
||||
$table->string('billing_address1')->nullable();
|
||||
$table->string('billing_address2')->nullable();
|
||||
$table->string('billing_city')->nullable();
|
||||
$table->string('billing_state')->nullable();
|
||||
$table->string('billing_zipcode')->nullable();
|
||||
$table->string('billing_country')->nullable();
|
||||
$table->decimal('shipping_amount', 8, 2)->default(0);
|
||||
|
||||
$table->decimal('total_amount', 8, 2);
|
||||
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('carts');
|
||||
}
|
||||
};
|
@@ -0,0 +1,34 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->dropColumn('appointment_time');
|
||||
});
|
||||
Schema::table('appointments', function (Blueprint $table) {
|
||||
$table->time('appointment_time')->nullable();
|
||||
$table->date('appointment_date')->nullable();
|
||||
$table->string('patient_email')->nullable();
|
||||
$table->string('patient_name')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('appointment', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
26
database/migrations/2024_01_31_214211_adding_timenn.php
Normal file
26
database/migrations/2024_01_31_214211_adding_timenn.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->time('timezone')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,29 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->dropColumn('timezone');
|
||||
});
|
||||
Schema::table('appointments', function (Blueprint $table) {
|
||||
$table->string('timezone')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->string('shipping_address')->nullable();
|
||||
$table->string('shipping_city')->nullable();
|
||||
$table->string('shipping_state')->nullable();
|
||||
$table->string('shipping_country')->nullable();
|
||||
$table->string('shipping_zipcode')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->longText('analytics')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('appointments', function (Blueprint $table) {
|
||||
$table->dropColumn('analytics');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->string('timezone')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('patients', function (Blueprint $table) {
|
||||
$table->dropColumn('timezone');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('telemed_pros', function (Blueprint $table) {
|
||||
$table->boolean('ai_switch')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('telemed_pros', function (Blueprint $table) {
|
||||
$table->dropColumn('ai_switch');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,34 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->string('gender')->nullable();
|
||||
$table->string('marital_status')->nullable();
|
||||
$table->string('height')->nullable();
|
||||
$table->string('weight')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('patients', function (Blueprint $table) {
|
||||
$table->dropColumn('gender');
|
||||
$table->dropColumn('marital_status');
|
||||
$table->dropColumn('height');
|
||||
$table->dropColumn('weight');
|
||||
});
|
||||
}
|
||||
};
|
35
database/migrations/2024_03_13_212335_adding_plans_table.php
Normal file
35
database/migrations/2024_03_13_212335_adding_plans_table.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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('plans', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('plan_name')->nullable();
|
||||
$table->decimal('plan_amount', 8, 2)->nullable();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->unsignedBigInteger('appointment_id')->nullable();
|
||||
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->foreign('appointment_id')->references('id')->on('appointments');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('plans');
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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('patient_reg_activity', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('activity')->nullable();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('plans');
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('patient_reg_activity', function (Blueprint $table) {
|
||||
$table->boolean('email_sent')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('patients', function (Blueprint $table) {
|
||||
$table->string('profile_picture')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('patients', function (Blueprint $table) {
|
||||
$table->dropColumn('profile_picture')->nullable();
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,66 @@
|
||||
<?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('profile_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('status')->nullable();
|
||||
$table->string('icon')->nullable(); // Allow for optional icons
|
||||
$table->softDeletes(); // For soft deletion
|
||||
$table->timestamps();
|
||||
});
|
||||
Schema::create('profile_groups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('category_id')->nullable(); // Foreign key
|
||||
$table->string('group_name')->nullable();
|
||||
$table->text('group_desc')->nullable();
|
||||
$table->string('group_status')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('category_id')->references('id')->on('profile_categories');
|
||||
});
|
||||
Schema::create('profile_questions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('group_id')->nullable(); // Foreign key
|
||||
$table->text('question')->nullable();
|
||||
$table->string('type')->nullable(); // e.g., 'text', 'multiple_choice', etc.
|
||||
$table->string('status')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('group_id')->references('id')->on('profile_groups');
|
||||
});
|
||||
Schema::create('profile_answers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('category_id')->nullable();
|
||||
$table->unsignedBigInteger('group_id')->nullable();
|
||||
$table->text('answer')->nullable();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->unsignedBigInteger('question_id')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
// Foreign Key Constraints
|
||||
$table->foreign('category_id')->references('id')->on('profile_categories');
|
||||
$table->foreign('group_id')->references('id')->on('profile_groups');
|
||||
$table->foreign('patient_id')->references('id')->on('patients'); // Assuming you have a 'patients' table
|
||||
$table->foreign('question_id')->references('id')->on('questions');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('profile_categories');
|
||||
}
|
||||
};
|
76
database/migrations/2024_03_22_203406_delete_tabel.php
Normal file
76
database/migrations/2024_03_22_203406_delete_tabel.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?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::dropIfExists('profile_answers');
|
||||
Schema::dropIfExists('profile_questions');
|
||||
Schema::dropIfExists('profile_groups');
|
||||
Schema::dropIfExists('profile_categories');
|
||||
|
||||
|
||||
Schema::create('profile_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('status')->nullable();
|
||||
$table->string('icon')->nullable(); // Allow for optional icons
|
||||
$table->softDeletes(); // For soft deletion
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('profile_questions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('category_id')->nullable();
|
||||
$table->foreign('category_id')->references('id')->on('profile_categories');
|
||||
$table->text('question')->nullable();
|
||||
$table->string('question_type')->nullable();
|
||||
$table->string('question_options')->nullable();
|
||||
});
|
||||
Schema::create('profile_sub_questions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('category_id')->nullable();
|
||||
$table->foreign('category_id')->references('id')->on('profile_categories');
|
||||
$table->unsignedBigInteger('question_id')->nullable();
|
||||
$table->foreign('question_id')->references('id')->on('profile_questions');
|
||||
$table->text('question')->nullable();
|
||||
$table->unsignedBigInteger('parent_sub_question_id')->nullable();
|
||||
$table->foreign('parent_sub_question_id')->references('id')->on('profile_sub_questions');
|
||||
$table->string('sub_question_type')->nullable();
|
||||
$table->string('sub_question_options')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('profile_answers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('category_id')->nullable();
|
||||
$table->foreign('category_id')->references('id')->on('profile_categories');
|
||||
$table->text('answer')->nullable();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->unsignedBigInteger('question_id')->nullable();
|
||||
$table->foreign('question_id')->references('id')->on('questions');
|
||||
$table->unsignedBigInteger('sub_question_id')->nullable();
|
||||
$table->foreign('sub_question_id')->references('id')->on('profile_sub_questions');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
26
database/migrations/2024_03_26_183955_adding_link.php
Normal file
26
database/migrations/2024_03_26_183955_adding_link.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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::table('profile_categories', function (Blueprint $table) {
|
||||
$table->string('category_link')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('profile_questions', function (Blueprint $table) {
|
||||
$table->text('question_options')->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('profile_questions', function (Blueprint $table) {
|
||||
$table->string('question_options', 255)->change(); // Assuming the original data type was varchar(255)
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('profile_questions', function (Blueprint $table) {
|
||||
$table->text('question_type')->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('profile_questions', function (Blueprint $table) {
|
||||
$table->string('question_type', 255)->change(); // Assuming the original data type was varchar(255)
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,27 @@
|
||||
<?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::table('profile_sub_questions', function (Blueprint $table) {
|
||||
$table->text('sub_question_type')->change();
|
||||
$table->text('sub_question_options')->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,38 @@
|
||||
<?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::table('profile_questions', function ($table) {
|
||||
$table->dropForeign('profile_questions_category_id_foreign');
|
||||
});
|
||||
Schema::table('profile_questions', function ($table) {
|
||||
$table->dropColumn('category_id');
|
||||
}); */
|
||||
Schema::create('profile_category_question', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('category_id');
|
||||
$table->unsignedBigInteger('question_id');
|
||||
|
||||
$table->foreign('category_id')->references('id')->on('profile_categories');
|
||||
$table->foreign('question_id')->references('id')->on('profile_questions');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('profile_category_question');
|
||||
}
|
||||
};
|
@@ -0,0 +1,35 @@
|
||||
<?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::dropIfExists('profile_answers');
|
||||
Schema::create('profile_answers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->text('answer')->nullable();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->unsignedBigInteger('question_category_id')->nullable();
|
||||
$table->foreign('question_category_id')->references('id')->on('profile_category_question');
|
||||
$table->unsignedBigInteger('sub_question_id')->nullable();
|
||||
$table->foreign('sub_question_id')->references('id')->on('profile_sub_questions');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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('question_builder', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('key');
|
||||
$table->text('value');
|
||||
$table->unsignedBigInteger('customer_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('question_builder');
|
||||
}
|
||||
};
|
31
database/migrations/2024_04_04_180801_adding_notes_te.php
Normal file
31
database/migrations/2024_04_04_180801_adding_notes_te.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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('patient_notes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->text('note')->nullable();
|
||||
$table->text('note_type')->nullable();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('appointments', function (Blueprint $table) {
|
||||
$table->text('start_time')->nullable();
|
||||
$table->text('end_time')->nullable();
|
||||
$table->text('duration')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,47 @@
|
||||
<?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('prescriptions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('brand')->nullable();
|
||||
$table->text('from')->nullable();
|
||||
$table->string('quantity')->nullable();
|
||||
$table->string('direction_quantity')->nullable();
|
||||
$table->string('refill_quantity')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('patient_prescription', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->unsignedBigInteger('prescription_id')->nullable();
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->foreign('prescription_id')->references('id')->on('prescriptions');
|
||||
$table->string('direction_one')->nullable();
|
||||
$table->text('direction_two')->nullable();
|
||||
$table->text('dont_substitute')->nullable();
|
||||
$table->text('comments')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('prescriptions', function (Blueprint $table) {
|
||||
$table->string('dosage')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('prescriptions', function (Blueprint $table) {
|
||||
$table->removeColumn('dosage');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,38 @@
|
||||
<?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::table('patient_prescription', function (Blueprint $table) {
|
||||
$table->string('brand')->nullable();
|
||||
$table->string('from')->nullable();
|
||||
$table->string('quantity')->nullable();
|
||||
$table->string('direction_quantity')->nullable();
|
||||
$table->string('refill_quantity')->nullable();
|
||||
$table->string('dosage')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('patient_prescription', function (Blueprint $table) {
|
||||
$table->removeColumn('brand');
|
||||
$table->removeColumn('from');
|
||||
$table->removeColumn('quantity');
|
||||
$table->removeColumn('direction_quantity');
|
||||
$table->removeColumn('refill_quantity');
|
||||
$table->removeColumn('dosage');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,27 @@
|
||||
<?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::table('patient_prescription', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('appointment_id')->nullable();
|
||||
$table->foreign('appointment_id')->references('id')->on('appointments');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,27 @@
|
||||
<?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::table('patient_notes', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('appointment_id')->nullable();
|
||||
$table->foreign('appointment_id')->references('id')->on('appointments');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('patient_prescription', function (Blueprint $table) {
|
||||
$table->string('status')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,27 @@
|
||||
<?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::table('patient_notes', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('telemed_pros_id')->nullable();
|
||||
$table->foreign('telemed_pros_id')->references('id')->on('telemed_pros');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('carts', function (Blueprint $table) {
|
||||
$table->string('status')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,29 @@
|
||||
<?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('lab_kit', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->integer('amount')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('lab_kit');
|
||||
}
|
||||
};
|
@@ -0,0 +1,27 @@
|
||||
<?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::table('carts', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('lab_kit_id')->nullable();
|
||||
$table->foreign('lab_kit_id')->references('id')->on('lab_kit');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,28 @@
|
||||
<?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::table('question_builder', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('profile_category_id')->nullable();
|
||||
$table->foreign('profile_category_id')->references('id')->on('profile_categories');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?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::table('telemed_pros', function ($table) {
|
||||
$table->integer('status')->nullable();
|
||||
$table->string('practice_state')->nullable();
|
||||
$table->string('phone_number')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('telemed_pros', function ($table) {
|
||||
$table->dropColumn('status');
|
||||
$table->dropColumn('practice_state');
|
||||
$table->dropColumn('phone_number');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,40 @@
|
||||
<?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::table('telemed_pros', function ($table) {
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('gender')->nullable();
|
||||
$table->string('specialty')->nullable();
|
||||
$table->string('home_address')->nullable();
|
||||
$table->string('medical_license_number')->nullable();
|
||||
$table->string('years_of_experience')->nullable();
|
||||
$table->string('email_verification')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('telemed_pros', function ($table) {
|
||||
$table->dropColumn('first_name');
|
||||
$table->dropColumn('gender');
|
||||
$table->dropColumn('specialty');
|
||||
$table->dropColumn('home_address');
|
||||
$table->dropColumn('medical_license_number');
|
||||
$table->dropColumn('years_of_experience');
|
||||
$table->dropColumn('email_verification');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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::table('telemed_pros', function ($table) {
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('city')->nullable();
|
||||
$table->string('state')->nullable();
|
||||
$table->string('zip_code')->nullable();
|
||||
});
|
||||
}
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('telemed_pros', function ($table) {
|
||||
$table->dropColumn('last_name');
|
||||
$table->dropColumn('city');
|
||||
$table->dropColumn('state');
|
||||
$table->dropColumn('zip_code');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?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('license_numbers', function ($table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('provider_id')->nullable();
|
||||
$table->foreign('provider_id')->references('id')->on('telemed_pros');
|
||||
$table->string('license_number')->nullable();
|
||||
$table->string('state')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('license_numbers');
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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::table('telemed_pros', function ($table) {
|
||||
$table->string('availability_from')->nullable();
|
||||
$table->string('availability_to')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('telemed_pros', function ($table) {
|
||||
$table->dropColumn('availability_from');
|
||||
$table->dropColumn('availability_to');
|
||||
});
|
||||
}
|
||||
};
|
@@ -0,0 +1,33 @@
|
||||
<?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('plans_v1', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title')->nullable();
|
||||
$table->string('currency')->nullable();
|
||||
$table->decimal('price', 8, 2)->nullable();
|
||||
$table->string('list_one_title')->nullable();
|
||||
$table->string('list_two_title')->nullable();
|
||||
$table->string('list_sub_title')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('plans_v1');
|
||||
}
|
||||
};
|
32
database/migrations/2024_05_17_212028_create_plans_table.php
Normal file
32
database/migrations/2024_05_17_212028_create_plans_table.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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('patient_plan', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('patient_id')->nullable();
|
||||
$table->unsignedBigInteger('plan_id')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('patient_id')->references('id')->on('patients');
|
||||
$table->foreign('plan_id')->references('id')->on('plans_v1');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('patient_plan');
|
||||
}
|
||||
};
|
@@ -0,0 +1,26 @@
|
||||
<?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::table('plans_v1', function (Blueprint $table) {
|
||||
$table->string('image_url')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,29 @@
|
||||
<?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('settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('plan_main_title');
|
||||
$table->text('plan_description');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('settings');
|
||||
}
|
||||
};
|
29
database/migrations/2024_05_18_185127_add_column_setting.php
Normal file
29
database/migrations/2024_05_18_185127_add_column_setting.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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::table('settings', function (Blueprint $table) {
|
||||
$table->text('plan_description_pargraph')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn('plan_description_pargraph');
|
||||
});
|
||||
|
||||
}
|
||||
};
|
26
database/migrations/2024_05_18_230051_adding_logo_in.php
Normal file
26
database/migrations/2024_05_18_230051_adding_logo_in.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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::table('settings', function (Blueprint $table) {
|
||||
$table->text('logo')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
28
database/migrations/2024_05_19_003512_settings.php
Normal file
28
database/migrations/2024_05_19_003512_settings.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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::table('settings', function (Blueprint $table) {
|
||||
$table->text('footer_text')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn('footer_text');
|
||||
});
|
||||
}
|
||||
};
|
30
database/migrations/2024_05_19_160454_settings.php
Normal file
30
database/migrations/2024_05_19_160454_settings.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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::table('settings', function (Blueprint $table) {
|
||||
$table->text('favicon')->nullable();
|
||||
$table->text('header_title')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn('favicon');
|
||||
$table->dropColumn('header_title');
|
||||
});
|
||||
}
|
||||
};
|
26
database/migrations/2024_05_20_154307_adding_logo_in.php
Normal file
26
database/migrations/2024_05_20_154307_adding_logo_in.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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::table('plans_v1', function (Blueprint $table) {
|
||||
$table->string('slug')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
26
database/migrations/2024_05_20_170812_adding_logo_in.php
Normal file
26
database/migrations/2024_05_20_170812_adding_logo_in.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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::table('plans_v1', function (Blueprint $table) {
|
||||
$table->string('domain')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
29
database/migrations/2024_05_20_172105_settings.php
Normal file
29
database/migrations/2024_05_20_172105_settings.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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::table('settings', function (Blueprint $table) {
|
||||
$table->text('domain_name')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn('domain_name');
|
||||
|
||||
});
|
||||
}
|
||||
};
|
29
database/migrations/2024_05_22_191606_adding_logo_in.php
Normal file
29
database/migrations/2024_05_22_191606_adding_logo_in.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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::table('plans_v1', function (Blueprint $table) {
|
||||
|
||||
$table->text('list_one_title')->change();
|
||||
$table->text('list_two_title')->change();
|
||||
$table->text('list_sub_title')->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -0,0 +1,32 @@
|
||||
<?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('medication_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('category_name');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::table('plans_v1', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('medication_category_id')->nullable();
|
||||
$table->foreign('medication_category_id')->references('id')->on('medication_categories')->onDelete('set null');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
}
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user