feat: initialize Dr-Panel project with patient file number support

This commit is contained in:
SajjadMahmoody
2026-05-06 02:18:23 +03:30
parent f8f174690a
commit 8b84d1780f
460 changed files with 113960 additions and 1 deletions
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\Doctor;
use Illuminate\Auth\Access\HandlesAuthorization;
class DoctorPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Doctor');
}
public function view(AuthUser $authUser, Doctor $doctor): bool
{
return $authUser->can('View:Doctor');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Doctor');
}
public function update(AuthUser $authUser, Doctor $doctor): bool
{
return $authUser->can('Update:Doctor');
}
public function delete(AuthUser $authUser, Doctor $doctor): bool
{
return $authUser->can('Delete:Doctor');
}
public function restore(AuthUser $authUser, Doctor $doctor): bool
{
return $authUser->can('Restore:Doctor');
}
public function forceDelete(AuthUser $authUser, Doctor $doctor): bool
{
return $authUser->can('ForceDelete:Doctor');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Doctor');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Doctor');
}
public function replicate(AuthUser $authUser, Doctor $doctor): bool
{
return $authUser->can('Replicate:Doctor');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Doctor');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\LabTest;
use Illuminate\Auth\Access\HandlesAuthorization;
class LabTestPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:LabTest');
}
public function view(AuthUser $authUser, LabTest $labTest): bool
{
return $authUser->can('View:LabTest');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:LabTest');
}
public function update(AuthUser $authUser, LabTest $labTest): bool
{
return $authUser->can('Update:LabTest');
}
public function delete(AuthUser $authUser, LabTest $labTest): bool
{
return $authUser->can('Delete:LabTest');
}
public function restore(AuthUser $authUser, LabTest $labTest): bool
{
return $authUser->can('Restore:LabTest');
}
public function forceDelete(AuthUser $authUser, LabTest $labTest): bool
{
return $authUser->can('ForceDelete:LabTest');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:LabTest');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:LabTest');
}
public function replicate(AuthUser $authUser, LabTest $labTest): bool
{
return $authUser->can('Replicate:LabTest');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:LabTest');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\Medication;
use Illuminate\Auth\Access\HandlesAuthorization;
class MedicationPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Medication');
}
public function view(AuthUser $authUser, Medication $medication): bool
{
return $authUser->can('View:Medication');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Medication');
}
public function update(AuthUser $authUser, Medication $medication): bool
{
return $authUser->can('Update:Medication');
}
public function delete(AuthUser $authUser, Medication $medication): bool
{
return $authUser->can('Delete:Medication');
}
public function restore(AuthUser $authUser, Medication $medication): bool
{
return $authUser->can('Restore:Medication');
}
public function forceDelete(AuthUser $authUser, Medication $medication): bool
{
return $authUser->can('ForceDelete:Medication');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Medication');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Medication');
}
public function replicate(AuthUser $authUser, Medication $medication): bool
{
return $authUser->can('Replicate:Medication');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Medication');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\OsurgInitial;
use Illuminate\Auth\Access\HandlesAuthorization;
class OsurgInitialPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:OsurgInitial');
}
public function view(AuthUser $authUser, OsurgInitial $osurgInitial): bool
{
return $authUser->can('View:OsurgInitial');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:OsurgInitial');
}
public function update(AuthUser $authUser, OsurgInitial $osurgInitial): bool
{
return $authUser->can('Update:OsurgInitial');
}
public function delete(AuthUser $authUser, OsurgInitial $osurgInitial): bool
{
return $authUser->can('Delete:OsurgInitial');
}
public function restore(AuthUser $authUser, OsurgInitial $osurgInitial): bool
{
return $authUser->can('Restore:OsurgInitial');
}
public function forceDelete(AuthUser $authUser, OsurgInitial $osurgInitial): bool
{
return $authUser->can('ForceDelete:OsurgInitial');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:OsurgInitial');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:OsurgInitial');
}
public function replicate(AuthUser $authUser, OsurgInitial $osurgInitial): bool
{
return $authUser->can('Replicate:OsurgInitial');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:OsurgInitial');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\PatientIllness;
use Illuminate\Auth\Access\HandlesAuthorization;
class PatientIllnessPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:PatientIllness');
}
public function view(AuthUser $authUser, PatientIllness $patientIllness): bool
{
return $authUser->can('View:PatientIllness');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:PatientIllness');
}
public function update(AuthUser $authUser, PatientIllness $patientIllness): bool
{
return $authUser->can('Update:PatientIllness');
}
public function delete(AuthUser $authUser, PatientIllness $patientIllness): bool
{
return $authUser->can('Delete:PatientIllness');
}
public function restore(AuthUser $authUser, PatientIllness $patientIllness): bool
{
return $authUser->can('Restore:PatientIllness');
}
public function forceDelete(AuthUser $authUser, PatientIllness $patientIllness): bool
{
return $authUser->can('ForceDelete:PatientIllness');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:PatientIllness');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:PatientIllness');
}
public function replicate(AuthUser $authUser, PatientIllness $patientIllness): bool
{
return $authUser->can('Replicate:PatientIllness');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:PatientIllness');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\Patient;
use Illuminate\Auth\Access\HandlesAuthorization;
class PatientPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Patient');
}
public function view(AuthUser $authUser, Patient $patient): bool
{
return $authUser->can('View:Patient');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Patient');
}
public function update(AuthUser $authUser, Patient $patient): bool
{
return $authUser->can('Update:Patient');
}
public function delete(AuthUser $authUser, Patient $patient): bool
{
return $authUser->can('Delete:Patient');
}
public function restore(AuthUser $authUser, Patient $patient): bool
{
return $authUser->can('Restore:Patient');
}
public function forceDelete(AuthUser $authUser, Patient $patient): bool
{
return $authUser->can('ForceDelete:Patient');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Patient');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Patient');
}
public function replicate(AuthUser $authUser, Patient $patient): bool
{
return $authUser->can('Replicate:Patient');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Patient');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\PaymentType;
use Illuminate\Auth\Access\HandlesAuthorization;
class PaymentTypePolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:PaymentType');
}
public function view(AuthUser $authUser, PaymentType $paymentType): bool
{
return $authUser->can('View:PaymentType');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:PaymentType');
}
public function update(AuthUser $authUser, PaymentType $paymentType): bool
{
return $authUser->can('Update:PaymentType');
}
public function delete(AuthUser $authUser, PaymentType $paymentType): bool
{
return $authUser->can('Delete:PaymentType');
}
public function restore(AuthUser $authUser, PaymentType $paymentType): bool
{
return $authUser->can('Restore:PaymentType');
}
public function forceDelete(AuthUser $authUser, PaymentType $paymentType): bool
{
return $authUser->can('ForceDelete:PaymentType');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:PaymentType');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:PaymentType');
}
public function replicate(AuthUser $authUser, PaymentType $paymentType): bool
{
return $authUser->can('Replicate:PaymentType');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:PaymentType');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\Prescription;
use Illuminate\Auth\Access\HandlesAuthorization;
class PrescriptionPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Prescription');
}
public function view(AuthUser $authUser, Prescription $prescription): bool
{
return $authUser->can('View:Prescription');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Prescription');
}
public function update(AuthUser $authUser, Prescription $prescription): bool
{
return $authUser->can('Update:Prescription');
}
public function delete(AuthUser $authUser, Prescription $prescription): bool
{
return $authUser->can('Delete:Prescription');
}
public function restore(AuthUser $authUser, Prescription $prescription): bool
{
return $authUser->can('Restore:Prescription');
}
public function forceDelete(AuthUser $authUser, Prescription $prescription): bool
{
return $authUser->can('ForceDelete:Prescription');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Prescription');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Prescription');
}
public function replicate(AuthUser $authUser, Prescription $prescription): bool
{
return $authUser->can('Replicate:Prescription');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Prescription');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use Spatie\Permission\Models\Role;
use Illuminate\Auth\Access\HandlesAuthorization;
class RolePolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Role');
}
public function view(AuthUser $authUser, Role $role): bool
{
return $authUser->can('View:Role');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Role');
}
public function update(AuthUser $authUser, Role $role): bool
{
return $authUser->can('Update:Role');
}
public function delete(AuthUser $authUser, Role $role): bool
{
return $authUser->can('Delete:Role');
}
public function restore(AuthUser $authUser, Role $role): bool
{
return $authUser->can('Restore:Role');
}
public function forceDelete(AuthUser $authUser, Role $role): bool
{
return $authUser->can('ForceDelete:Role');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Role');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Role');
}
public function replicate(AuthUser $authUser, Role $role): bool
{
return $authUser->can('Replicate:Role');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Role');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\SurgeryAppointment;
use Illuminate\Auth\Access\HandlesAuthorization;
class SurgeryAppointmentPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:SurgeryAppointment');
}
public function view(AuthUser $authUser, SurgeryAppointment $surgeryAppointment): bool
{
return $authUser->can('View:SurgeryAppointment');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:SurgeryAppointment');
}
public function update(AuthUser $authUser, SurgeryAppointment $surgeryAppointment): bool
{
return $authUser->can('Update:SurgeryAppointment');
}
public function delete(AuthUser $authUser, SurgeryAppointment $surgeryAppointment): bool
{
return $authUser->can('Delete:SurgeryAppointment');
}
public function restore(AuthUser $authUser, SurgeryAppointment $surgeryAppointment): bool
{
return $authUser->can('Restore:SurgeryAppointment');
}
public function forceDelete(AuthUser $authUser, SurgeryAppointment $surgeryAppointment): bool
{
return $authUser->can('ForceDelete:SurgeryAppointment');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:SurgeryAppointment');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:SurgeryAppointment');
}
public function replicate(AuthUser $authUser, SurgeryAppointment $surgeryAppointment): bool
{
return $authUser->can('Replicate:SurgeryAppointment');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:SurgeryAppointment');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\SurgeryCenter;
use Illuminate\Auth\Access\HandlesAuthorization;
class SurgeryCenterPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:SurgeryCenter');
}
public function view(AuthUser $authUser, SurgeryCenter $surgeryCenter): bool
{
return $authUser->can('View:SurgeryCenter');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:SurgeryCenter');
}
public function update(AuthUser $authUser, SurgeryCenter $surgeryCenter): bool
{
return $authUser->can('Update:SurgeryCenter');
}
public function delete(AuthUser $authUser, SurgeryCenter $surgeryCenter): bool
{
return $authUser->can('Delete:SurgeryCenter');
}
public function restore(AuthUser $authUser, SurgeryCenter $surgeryCenter): bool
{
return $authUser->can('Restore:SurgeryCenter');
}
public function forceDelete(AuthUser $authUser, SurgeryCenter $surgeryCenter): bool
{
return $authUser->can('ForceDelete:SurgeryCenter');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:SurgeryCenter');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:SurgeryCenter');
}
public function replicate(AuthUser $authUser, SurgeryCenter $surgeryCenter): bool
{
return $authUser->can('Replicate:SurgeryCenter');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:SurgeryCenter');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\SyncLog;
use Illuminate\Auth\Access\HandlesAuthorization;
class SyncLogPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:SyncLog');
}
public function view(AuthUser $authUser, SyncLog $syncLog): bool
{
return $authUser->can('View:SyncLog');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:SyncLog');
}
public function update(AuthUser $authUser, SyncLog $syncLog): bool
{
return $authUser->can('Update:SyncLog');
}
public function delete(AuthUser $authUser, SyncLog $syncLog): bool
{
return $authUser->can('Delete:SyncLog');
}
public function restore(AuthUser $authUser, SyncLog $syncLog): bool
{
return $authUser->can('Restore:SyncLog');
}
public function forceDelete(AuthUser $authUser, SyncLog $syncLog): bool
{
return $authUser->can('ForceDelete:SyncLog');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:SyncLog');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:SyncLog');
}
public function replicate(AuthUser $authUser, SyncLog $syncLog): bool
{
return $authUser->can('Replicate:SyncLog');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:SyncLog');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\Treatment;
use Illuminate\Auth\Access\HandlesAuthorization;
class TreatmentPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Treatment');
}
public function view(AuthUser $authUser, Treatment $treatment): bool
{
return $authUser->can('View:Treatment');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Treatment');
}
public function update(AuthUser $authUser, Treatment $treatment): bool
{
return $authUser->can('Update:Treatment');
}
public function delete(AuthUser $authUser, Treatment $treatment): bool
{
return $authUser->can('Delete:Treatment');
}
public function restore(AuthUser $authUser, Treatment $treatment): bool
{
return $authUser->can('Restore:Treatment');
}
public function forceDelete(AuthUser $authUser, Treatment $treatment): bool
{
return $authUser->can('ForceDelete:Treatment');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Treatment');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Treatment');
}
public function replicate(AuthUser $authUser, Treatment $treatment): bool
{
return $authUser->can('Replicate:Treatment');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Treatment');
}
}
+67
View File
@@ -0,0 +1,67 @@
<?php
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use Illuminate\Auth\Access\HandlesAuthorization;
class UserPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:User');
}
public function view(AuthUser $authUser): bool
{
return $authUser->can('View:User');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:User');
}
public function update(AuthUser $authUser): bool
{
return $authUser->can('Update:User');
}
public function delete(AuthUser $authUser): bool
{
return $authUser->can('Delete:User');
}
public function restore(AuthUser $authUser): bool
{
return $authUser->can('Restore:User');
}
public function forceDelete(AuthUser $authUser): bool
{
return $authUser->can('ForceDelete:User');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:User');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:User');
}
public function replicate(AuthUser $authUser): bool
{
return $authUser->can('Replicate:User');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:User');
}
}
+69
View File
@@ -0,0 +1,69 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\Visit;
use Illuminate\Auth\Access\HandlesAuthorization;
class VisitPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Visit');
}
public function view(AuthUser $authUser, Visit $visit): bool
{
return $authUser->can('View:Visit');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Visit');
}
public function update(AuthUser $authUser, Visit $visit): bool
{
return $authUser->can('Update:Visit');
}
public function delete(AuthUser $authUser, Visit $visit): bool
{
return $authUser->can('Delete:Visit');
}
public function restore(AuthUser $authUser, Visit $visit): bool
{
return $authUser->can('Restore:Visit');
}
public function forceDelete(AuthUser $authUser, Visit $visit): bool
{
return $authUser->can('ForceDelete:Visit');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Visit');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Visit');
}
public function replicate(AuthUser $authUser, Visit $visit): bool
{
return $authUser->can('Replicate:Visit');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Visit');
}
}