Template
peserta-danuar
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class MsDoctor extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name"
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user that owns the doctor
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function msDoctorHealthService(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(MsDoctorHealthService::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
|
||||
public function trPatientVisit(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(TrPatientVisit::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class MsDoctorHealthService extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Get the user associated with the doctor_healthcare_service
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function msDoctor(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsDoctor::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user associated with the DoctorHealthService
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function msHealthcareService(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsHealthcareService::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class MsHealthcareService extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name",
|
||||
"code",
|
||||
"icon",
|
||||
"active",
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user associated with the healthcare_service
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function msHealthcareType(): HasOne
|
||||
{
|
||||
return $this->hasOne(healthcare_type::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user associated with the healthcare_service
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function refServiceType(): HasOne
|
||||
{
|
||||
return $this->hasOne(RefServiceType::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user that owns the HealthcareService
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function doctorHealthcareService(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(DoctorHealthcareService::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
|
||||
public function healthcareServiceSchedule(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(HealthcareServiceSchedule::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
|
||||
public function healthcareServiceShift(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(HealthcareServiceShift::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
|
||||
public function healthcareServiceVisitType(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(HealthcareServiceVisitType::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
|
||||
public function healthcareServicePaymentType(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(HealthcareServicePaymentType::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class HealthcareServicePaymentType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public function msHealthcareService(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsHealthcareService::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
public function refPaymentType(): HasOne
|
||||
{
|
||||
return $this->hasOne(RefPaymentType::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class HealthcareServiceSchedule extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"day_of_week",
|
||||
"available_start_time",
|
||||
"available_end_time",
|
||||
"active"
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user associated with the HealthcareServiceSchedule
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function msHealthcareService(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsHealthcareService::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class HealthcareServiceShift extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"shift_number",
|
||||
"quota",
|
||||
"available_end_time",
|
||||
"active"
|
||||
];
|
||||
|
||||
public function msHealthcareService(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsHealthcareService::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class HealthcareServiceVisitType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public function msHealthcareService(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsHealthcareService::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
public function refVisitType(): HasOne
|
||||
{
|
||||
return $this->hasOne(RefVisitType::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class MsKiosk extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name",
|
||||
"icon",
|
||||
"url",
|
||||
"active"
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user associated with the Kiosk
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function msHealthcareType(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsHealthcareType::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
public function refServiceType(): HasOne
|
||||
{
|
||||
return $this->hasOne(RefServiceType::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user that owns the Kiosk
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function msKioskSchedule(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(MsKioskSchedule::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MsKioskHealthcareService extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class MsKioskPaymentType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Get the user associated with the MsKioskVisitType
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function msKiosk(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsKiosk::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user associated with the MsKioskVisitType
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function refPaymentType(): HasOne
|
||||
{
|
||||
return $this->hasOne(RefPaymentType::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class MsKioskSchedule extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"day_of_week",
|
||||
"available_start_time",
|
||||
"available_end_time",
|
||||
"active"
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user associated with the KioskSchedule
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function msKiosk(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsKiosk::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class MsKioskVisitType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Get the user associated with the MsKioskVisitType
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function msKiosk(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsKiosk::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user associated with the MsKioskVisitType
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function refVisitType(): HasOne
|
||||
{
|
||||
return $this->hasOne(RefVisitType::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MsPatient extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name",
|
||||
"medical_record_number",
|
||||
"phone_number",
|
||||
"gender",
|
||||
"birth_date",
|
||||
"address",
|
||||
"active"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class MsPatientPaymentType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name",
|
||||
"number",
|
||||
"active",
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user associated with the MsPatientPaymentType
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function msPatient(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsPatient::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user associated with the MsPatientPaymentType
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function refPaymentType(): HasOne
|
||||
{
|
||||
return $this->hasOne(RefPaymentType::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class RefHealthcareType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name",
|
||||
"active"
|
||||
];
|
||||
|
||||
public function msHealthcareService(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(MsHealthcareService::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class RefPaymentType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name",
|
||||
"active"
|
||||
];
|
||||
|
||||
public function MsHealthcareServicePaymentType(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(MsHealthcareServicePaymentType::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class RefServiceType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name",
|
||||
"active"
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user that owns the ServiceType
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function msHealthcareService(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(MsHealthcareService::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RefVisitType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name",
|
||||
"active"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
|
||||
class TrPatientVisit extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"barcode",
|
||||
"registration_date",
|
||||
"service_date",
|
||||
"check_in_date",
|
||||
"check_in",
|
||||
"active",
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user associated with the patient_visit
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function MsDoctor(): HasOne
|
||||
{
|
||||
return $this->hasOne(MsDoctor::class, 'foreign_key', 'local_key');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user