Compare commits
	
		
			No commits in common. "91bfc622d19a9b7eb130b89c3ecff7a7214e5ca7" and "c5df13a8f2c59be3299dbf5f8522325c28e4c856" have entirely different histories.
		
	
	
		
			91bfc622d1
			...
			c5df13a8f2
		
	
		
@ -67,7 +67,7 @@
 | 
				
			|||||||
        <th pSortableColumn="timeOfAppointment">Time<p-sortIcon field="timeOfAppointment" /></th>
 | 
					        <th pSortableColumn="timeOfAppointment">Time<p-sortIcon field="timeOfAppointment" /></th>
 | 
				
			||||||
        <th>Mobile No</th>
 | 
					        <th>Mobile No</th>
 | 
				
			||||||
        <th>Email</th>
 | 
					        <th>Email</th>
 | 
				
			||||||
        <th pSortableColumn="appointmentStatus">Appointment Status<p-sortIcon field="appointmentStatus" /></th>
 | 
					        <th pSortableColumn="status">Appointment Status<p-sortIcon field="status" /></th>
 | 
				
			||||||
        <th pSortableColumn="visitType">Visit Type<p-sortIcon field="visitType" /></th>
 | 
					        <th pSortableColumn="visitType">Visit Type<p-sortIcon field="visitType" /></th>
 | 
				
			||||||
        <th>Actions</th>
 | 
					        <th>Actions</th>
 | 
				
			||||||
      </tr>
 | 
					      </tr>
 | 
				
			||||||
@ -78,44 +78,25 @@
 | 
				
			|||||||
        <td>{{ appointment.firstName }} {{ appointment.lastName }}</td>
 | 
					        <td>{{ appointment.firstName }} {{ appointment.lastName }}</td>
 | 
				
			||||||
        <td>{{ appointment.doctor }}</td>
 | 
					        <td>{{ appointment.doctor }}</td>
 | 
				
			||||||
        <td>
 | 
					        <td>
 | 
				
			||||||
          <p-chip 
 | 
					          <i
 | 
				
			||||||
          [severity]="appointment.gender === 1 ? 'info' : 'danger'" 
 | 
					            class="pi"
 | 
				
			||||||
          [styleClass]="'px-2 py-1 text-sm font-medium'"
 | 
					            [ngClass]="{
 | 
				
			||||||
        >
 | 
					              'pi-mars text-primary': appointment.gender === 1,
 | 
				
			||||||
 
 | 
					              'pi-venus text-pink-500': appointment.gender === 2
 | 
				
			||||||
 | 
					            }"
 | 
				
			||||||
 | 
					          ></i>
 | 
				
			||||||
          {{ getGenderLabel(appointment.gender) }}
 | 
					          {{ getGenderLabel(appointment.gender) }}
 | 
				
			||||||
        </p-chip>
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        </td>
 | 
					        </td>
 | 
				
			||||||
        <td>{{ appointment.dateOfAppointment | date }}</td>
 | 
					        <td>{{ appointment.dateOfAppointment | date }}</td>
 | 
				
			||||||
        <td>{{ appointment.timeOfAppointment }}</td>
 | 
					        <td><i class="pi pi-clock"></i> {{ appointment.timeOfAppointment }}</td>
 | 
				
			||||||
        <td>{{ appointment.mobile }}</td>
 | 
					        <td>{{ appointment.mobile }}</td>
 | 
				
			||||||
        <td>{{ appointment.email }}</td>
 | 
					        <td>{{ appointment.email }}</td>
 | 
				
			||||||
 | 
					        <td>{{ appointment.status }}</td>
 | 
				
			||||||
 | 
					        <td>{{ appointment.visitType }}</td>
 | 
				
			||||||
        <td>
 | 
					        <td>
 | 
				
			||||||
          <p-chip 
 | 
					 | 
				
			||||||
          [severity]="appointment.appointmentStatus === 1 ? 'info' : 'danger'" 
 | 
					 | 
				
			||||||
          [styleClass]="'px-2 py-1 text-sm font-medium'"
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
          {{ getStatusLabel(appointment.appointmentStatus) }}
 | 
					 | 
				
			||||||
        </p-chip>
 | 
					 | 
				
			||||||
        </td>
 | 
					 | 
				
			||||||
        <td>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          <p-chip 
 | 
					 | 
				
			||||||
          [severity]="appointment.visitType === 1 ? 'info' : 'danger'" 
 | 
					 | 
				
			||||||
          [styleClass]="'px-2 py-1 text-sm font-medium'"
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
          {{ getVisitTypeLabel(appointment.visitType) }}
 | 
					 | 
				
			||||||
        </p-chip>
 | 
					 | 
				
			||||||
        </td>
 | 
					 | 
				
			||||||
        <td class="d-flex">
 | 
					 | 
				
			||||||
          <button class="btn btn-warning btn-sm ml-1" (click)="editAppointment(appointment)">
 | 
					          <button class="btn btn-warning btn-sm ml-1" (click)="editAppointment(appointment)">
 | 
				
			||||||
            <i class="pi pi-pencil"></i>
 | 
					            <i class="pi pi-pencil"></i>
 | 
				
			||||||
          </button>
 | 
					          </button>
 | 
				
			||||||
          <button class="btn btn-danger btn-sm ml-1"
 | 
					 | 
				
			||||||
          (click)="deleteAppointment(appointment.id)"><i class="pi pi-trash"></i></button>
 | 
					 | 
				
			||||||
        </td>
 | 
					        </td>
 | 
				
			||||||
      </tr>
 | 
					      </tr>
 | 
				
			||||||
    </ng-template>
 | 
					    </ng-template>
 | 
				
			||||||
@ -123,7 +104,7 @@
 | 
				
			|||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<p-dialog
 | 
					<p-dialog
 | 
				
			||||||
  header="{{ isEditMode ? 'Edit Appointment' : 'New Appointment' }}"
 | 
					  header="{{ isEditing ? 'Edit Appointment' : 'New Appointment' }}"
 | 
				
			||||||
  [(visible)]="appointmentDialog"
 | 
					  [(visible)]="appointmentDialog"
 | 
				
			||||||
  [modal]="true"
 | 
					  [modal]="true"
 | 
				
			||||||
  [closable]="true"
 | 
					  [closable]="true"
 | 
				
			||||||
 | 
				
			|||||||
@ -1,15 +0,0 @@
 | 
				
			|||||||
.table-header {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    justify-content: space-between;
 | 
					 | 
				
			||||||
    align-items: center;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  .badge {
 | 
					 | 
				
			||||||
    display: inline-block;
 | 
					 | 
				
			||||||
    padding: 0.2rem 0.6rem;
 | 
					 | 
				
			||||||
    border-radius: 0.5rem;
 | 
					 | 
				
			||||||
    color: white;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    font-size: 0.8rem;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
 | 
					import { ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
 | 
				
			||||||
import { HttpClient } from '@angular/common/http';
 | 
					import { HttpClient } from '@angular/common/http';
 | 
				
			||||||
import { Component } from '@angular/core';
 | 
					import { Component } from '@angular/core';
 | 
				
			||||||
import { NgForm } from '@angular/forms';
 | 
					import { NgForm } from '@angular/forms';
 | 
				
			||||||
@ -18,6 +18,7 @@ export class ViewAppointmentComponent {
 | 
				
			|||||||
  AppointmentDialogTitle: string = '';
 | 
					  AppointmentDialogTitle: string = '';
 | 
				
			||||||
  AppointmentDialog: boolean = false;
 | 
					  AppointmentDialog: boolean = false;
 | 
				
			||||||
  patients: [];
 | 
					  patients: [];
 | 
				
			||||||
 | 
					  isEditing = false;
 | 
				
			||||||
  appointmentDialog = false;
 | 
					  appointmentDialog = false;
 | 
				
			||||||
  genders = Gender;
 | 
					  genders = Gender;
 | 
				
			||||||
  appointmentStatuses = Object.keys(appointmentStatus)
 | 
					  appointmentStatuses = Object.keys(appointmentStatus)
 | 
				
			||||||
@ -32,12 +33,12 @@ export class ViewAppointmentComponent {
 | 
				
			|||||||
      label: visitType[key as unknown as keyof typeof visitType],
 | 
					      label: visitType[key as unknown as keyof typeof visitType],
 | 
				
			||||||
      value: Number(key),
 | 
					      value: Number(key),
 | 
				
			||||||
    }));
 | 
					    }));
 | 
				
			||||||
  paymentStatuses = Object.keys(paymentStatus)
 | 
					  paymentStatuses =  Object.keys(paymentStatus)
 | 
				
			||||||
    .filter(key => !isNaN(Number(key)))
 | 
					  .filter(key => !isNaN(Number(key)))
 | 
				
			||||||
    .map(key => ({
 | 
					  .map(key => ({
 | 
				
			||||||
      label: paymentStatus[key as unknown as keyof typeof paymentStatus],
 | 
					    label: paymentStatus[key as unknown as keyof typeof paymentStatus],
 | 
				
			||||||
      value: Number(key),
 | 
					    value: Number(key),
 | 
				
			||||||
    }));
 | 
					  }));;
 | 
				
			||||||
  isEditMode: boolean = false;
 | 
					  isEditMode: boolean = false;
 | 
				
			||||||
  loading: boolean = false;
 | 
					  loading: boolean = false;
 | 
				
			||||||
  params: PagingSortResultDto;
 | 
					  params: PagingSortResultDto;
 | 
				
			||||||
@ -91,15 +92,8 @@ export class ViewAppointmentComponent {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  getGenderLabel(gender: number): string {
 | 
					  getGenderLabel(gender: number): string {
 | 
				
			||||||
    return Gender[gender] ?? 'Unknown';
 | 
					    return gender === Gender.Male ? 'Male' : gender === Gender.Female ? 'Female' : 'Unknown';
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  getStatusLabel(Status: number): string {
 | 
					 | 
				
			||||||
    return appointmentStatus[Status] ?? 'Unknown';
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  getVisitTypeLabel(VisitType: number): string {
 | 
					 | 
				
			||||||
    return visitType[VisitType] ?? 'Unknown';
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  loadappointments(event: any) {
 | 
					  loadappointments(event: any) {
 | 
				
			||||||
    this.loading = true;
 | 
					    this.loading = true;
 | 
				
			||||||
    let order = event.sortOrder == 1 ? ' asc' : ' desc';
 | 
					    let order = event.sortOrder == 1 ? ' asc' : ' desc';
 | 
				
			||||||
@ -119,7 +113,7 @@ export class ViewAppointmentComponent {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  openNewAppointmentDialog() {
 | 
					  openNewAppointmentDialog() {
 | 
				
			||||||
    this.isEditMode = false;
 | 
					    this.isEditing = false;
 | 
				
			||||||
    this.appointmentDialog = true;
 | 
					    this.appointmentDialog = true;
 | 
				
			||||||
    this.appointment = {
 | 
					    this.appointment = {
 | 
				
			||||||
      firstName: '',
 | 
					      firstName: '',
 | 
				
			||||||
@ -146,33 +140,11 @@ export class ViewAppointmentComponent {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  editAppointment(appointment: any) {
 | 
					  editAppointment(appointment: any) {
 | 
				
			||||||
    debugger;
 | 
					    console.log('Editing appointment', appointment);
 | 
				
			||||||
    this.isEditMode = true;
 | 
					 | 
				
			||||||
    this.appointmentDialog = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    this.AppointmentService.getAppointmentById(appointment.id).subscribe(result => {
 | 
					 | 
				
			||||||
      debugger;
 | 
					 | 
				
			||||||
      this.appointment = result;
 | 
					 | 
				
			||||||
      this.appointment.dateOfAppointment = new Date(result.dateOfAppointment).toISOString().split('T')[0];;
 | 
					 | 
				
			||||||
      this.appointment.dob = new Date(result.dob).toISOString().split('T')[0];;
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  deleteAppointment(id: string) {
 | 
					  deleteAppointment(id: number) {
 | 
				
			||||||
   this.confirmation
 | 
					    console.log('Deleting appointment with ID', id);
 | 
				
			||||||
         .warn('Do you really want to delete this Appointment?', {
 | 
					 | 
				
			||||||
           key: '::AreYouSure',
 | 
					 | 
				
			||||||
           defaultValue: 'Are you sure?',
 | 
					 | 
				
			||||||
         })
 | 
					 | 
				
			||||||
         .subscribe((status: Confirmation.Status) => {
 | 
					 | 
				
			||||||
           // your code here
 | 
					 | 
				
			||||||
           if (status == 'confirm') {
 | 
					 | 
				
			||||||
             this.AppointmentService.deleteAppointmentRecord(id).subscribe(() => {
 | 
					 | 
				
			||||||
               this.toaster.success('Appointment deleted successfully', 'Success');
 | 
					 | 
				
			||||||
               this.loadappointments(this.params);
 | 
					 | 
				
			||||||
             });
 | 
					 | 
				
			||||||
           }
 | 
					 | 
				
			||||||
         });
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  saveAppointment(form: NgForm) {
 | 
					  saveAppointment(form: NgForm) {
 | 
				
			||||||
    debugger;
 | 
					    debugger;
 | 
				
			||||||
@ -182,22 +154,21 @@ export class ViewAppointmentComponent {
 | 
				
			|||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (this.isEditMode) {
 | 
					    if (this.isEditMode) {
 | 
				
			||||||
      this.AppointmentService.updateAppointment(this.appointment).subscribe(
 | 
					      this.AppointmentService.createAppointment(this.appointment).subscribe(
 | 
				
			||||||
        () => {
 | 
					        () => {
 | 
				
			||||||
          this.toaster.success('Appointment updated successfully', 'Success');
 | 
					          this.toaster.success('Appointment updated successfully', 'Success');
 | 
				
			||||||
          this.AppointmentDialog = false;
 | 
					          this.AppointmentDialog = false;
 | 
				
			||||||
          this.loadappointments({
 | 
					          // this.loadPatient({
 | 
				
			||||||
            first: 0,
 | 
					          //   first: 0,
 | 
				
			||||||
            rows: 10,
 | 
					          //   rows: 10,
 | 
				
			||||||
            sortField: 'id',
 | 
					          //   sortField: 'id',
 | 
				
			||||||
            sortOrder: 1,
 | 
					          //   sortOrder: 1,
 | 
				
			||||||
            globalFilter: null,
 | 
					          //   globalFilter: null,
 | 
				
			||||||
          });
 | 
					          // });
 | 
				
			||||||
          this.closeDialog();
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        error => {
 | 
					        error => {
 | 
				
			||||||
          console.log(error);
 | 
					          console.log(error);
 | 
				
			||||||
          this.toaster.error(error.error.error.message, 'Error');
 | 
					          this.closeDialog();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
@ -213,10 +184,12 @@ export class ViewAppointmentComponent {
 | 
				
			|||||||
            globalFilter: null,
 | 
					            globalFilter: null,
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
          this.closeDialog();
 | 
					          this.closeDialog();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        error => {
 | 
					        error => {
 | 
				
			||||||
          console.log(error);
 | 
					          console.log(error);
 | 
				
			||||||
          this.toaster.error(error.error.error.message, 'Error');
 | 
					          this.toaster.error(error.error.error.message, 'Error');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -13,7 +13,6 @@ import { InputTextModule } from 'primeng/inputtext';
 | 
				
			|||||||
import { RadioButtonModule } from 'primeng/radiobutton';
 | 
					import { RadioButtonModule } from 'primeng/radiobutton';
 | 
				
			||||||
import { DoctorService } from '@proxy/doctors';
 | 
					import { DoctorService } from '@proxy/doctors';
 | 
				
			||||||
import { InputTextareaModule } from 'primeng/inputtextarea';
 | 
					import { InputTextareaModule } from 'primeng/inputtextarea';
 | 
				
			||||||
import { ChipModule } from 'primeng/chip';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@NgModule({
 | 
					@NgModule({
 | 
				
			||||||
  declarations: [ViewAppointmentComponent],
 | 
					  declarations: [ViewAppointmentComponent],
 | 
				
			||||||
@ -30,8 +29,7 @@ import { ChipModule } from 'primeng/chip';
 | 
				
			|||||||
    CalendarModule,
 | 
					    CalendarModule,
 | 
				
			||||||
    DropdownModule,
 | 
					    DropdownModule,
 | 
				
			||||||
    RadioButtonModule,
 | 
					    RadioButtonModule,
 | 
				
			||||||
    InputTextareaModule,
 | 
					    InputTextareaModule 
 | 
				
			||||||
    ChipModule 
 | 
					 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  providers:[DoctorService]
 | 
					  providers:[DoctorService]
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
<!-- <div>
 | 
					<div>
 | 
				
			||||||
    <p-table #dt2 dataKey="id" [value]="patients" [paginator]="true" [rows]="10" [totalRecords]="totalRecords"
 | 
					    <p-table #dt2 dataKey="id" [value]="patients" [paginator]="true" [rows]="10" [totalRecords]="totalRecords"
 | 
				
			||||||
        [lazy]="true" (onLazyLoad)="loadPatient($event)" [rowsPerPageOptions]="[10, 20, 50]"
 | 
					        [lazy]="true" (onLazyLoad)="loadPatient($event)" [rowsPerPageOptions]="[10, 20, 50]"
 | 
				
			||||||
        [responsiveLayout]="'scroll'" [globalFilterFields]="['id', 'name', 'status']"
 | 
					        [responsiveLayout]="'scroll'" [globalFilterFields]="['id', 'name', 'status']"
 | 
				
			||||||
@ -74,216 +74,164 @@
 | 
				
			|||||||
        </ng-template>
 | 
					        </ng-template>
 | 
				
			||||||
    </p-table>
 | 
					    </p-table>
 | 
				
			||||||
    <span>Total Records: {{totalRecords}}</span>
 | 
					    <span>Total Records: {{totalRecords}}</span>
 | 
				
			||||||
</div> -->
 | 
					 | 
				
			||||||
<div class="container-fluid py-3">
 | 
					 | 
				
			||||||
    <div class="card shadow-sm p-3">
 | 
					 | 
				
			||||||
        <div class="d-flex justify-content-between align-items-center mb-3">
 | 
					 | 
				
			||||||
            <h2 class="mb-0">Patient List</h2>
 | 
					 | 
				
			||||||
            <div class="d-flex align-items-center gap-2">
 | 
					 | 
				
			||||||
                <button *ngIf="createpermission" class="btn btn-success btn-sm" (click)="openNewPatientDialog()">
 | 
					 | 
				
			||||||
                    <i class="pi pi-plus-circle"></i>
 | 
					 | 
				
			||||||
                </button>
 | 
					 | 
				
			||||||
                <button class="btn btn-warning btn-sm" (click)="exportPatient()">
 | 
					 | 
				
			||||||
                    <i class="pi pi-download"></i>
 | 
					 | 
				
			||||||
                </button>
 | 
					 | 
				
			||||||
                <div class="input-group">
 | 
					 | 
				
			||||||
                    <span class="input-group-text"><i class="pi pi-search"></i></span>
 | 
					 | 
				
			||||||
                    <input pInputText type="text" class="form-control"
 | 
					 | 
				
			||||||
                        (input)="dt2.filterGlobal($event.target.value, 'contains')" [(ngModel)]="globalFilter"
 | 
					 | 
				
			||||||
                        placeholder="Search keyword" />
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <p-table #dt2 dataKey="id" [value]="patients" [paginator]="true" [rows]="10" [totalRecords]="totalRecords"
 | 
					 | 
				
			||||||
            [lazy]="true" (onLazyLoad)="loadPatient($event)" [rowsPerPageOptions]="[10, 20, 50]"
 | 
					 | 
				
			||||||
            styleClass="p-datatable-gridlines" [responsiveLayout]="'scroll'"
 | 
					 | 
				
			||||||
            [globalFilterFields]="['id', 'name', 'status']" [filters]="{ global: { value: '', matchMode: 'contains' } }"
 | 
					 | 
				
			||||||
            class="table table-hover table-responsive-md">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <ng-template pTemplate="header">
 | 
					 | 
				
			||||||
                <tr class="table-dark">
 | 
					 | 
				
			||||||
                    <th class="hidden" pSortableColumn="id">Patient ID <p-sortIcon field="id" /></th>
 | 
					 | 
				
			||||||
                    <th pSortableColumn="name">Full Name <p-sortIcon field="name" /></th>
 | 
					 | 
				
			||||||
                    <th pSortableColumn="gender">Gender <p-sortIcon field="gender" /></th>
 | 
					 | 
				
			||||||
                    <th pSortableColumn="admissionDate">Date of Admission <p-sortIcon field="admissionDate" /></th>
 | 
					 | 
				
			||||||
                    <th pSortableColumn="bloodGroup">Blood Group <p-sortIcon field="bloodGroup" /></th>
 | 
					 | 
				
			||||||
                    <th>Mobile</th>
 | 
					 | 
				
			||||||
                    <th>Email</th>
 | 
					 | 
				
			||||||
                    <th pSortableColumn="status">Status <p-sortIcon field="status" /></th>
 | 
					 | 
				
			||||||
                    <th>Actions</th>
 | 
					 | 
				
			||||||
                </tr>
 | 
					 | 
				
			||||||
            </ng-template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <ng-template pTemplate="body" let-patient>
 | 
					 | 
				
			||||||
                <tr>
 | 
					 | 
				
			||||||
                    <td class="hidden">{{ patient.id }}</td>
 | 
					 | 
				
			||||||
                    <td>{{ patient.name }}</td>
 | 
					 | 
				
			||||||
                    <td>
 | 
					 | 
				
			||||||
                        <span class="badge" [ngClass]="patient.gender === 1 ? 'bg-primary' : 'bg-pink'">
 | 
					 | 
				
			||||||
                            {{ gender[patient.gender] }}
 | 
					 | 
				
			||||||
                        </span>
 | 
					 | 
				
			||||||
                    </td>
 | 
					 | 
				
			||||||
                    <td>{{ patient.admissionDate | date }}</td>
 | 
					 | 
				
			||||||
                    <td>{{ patient.bloodGroup }}</td>
 | 
					 | 
				
			||||||
                    <td>{{ patient.mobile }}</td>
 | 
					 | 
				
			||||||
                    <td>{{ patient.email }}</td>
 | 
					 | 
				
			||||||
                    <td>
 | 
					 | 
				
			||||||
                        <span class="badge"
 | 
					 | 
				
			||||||
                            [ngClass]="patient.status === 1 ? 'bg-success' : (patient.status === 2 ? 'bg-primary':'bg-danger')">
 | 
					 | 
				
			||||||
                            {{ status[patient.status] }}
 | 
					 | 
				
			||||||
                        </span>
 | 
					 | 
				
			||||||
                    </td>
 | 
					 | 
				
			||||||
                    <td class="d-flex gap-1">
 | 
					 | 
				
			||||||
                        <button *ngIf="createpermission" class="btn btn-success btn-sm"
 | 
					 | 
				
			||||||
                            (click)="addnewrecord(patient.id)">
 | 
					 | 
				
			||||||
                            <i class="pi pi-arrow-right"></i>
 | 
					 | 
				
			||||||
                        </button>
 | 
					 | 
				
			||||||
                        <button *ngIf="editpermission" class="btn btn-warning btn-sm" (click)="editPatient(patient)"><i
 | 
					 | 
				
			||||||
                                class="pi pi-pencil"></i></button>
 | 
					 | 
				
			||||||
                        <button *ngIf="deletepermission" class="btn btn-danger btn-sm"
 | 
					 | 
				
			||||||
                            (click)="deletePatient(patient.id)"><i class="pi pi-trash"></i></button>
 | 
					 | 
				
			||||||
                    </td>
 | 
					 | 
				
			||||||
                </tr>
 | 
					 | 
				
			||||||
            </ng-template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <ng-template pTemplate="emptymessage">
 | 
					 | 
				
			||||||
                <tr>
 | 
					 | 
				
			||||||
                    <td colspan="10" class="text-center">No Patients found.</td>
 | 
					 | 
				
			||||||
                </tr>
 | 
					 | 
				
			||||||
            </ng-template>
 | 
					 | 
				
			||||||
        </p-table>
 | 
					 | 
				
			||||||
        <div class="text-end mt-2 fw-bold">Total Records: {{ totalRecords }}</div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					 | 
				
			||||||
<div>
 | 
					<div>
 | 
				
			||||||
    <p-dialog *ngIf="patientDialog" header="{{patientDialogTitle}}" [(visible)]="patientDialog" [modal]="true"
 | 
					    <p-dialog *ngIf="patientDialog" header="{{patientDialogTitle}}" [(visible)]="patientDialog" [modal]="true"
 | 
				
			||||||
        [closable]="true" [style]="{width: '80%', height: 'auto'}" class="modern-dialog">
 | 
					        [closable]="true" [style]="{width: '85%', height: '100%'}">
 | 
				
			||||||
        <form #patientrecord="ngForm" (ngSubmit)="savePatient(patientrecord)">
 | 
					        <form #patientrecord="ngForm" (ngSubmit)="savePatient(patientrecord)">
 | 
				
			||||||
            <div class="p-fluid grid">
 | 
					            <div class="p-fluid">
 | 
				
			||||||
                <!-- Full Name & Profile Image -->
 | 
					                <div class="p-grid">
 | 
				
			||||||
                <div class="col-6">
 | 
					                    <!-- Full Name -->
 | 
				
			||||||
                    <div class="field">
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
                        <label for="name"><i class="pi pi-user"></i> Full Name</label>
 | 
					                        <div class="field">
 | 
				
			||||||
                        <input id="name" name="name" type="text" pInputText [(ngModel)]="selectedPatient.name"
 | 
					                            <label for="name">Full Name</label>
 | 
				
			||||||
                            placeholder="Enter full patient name" required #name="ngModel" />
 | 
					                            <input id="name" name="name" type="text" pInputText [(ngModel)]="selectedPatient.name"
 | 
				
			||||||
                        <small *ngIf="name.invalid && name.touched" class="p-error">Full Name is required</small>
 | 
					                                placeholder="Enter full patient name" required #name="ngModel" />
 | 
				
			||||||
                    </div>
 | 
					                            <small *ngIf="name.invalid && name.touched" class="p-error">Full Name is required</small>
 | 
				
			||||||
                    <div class="field">
 | 
					                        </div>
 | 
				
			||||||
                        <label for="image"><i class="pi pi-image"></i> Profile Image</label>
 | 
					                        <div class="field">
 | 
				
			||||||
                        <input type="file" id="image" name="image" accept=".jpg,.png"
 | 
					                            <label for="image">Profile Image</label>
 | 
				
			||||||
                            (change)="profileimageupload($event)" />
 | 
					                            <input type="file" id="image" name="image" accept=".jpg,.png"
 | 
				
			||||||
                    </div>
 | 
					                                (change)="profileimageupload($event)" />
 | 
				
			||||||
                    <small *ngIf="error !== ''" class="p-error">{{error}}</small>
 | 
					                        </div>
 | 
				
			||||||
                    <div *ngIf="uploadProgress > 0">
 | 
					                        <small *ngIf="error !== ''" class="p-error">{{error}}</small>
 | 
				
			||||||
                        <p>Uploading... {{ uploadProgress }}%</p>
 | 
					                        <small *ngIf="imgpath !== ''">{{imgpath}} <i class="pi pi-image"></i></small>
 | 
				
			||||||
                        <progress [value]="uploadProgress" max="100"></progress>
 | 
					                    </div>
 | 
				
			||||||
                    </div>
 | 
					
 | 
				
			||||||
                    <small *ngIf="imgpath !== ''">{{imgpath}} <i class="pi pi-image"></i></small>
 | 
					                    <!-- Mobile -->
 | 
				
			||||||
                </div>
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
 | 
					                        <div class="field">
 | 
				
			||||||
                <!-- Mobile & Address -->
 | 
					                            <label for="mobile">Mobile</label>
 | 
				
			||||||
                <div class="col-6">
 | 
					                            <input id="mobile" name="mobile" type="text" pInputText [(ngModel)]="selectedPatient.mobile"
 | 
				
			||||||
                    <div class="field">
 | 
					                                placeholder="Enter mobile number" maxlength="10" required pattern="[0-9]{10}"
 | 
				
			||||||
                        <label for="mobile"><i class="pi pi-phone"></i> Mobile</label>
 | 
					                                #mobile="ngModel" />
 | 
				
			||||||
                        <input id="mobile" name="mobile" type="text" pInputText [(ngModel)]="selectedPatient.mobile"
 | 
					                            <small *ngIf="mobile.invalid && mobile.touched" class="p-error">
 | 
				
			||||||
                            placeholder="Enter mobile number" maxlength="10" required pattern="[0-9]{10}"
 | 
					                                Mobile is required and must be 10 digits
 | 
				
			||||||
                            #mobile="ngModel" />
 | 
					                            </small>
 | 
				
			||||||
                        <small *ngIf="mobile.invalid && mobile.touched" class="p-error">
 | 
					                        </div>
 | 
				
			||||||
                            Mobile is required and must be 10 digits
 | 
					                    </div>
 | 
				
			||||||
                        </small>
 | 
					
 | 
				
			||||||
                    </div>
 | 
					                    <!-- Address -->
 | 
				
			||||||
                    <div class="field">
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
                        <label for="address"><i class="pi pi-map-marker"></i> Address</label>
 | 
					                        <div class="field">
 | 
				
			||||||
                        <input id="address" name="address" type="text" pInputText [(ngModel)]="selectedPatient.address"
 | 
					                            <label for="address">Address</label>
 | 
				
			||||||
                            placeholder="Enter address" required #address="ngModel" />
 | 
					                            <input id="address" name="address" type="text" pInputText
 | 
				
			||||||
                        <small *ngIf="address.invalid && address.touched" class="p-error">Address is required</small>
 | 
					                                [(ngModel)]="selectedPatient.address" placeholder="Enter address" required
 | 
				
			||||||
                    </div>
 | 
					                                #address="ngModel" />
 | 
				
			||||||
                </div>
 | 
					                            <small *ngIf="address.invalid && address.touched" class="p-error">Address is
 | 
				
			||||||
            </div>
 | 
					                                required</small>
 | 
				
			||||||
 | 
					 | 
				
			||||||
            <div class="p-fluid grid">
 | 
					 | 
				
			||||||
                <!-- Gender & Admission Date -->
 | 
					 | 
				
			||||||
                <div class="col-6">
 | 
					 | 
				
			||||||
                    <div class="field">
 | 
					 | 
				
			||||||
                        <label for="gender"><i class="pi pi-users"></i> Gender</label>
 | 
					 | 
				
			||||||
                        <div>
 | 
					 | 
				
			||||||
                            <label class="mx-1">
 | 
					 | 
				
			||||||
                                <input id="male" type="radio" name="gender" [(ngModel)]="selectedgender" [value]="1"
 | 
					 | 
				
			||||||
                                    required />
 | 
					 | 
				
			||||||
                                Male
 | 
					 | 
				
			||||||
                            </label>
 | 
					 | 
				
			||||||
                            <label>
 | 
					 | 
				
			||||||
                                <input id="female" type="radio" name="gender" [(ngModel)]="selectedgender"
 | 
					 | 
				
			||||||
                                    [value]="2" />
 | 
					 | 
				
			||||||
                                Female
 | 
					 | 
				
			||||||
                            </label>
 | 
					 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <small *ngIf="!selectedgender" class="p-error">Gender is required</small>
 | 
					 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="col-6">
 | 
					
 | 
				
			||||||
                    <div class="field">
 | 
					                <div class="p-grid">
 | 
				
			||||||
                        <label for="admissionDate"><i class="pi pi-calendar"></i> Admission Date</label>
 | 
					                    <!-- Gender -->
 | 
				
			||||||
                        <p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectadmissionDate" showIcon
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
                            styleClass="small-calendar" required #admissionDate="ngModel"></p-calendar>
 | 
					                        <div class="field">
 | 
				
			||||||
                        <small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
 | 
					                            <label for="gender">Gender</label>
 | 
				
			||||||
                            Admission Date is required
 | 
					                            <div>
 | 
				
			||||||
                        </small>
 | 
					                                <label class="mx-1">
 | 
				
			||||||
 | 
					                                    <input id="male" type="radio" name="gender" [(ngModel)]="selectedgender" [value]="1"
 | 
				
			||||||
 | 
					                                        required />
 | 
				
			||||||
 | 
					                                    Male
 | 
				
			||||||
 | 
					                                </label>
 | 
				
			||||||
 | 
					                                <label>
 | 
				
			||||||
 | 
					                                    <input id="female" type="radio" name="gender" [(ngModel)]="selectedgender"
 | 
				
			||||||
 | 
					                                        [value]="2" />
 | 
				
			||||||
 | 
					                                    Female
 | 
				
			||||||
 | 
					                                </label>
 | 
				
			||||||
 | 
					                            </div>
 | 
				
			||||||
 | 
					                            <small *ngIf="!selectedgender" class="p-error">Gender is required</small>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    <!-- Admission Date -->
 | 
				
			||||||
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
 | 
					                        <div class="field">
 | 
				
			||||||
 | 
					                            <label for="admissionDate">Admission Date</label>
 | 
				
			||||||
 | 
					                            <p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectadmissionDate"
 | 
				
			||||||
 | 
					                                showIcon styleClass="small-calendar" required #admissionDate="ngModel"></p-calendar>
 | 
				
			||||||
 | 
					                            <small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
 | 
				
			||||||
 | 
					                                Admission Date is required
 | 
				
			||||||
 | 
					                            </small>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                <div class="p-grid">
 | 
				
			||||||
 | 
					                    <!-- Doctors Note -->
 | 
				
			||||||
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
 | 
					                        <div class="field">
 | 
				
			||||||
 | 
					                            <label for="doctorAssigned">Doctor Assigned</label>
 | 
				
			||||||
 | 
					                            <input id="doctorAssigned" name="doctorAssigned" type="text" pInputText
 | 
				
			||||||
 | 
					                                [(ngModel)]="selectedPatient.doctorAssigned" placeholder="Enter assigned doctor" />
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    <!-- Treatment -->
 | 
				
			||||||
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
 | 
					                        <div class="field">
 | 
				
			||||||
 | 
					                            <label for="treatment">Treatment</label>
 | 
				
			||||||
 | 
					                            <input id="treatment" name="treatment" type="treatment" pInputText
 | 
				
			||||||
 | 
					                                [(ngModel)]="selectedPatient.treatment" placeholder="Enter treatment" />
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <div class="p-grid">
 | 
				
			||||||
 | 
					                    <!-- Blood Group -->
 | 
				
			||||||
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
 | 
					                        <div class="field">
 | 
				
			||||||
 | 
					                            <label for="bloodGroup">Blood Group</label>
 | 
				
			||||||
 | 
					                            <input id="bloodGroup" name="bloodGroup" type="text" pInputText
 | 
				
			||||||
 | 
					                                [(ngModel)]="selectedPatient.bloodGroup" placeholder="Enter blood group" required
 | 
				
			||||||
 | 
					                                #bloodGroup="ngModel" />
 | 
				
			||||||
 | 
					                            <small *ngIf="bloodGroup.invalid && bloodGroup.touched" class="p-error">Blood Group is
 | 
				
			||||||
 | 
					                                required</small>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    <!-- Email -->
 | 
				
			||||||
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
 | 
					                        <div class="field">
 | 
				
			||||||
 | 
					                            <label for="email">Email</label>
 | 
				
			||||||
 | 
					                            <input id="email" name="email" type="email" pInputText [(ngModel)]="selectedPatient.email"
 | 
				
			||||||
 | 
					                                placeholder="Enter email address" required email #email="ngModel" />
 | 
				
			||||||
 | 
					                            <small *ngIf="email.invalid && email.touched" class="p-error">Enter a valid email
 | 
				
			||||||
 | 
					                                address</small>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <div class="p-grid">
 | 
				
			||||||
 | 
					                    <!-- Age -->
 | 
				
			||||||
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
 | 
					                        <div class="field">
 | 
				
			||||||
 | 
					                            <label for="age">Age</label>
 | 
				
			||||||
 | 
					                            <input id="age" name="age" type="number" pInputText [(ngModel)]="selectedPatient.age"
 | 
				
			||||||
 | 
					                                placeholder="Enter age" required min="1" max="120" #age="ngModel" />
 | 
				
			||||||
 | 
					                            <small *ngIf="age.invalid && age.touched" class="p-error">
 | 
				
			||||||
 | 
					                                Age is required and must be between 1 and 90
 | 
				
			||||||
 | 
					                            </small>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    <!-- Status -->
 | 
				
			||||||
 | 
					                    <div class="p-col-6">
 | 
				
			||||||
 | 
					                        <div class="field">
 | 
				
			||||||
 | 
					                            <label for="status">Status</label>
 | 
				
			||||||
 | 
					                            <p-dropdown name="status" id="status" [options]="statuslist" [(ngModel)]="selectedstatus"
 | 
				
			||||||
 | 
					                                optionLabel="label" optionValue="value" placeholder="Select status"
 | 
				
			||||||
 | 
					                                required></p-dropdown>
 | 
				
			||||||
 | 
					                            <small *ngIf="selectedstatus === 0" class="p-error">Status is required</small>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <div class="p-fluid grid">
 | 
					            <div>
 | 
				
			||||||
                <!-- Doctor & Treatment -->
 | 
					 | 
				
			||||||
                <div class="col-6">
 | 
					 | 
				
			||||||
                    <div class="field">
 | 
					 | 
				
			||||||
                        <label for="doctorAssigned"><i class="pi pi-user-md"></i> Doctor Assigned</label>
 | 
					 | 
				
			||||||
                        <input id="doctorAssigned" name="doctorAssigned" type="text" pInputText
 | 
					 | 
				
			||||||
                            [(ngModel)]="selectedPatient.doctorAssigned" placeholder="Enter assigned doctor" />
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
                <div class="col-6">
 | 
					 | 
				
			||||||
                    <div class="field">
 | 
					 | 
				
			||||||
                        <label for="treatment"><i class="pi pi-heartbeat"></i> Treatment</label>
 | 
					 | 
				
			||||||
                        <input id="treatment" name="treatment" type="text" pInputText
 | 
					 | 
				
			||||||
                            [(ngModel)]="selectedPatient.treatment" placeholder="Enter treatment" />
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <div class="p-fluid grid">
 | 
					 | 
				
			||||||
                <!-- Blood Group & Email -->
 | 
					 | 
				
			||||||
                <div class="col-6">
 | 
					 | 
				
			||||||
                    <div class="field">
 | 
					 | 
				
			||||||
                        <label for="bloodGroup"><i class="pi pi-tint"></i> Blood Group</label>
 | 
					 | 
				
			||||||
                        <input id="bloodGroup" name="bloodGroup" type="text" pInputText
 | 
					 | 
				
			||||||
                            [(ngModel)]="selectedPatient.bloodGroup" placeholder="Enter blood group" required
 | 
					 | 
				
			||||||
                            #bloodGroup="ngModel" />
 | 
					 | 
				
			||||||
                        <small *ngIf="bloodGroup.invalid && bloodGroup.touched" class="p-error">Blood Group is
 | 
					 | 
				
			||||||
                            required</small>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
                <div class="col-6">
 | 
					 | 
				
			||||||
                    <div class="field">
 | 
					 | 
				
			||||||
                        <label for="email"><i class="pi pi-envelope"></i> Email</label>
 | 
					 | 
				
			||||||
                        <input id="email" name="email" type="email" pInputText [(ngModel)]="selectedPatient.email"
 | 
					 | 
				
			||||||
                            placeholder="Enter email address" required email #email="ngModel" />
 | 
					 | 
				
			||||||
                        <small *ngIf="email.invalid && email.touched" class="p-error">Enter a valid email
 | 
					 | 
				
			||||||
                            address</small>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <div class="text-right">
 | 
					 | 
				
			||||||
                <button type="submit" pButton class="btn btn-primary"
 | 
					                <button type="submit" pButton class="btn btn-primary"
 | 
				
			||||||
                    [disabled]="(patientrecord.invalid || selectedstatus === 0 || !selectedgender)">
 | 
					                    [disabled]="(patientrecord.invalid || selectedstatus === 0 || !selectedgender)">Save</button>
 | 
				
			||||||
                    <i class="pi pi-check"></i> Save
 | 
					                <button pButton class="btn btn-secondary ml-1" (click)="closeDialog()">Close</button>
 | 
				
			||||||
                </button>
 | 
					 | 
				
			||||||
                <button pButton class="btn btn-secondary ml-1" (click)="closeDialog()">
 | 
					 | 
				
			||||||
                    <i class="pi pi-times"></i> Close
 | 
					 | 
				
			||||||
                </button>
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </form>
 | 
					        </form>
 | 
				
			||||||
    </p-dialog>
 | 
					    </p-dialog>
 | 
				
			||||||
 | 
				
			|||||||
@ -26,12 +26,3 @@
 | 
				
			|||||||
    font-size: 1.2rem;
 | 
					    font-size: 1.2rem;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  .bg-pink {
 | 
					 | 
				
			||||||
    background-color: #ff4081 !important;
 | 
					 | 
				
			||||||
    color: white;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.gap-1 {
 | 
					 | 
				
			||||||
    gap: 5px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
import { PermissionService } from '@abp/ng.core';
 | 
					import { PermissionService } from '@abp/ng.core';
 | 
				
			||||||
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
 | 
					import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
 | 
				
			||||||
import { HttpClient, HttpEventType, HttpParams, HttpRequest } from '@angular/common/http';
 | 
					import { HttpClient } from '@angular/common/http';
 | 
				
			||||||
import { Component, OnInit } from '@angular/core';
 | 
					import { Component, OnInit } from '@angular/core';
 | 
				
			||||||
import { NgForm } from '@angular/forms';
 | 
					import { NgForm } from '@angular/forms';
 | 
				
			||||||
import { Router } from '@angular/router';
 | 
					import { Router } from '@angular/router';
 | 
				
			||||||
@ -8,7 +8,6 @@ import { PagingSortResultDto } from '@proxy/dto';
 | 
				
			|||||||
import { Gender, Status } from '@proxy/global-enum';
 | 
					import { Gender, Status } from '@proxy/global-enum';
 | 
				
			||||||
import { PatientService } from '@proxy/patients';
 | 
					import { PatientService } from '@proxy/patients';
 | 
				
			||||||
import { PatientDto, CreateUpdatePatientDto } from '@proxy/patients/dto';
 | 
					import { PatientDto, CreateUpdatePatientDto } from '@proxy/patients/dto';
 | 
				
			||||||
import { environment } from 'src/environments/environment';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Component({
 | 
					@Component({
 | 
				
			||||||
  selector: 'app-all-patients',
 | 
					  selector: 'app-all-patients',
 | 
				
			||||||
@ -39,7 +38,18 @@ export class AllPatientsComponent implements OnInit {
 | 
				
			|||||||
  error: string = '';
 | 
					  error: string = '';
 | 
				
			||||||
  imgpath: string = '';
 | 
					  imgpath: string = '';
 | 
				
			||||||
  guid: string = '00000000-0000-0000-0000-000000000000';
 | 
					  guid: string = '00000000-0000-0000-0000-000000000000';
 | 
				
			||||||
  uploadProgress = 0;
 | 
					  options: Partial<Confirmation.Options> = {
 | 
				
			||||||
 | 
					    hideCancelBtn: false,
 | 
				
			||||||
 | 
					    hideYesBtn: false,
 | 
				
			||||||
 | 
					    dismissible: false,
 | 
				
			||||||
 | 
					    cancelText: 'Close',
 | 
				
			||||||
 | 
					    // yesText: 'Confirm',
 | 
				
			||||||
 | 
					    messageLocalizationParams: ['Demo'],
 | 
				
			||||||
 | 
					    titleLocalizationParams: [],
 | 
				
			||||||
 | 
					    // You can customize icon
 | 
				
			||||||
 | 
					    // icon: 'fa fa-exclamation-triangle', // or
 | 
				
			||||||
 | 
					    // iconTemplate : '<img src="custom-image-path.jpg" alt=""/>'
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  constructor(
 | 
					  constructor(
 | 
				
			||||||
    private patientService: PatientService,
 | 
					    private patientService: PatientService,
 | 
				
			||||||
@ -93,7 +103,6 @@ export class AllPatientsComponent implements OnInit {
 | 
				
			|||||||
    this.imgpath = '';
 | 
					    this.imgpath = '';
 | 
				
			||||||
    this.selectedgender = 0;
 | 
					    this.selectedgender = 0;
 | 
				
			||||||
    this.selectedstatus = 0;
 | 
					    this.selectedstatus = 0;
 | 
				
			||||||
    this.uploadProgress = 0;
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  loadPatient(event: any) {
 | 
					  loadPatient(event: any) {
 | 
				
			||||||
@ -158,7 +167,6 @@ export class AllPatientsComponent implements OnInit {
 | 
				
			|||||||
      this.error = 'Please Type a Name';
 | 
					      this.error = 'Please Type a Name';
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    this.error = '';
 | 
					 | 
				
			||||||
    const input = event.target as HTMLInputElement;
 | 
					    const input = event.target as HTMLInputElement;
 | 
				
			||||||
    if (input.files.length > 0) {
 | 
					    if (input.files.length > 0) {
 | 
				
			||||||
      const tag = 'Image';
 | 
					      const tag = 'Image';
 | 
				
			||||||
@ -166,40 +174,14 @@ export class AllPatientsComponent implements OnInit {
 | 
				
			|||||||
      formdata.append('file', input.files[0]);
 | 
					      formdata.append('file', input.files[0]);
 | 
				
			||||||
      this.UploadFileData(tag, formdata);
 | 
					      this.UploadFileData(tag, formdata);
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      this.uploadProgress = 0;
 | 
					 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  UploadFileData(tag: string, formdata: FormData) {
 | 
					  UploadFileData(tag: string, formdata: FormData) {
 | 
				
			||||||
    // this.patientService.uploadFile(tag, formdata).subscribe(result => {
 | 
					    this.patientService.uploadFile(tag, formdata).subscribe(result => {
 | 
				
			||||||
    //   this.selectedPatient.imageID = result;
 | 
					      this.selectedPatient.imageID = result;
 | 
				
			||||||
    // });
 | 
					    });
 | 
				
			||||||
    const req = new HttpRequest(
 | 
					 | 
				
			||||||
      'POST',
 | 
					 | 
				
			||||||
      environment.apis.default.url + '/api/app/patient/upload-file',
 | 
					 | 
				
			||||||
      formdata,
 | 
					 | 
				
			||||||
      {
 | 
					 | 
				
			||||||
        reportProgress: true,
 | 
					 | 
				
			||||||
        responseType: 'text',
 | 
					 | 
				
			||||||
        params: new HttpParams().set('tagName', tag),
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
    this.http.request(req).subscribe(
 | 
					 | 
				
			||||||
      event => {
 | 
					 | 
				
			||||||
        if (event.type === HttpEventType.UploadProgress) {
 | 
					 | 
				
			||||||
          this.uploadProgress = Math.round((event.loaded / event.total!) * 100);
 | 
					 | 
				
			||||||
          console.log(event.type, this.uploadProgress);
 | 
					 | 
				
			||||||
        } else if (event.type === HttpEventType.Response) {
 | 
					 | 
				
			||||||
          this.uploadProgress = 100;
 | 
					 | 
				
			||||||
          this.selectedPatient.imageID = event.body.toString();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      error => {
 | 
					 | 
				
			||||||
        console.error('Upload failed', error);
 | 
					 | 
				
			||||||
        this.uploadProgress = 0;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  editPatient(Patient: any) {
 | 
					  editPatient(Patient: any) {
 | 
				
			||||||
 | 
				
			|||||||
@ -52,27 +52,30 @@
 | 
				
			|||||||
  </button>
 | 
					  </button>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="mt-4">
 | 
					<div>
 | 
				
			||||||
  <p-table #dt2 [value]="patientrecords" [paginator]="true" [rows]="10" [totalRecords]="totalRecords" [lazy]="true"
 | 
					  <p-table #dt2 dataKey="id" [value]="patientrecords" [paginator]="true" [rows]="10" [totalRecords]="totalRecords"
 | 
				
			||||||
    (onLazyLoad)="loadPatient($event,patientId)" [rowsPerPageOptions]="[10, 20, 50]" [responsiveLayout]="'scroll'"
 | 
					    [lazy]="true" (onLazyLoad)="loadPatient($event,patientId)" [rowsPerPageOptions]="[10, 20, 50]"
 | 
				
			||||||
    [globalFilterFields]="['id', 'name', 'diagnosis']" class="card shadow-sm">
 | 
					    [responsiveLayout]="'scroll'" [globalFilterFields]="['id', 'name', 'diagnosis']"
 | 
				
			||||||
 | 
					    [filters]="{ global: { value: '', matchMode: 'contains' } }" class="table table-striped">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <ng-template pTemplate="caption">
 | 
					    <ng-template pTemplate="caption">
 | 
				
			||||||
      <div class="flex justify-content-between align-items-center">
 | 
					      <div class="flex">
 | 
				
			||||||
        <h3>{{'::PatientHeader' | abpLocalization}}</h3>
 | 
					        <h2 class="mr-auto">{{'::PatientHeader' | abpLocalization}}</h2>
 | 
				
			||||||
        <div class="flex gap-2">
 | 
					        <div>
 | 
				
			||||||
          <button *ngIf="createpermission" pButton class="p-button-rounded p-button-success"
 | 
					          <button *ngIf="createpermission" pButton class="p-button-rounded p-button-success ml-2"
 | 
				
			||||||
            (click)="openNewPatientDialog()">
 | 
					            (click)="openNewPatientDialog()">
 | 
				
			||||||
            <i class="pi pi-plus-circle"></i>
 | 
					            <i class="pi pi-plus-circle"></i>
 | 
				
			||||||
          </button>
 | 
					          </button>
 | 
				
			||||||
          <button pButton class="p-button-rounded p-button-warning" (click)="exportPatient()">
 | 
					          <button pButton class="p-button-rounded p-button-warning ml-2" (click)="exportPatient()">
 | 
				
			||||||
            <i class="pi pi-download"></i>
 | 
					            <i class="pi pi-download"></i>
 | 
				
			||||||
          </button>
 | 
					          </button>
 | 
				
			||||||
          <span class="p-input-icon-left">
 | 
					          <p-iconField iconPosition="right" class="ml-2">
 | 
				
			||||||
            <i class="pi pi-search"></i>
 | 
					            <p-inputIcon>
 | 
				
			||||||
            <input pInputText type="text" [(ngModel)]="globalFilter"
 | 
					              <i class="pi pi-search"></i>
 | 
				
			||||||
              (input)="dt2.filterGlobal($event.target.value, 'contains')" placeholder="Search...">
 | 
					            </p-inputIcon>
 | 
				
			||||||
          </span>
 | 
					            <input pInputText type="text" (input)="dt2.filterGlobal($event.target.value, 'contains')"
 | 
				
			||||||
 | 
					              [(ngModel)]="globalFilter" placeholder="Search keyword" />
 | 
				
			||||||
 | 
					          </p-iconField>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </ng-template>
 | 
					    </ng-template>
 | 
				
			||||||
@ -80,14 +83,14 @@
 | 
				
			|||||||
    <ng-template pTemplate="header">
 | 
					    <ng-template pTemplate="header">
 | 
				
			||||||
      <tr>
 | 
					      <tr>
 | 
				
			||||||
        <th class="hidden" pSortableColumn="id">Patient ID <p-sortIcon field="id" /></th>
 | 
					        <th class="hidden" pSortableColumn="id">Patient ID <p-sortIcon field="id" /></th>
 | 
				
			||||||
        <th>Full Name</th>
 | 
					        <th pSortableColumn="fullName">Full Name <p-sortIcon field="fullName" /></th>
 | 
				
			||||||
        <th>Gender</th>
 | 
					        <th pSortableColumn="gender">Gender <p-sortIcon field="fullName" /></th>
 | 
				
			||||||
        <th pSortableColumn="dateOfAdmission">Date of Admission <p-sortIcon field="dateOfAdmission" /></th>
 | 
					        <th pSortableColumn="dateOfAdmission">Date of Admission <p-sortIcon field="dateOfAdmission" /></th>
 | 
				
			||||||
        <th pSortableColumn="diagnosis">Diagnosis <p-sortIcon field="diagnosis" /></th>
 | 
					        <th pSortableColumn="diagnosis">Diagnosis <p-sortIcon field="diagnosis" /></th>
 | 
				
			||||||
        <th>Lab Reports</th>
 | 
					        <th>Lab Reports</th>
 | 
				
			||||||
        <th>Medications</th>
 | 
					        <th>Medications</th>
 | 
				
			||||||
        <th pSortableColumn="nextFollowUp">Next Follow-Up <p-sortIcon field="nextFollowUp" /></th>
 | 
					        <th pSortableColumn="nextFollowUp">Next Follow-Up <p-sortIcon field="nextFollowUp" /></th>
 | 
				
			||||||
        <th>Status</th>
 | 
					        <th pSortableColumn="status">Status <p-sortIcon field="status" /></th>
 | 
				
			||||||
        <th>Actions</th>
 | 
					        <th>Actions</th>
 | 
				
			||||||
      </tr>
 | 
					      </tr>
 | 
				
			||||||
    </ng-template>
 | 
					    </ng-template>
 | 
				
			||||||
@ -103,141 +106,173 @@
 | 
				
			|||||||
        </td>
 | 
					        </td>
 | 
				
			||||||
        <td>{{ patientrecord.dateOfAdmission | date }}</td>
 | 
					        <td>{{ patientrecord.dateOfAdmission | date }}</td>
 | 
				
			||||||
        <td>{{ patientrecord.diagnosis }}</td>
 | 
					        <td>{{ patientrecord.diagnosis }}</td>
 | 
				
			||||||
        <td><i class="pi pi-file-pdf text-danger"></i></td>
 | 
					        <td><i class="pi pi-file-pdf pdf-icon"></i></td>
 | 
				
			||||||
        <td><i class="pi pi-file-pdf text-primary"></i></td>
 | 
					        <td><i class="pi pi-file-pdf pdf-icon"></i></td>
 | 
				
			||||||
        <td>{{ patientrecord.nextFollowUp | date }}</td>
 | 
					        <td>{{ patientrecord.nextFollowUp | date }}</td>
 | 
				
			||||||
        <td>
 | 
					        <td>{{ status[patientrecord.patients.status] }}</td>
 | 
				
			||||||
          <span class="badge"
 | 
					        <td class="d-flex">
 | 
				
			||||||
            [ngClass]="patientrecord.patients.status === 1 ? 'bg-success' : (patientrecord.patients.status === 2 ? 'bg-primary':'bg-danger')">
 | 
					          <button *ngIf="editpermission" class="btn btn-warning btn-sm" (click)="editPatient(patientrecord)"><i
 | 
				
			||||||
            {{ status[patientrecord.patients.status] }}
 | 
					              class="pi pi-pencil"></i></button>
 | 
				
			||||||
          </span>
 | 
					          <button *ngIf="deletepermission" class="btn btn-danger btn-sm ml-1"
 | 
				
			||||||
        </td>
 | 
					            (click)="deletePatient(patientrecord.id)"><i class="pi pi-trash"></i></button>
 | 
				
			||||||
        <td class="flex gap-2">
 | 
					 | 
				
			||||||
          <button *ngIf="editpermission" class="btn btn-warning btn-sm" (click)="editPatient(patientrecord)">
 | 
					 | 
				
			||||||
            <i class="pi pi-pencil"></i>
 | 
					 | 
				
			||||||
          </button>
 | 
					 | 
				
			||||||
          <button *ngIf="deletepermission" class="btn btn-danger btn-sm" (click)="deletePatient(patientrecord.id)">
 | 
					 | 
				
			||||||
            <i class="pi pi-trash"></i>
 | 
					 | 
				
			||||||
          </button>
 | 
					 | 
				
			||||||
        </td>
 | 
					        </td>
 | 
				
			||||||
      </tr>
 | 
					      </tr>
 | 
				
			||||||
    </ng-template>
 | 
					    </ng-template>
 | 
				
			||||||
 | 
					 | 
				
			||||||
    <ng-template pTemplate="emptymessage">
 | 
					    <ng-template pTemplate="emptymessage">
 | 
				
			||||||
      <tr>
 | 
					      <tr>
 | 
				
			||||||
        <td colspan="9">No Patients found.</td>
 | 
					        <td colspan="11">No Patients found.</td>
 | 
				
			||||||
      </tr>
 | 
					      </tr>
 | 
				
			||||||
    </ng-template>
 | 
					    </ng-template>
 | 
				
			||||||
  </p-table>
 | 
					  </p-table>
 | 
				
			||||||
  <div class="mt-2">Total Records: {{totalRecords}}</div>
 | 
					  <span>Total Records: {{totalRecords}}</span>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
<div>
 | 
					<div>
 | 
				
			||||||
  <p-dialog *ngIf="patientDialog" header="{{patientDialogTitle}}" [(visible)]="patientDialog" [modal]="true"
 | 
					  <p-dialog *ngIf="patientDialog" header="{{patientDialogTitle}}" [(visible)]="patientDialog" [modal]="true"
 | 
				
			||||||
    [closable]="true" [style]="{width: '70%', height: 'auto'}">
 | 
					    [closable]="true" [style]="{width: '85%', height: '100%'}">
 | 
				
			||||||
    <form #patientrecord="ngForm" (ngSubmit)="savePatient(patientrecord)" novalidate>
 | 
					    <form #patientrecord="ngForm" (ngSubmit)="savePatient(patientrecord)" novalidate>
 | 
				
			||||||
      <div class="p-fluid grid">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <!-- Admission Date -->
 | 
					 | 
				
			||||||
        <div class="col-6">
 | 
					 | 
				
			||||||
          <div class="field">
 | 
					 | 
				
			||||||
            <label for="admissionDate"><i class="pi pi-calendar"></i> Admission Date</label>
 | 
					 | 
				
			||||||
            <p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectdateOfAdmission" showIcon required
 | 
					 | 
				
			||||||
              #admissionDate="ngModel"></p-calendar>
 | 
					 | 
				
			||||||
            <small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
 | 
					 | 
				
			||||||
              Admission Date is required.
 | 
					 | 
				
			||||||
            </small>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <!-- Next Follow-Up Date -->
 | 
					 | 
				
			||||||
        <div class="col-6">
 | 
					 | 
				
			||||||
          <div class="field">
 | 
					 | 
				
			||||||
            <label for="nextFollowUp"><i class="pi pi-calendar-plus"></i> Next Follow-Up Date</label>
 | 
					 | 
				
			||||||
            <p-calendar id="nextFollowUp" name="nextFollowUp" [(ngModel)]="selectnextFollowUp" showIcon required
 | 
					 | 
				
			||||||
              #nextFollowUp="ngModel"></p-calendar>
 | 
					 | 
				
			||||||
            <small *ngIf="nextFollowUp.invalid && nextFollowUp.touched" class="p-error">
 | 
					 | 
				
			||||||
              Next Follow-Up Date is required.
 | 
					 | 
				
			||||||
            </small>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <!-- File Uploads -->
 | 
					 | 
				
			||||||
      <div class="p-fluid grid">
 | 
					 | 
				
			||||||
        <div class="col-6">
 | 
					 | 
				
			||||||
          <div class="field">
 | 
					 | 
				
			||||||
            <label for="labReport"><i class="pi pi-file-pdf"></i> Lab Report</label>
 | 
					 | 
				
			||||||
            <input type="file" id="labReport" name="labReport" accept=".pdf,.doc,.docx"
 | 
					 | 
				
			||||||
              (change)="handleUpload($event,'Lab-Report')" />
 | 
					 | 
				
			||||||
            <div *ngIf="uploadProgress1 > 0">
 | 
					 | 
				
			||||||
              <p>Uploading... {{ uploadProgress1 }}%</p>
 | 
					 | 
				
			||||||
              <progress [value]="uploadProgress1" max="100"></progress>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            <small *ngIf="labReportUrlpath!==''">{{labReportUrlpath}} <i class="pi pi-file"></i></small>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <div class="col-6">
 | 
					 | 
				
			||||||
          <div class="field">
 | 
					 | 
				
			||||||
            <label for="medications"><i class="pi pi-file-pdf"></i> Medications</label>
 | 
					 | 
				
			||||||
            <input type="file" id="medications" name="medications" accept=".pdf,.doc,.docx"
 | 
					 | 
				
			||||||
              (change)="handleUpload($event,'Medication')" />
 | 
					 | 
				
			||||||
            <div *ngIf="uploadProgress2 > 0">
 | 
					 | 
				
			||||||
              <p>Uploading... {{ uploadProgress2 }}%</p>
 | 
					 | 
				
			||||||
              <progress [value]="uploadProgress2" max="100"></progress>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            <small *ngIf="medicationUrlpath!==''">{{medicationUrlpath}} <i class="pi pi-file"></i></small>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <div class="col-6">
 | 
					 | 
				
			||||||
          <div class="field">
 | 
					 | 
				
			||||||
            <label for="medicationHistory"><i class="pi pi-file-pdf"></i>Medication History</label>
 | 
					 | 
				
			||||||
            <input type="file" id="medicationHistory" name="medicationHistory" accept=".pdf,.doc,.docx"
 | 
					 | 
				
			||||||
              (change)="handleUpload($event,'Medication-History')" />
 | 
					 | 
				
			||||||
            <div *ngIf="uploadProgress3 > 0">
 | 
					 | 
				
			||||||
              <p>Uploading... {{ uploadProgress3 }}%</p>
 | 
					 | 
				
			||||||
              <progress [value]="uploadProgress3" max="100"></progress>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            <small *ngIf="medicationHistoryUrlpath !==''">{{medicationHistoryUrlpath}} <i
 | 
					 | 
				
			||||||
                class="pi pi-file-pdf pdf-icon"></i></small>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <!-- Diagnosis -->
 | 
					 | 
				
			||||||
      <div class="p-fluid">
 | 
					      <div class="p-fluid">
 | 
				
			||||||
        <div class="field">
 | 
					        <div class="p-grid">
 | 
				
			||||||
          <label for="diagnosis"><i class="pi pi-heartbeat"></i> Diagnosis</label>
 | 
					          <!-- <div class="p-col-6">
 | 
				
			||||||
          <textarea style="width: 100%; background-color: #fff; color: black;" id="diagnosis" name="diagnosis"
 | 
					            <div class="field">
 | 
				
			||||||
            pInputTextarea rows="5" cols="30" [(ngModel)]="selectedPatient.diagnosis" required
 | 
					              <label for="fullname">Full Name</label>
 | 
				
			||||||
            #diagnosis="ngModel"></textarea>
 | 
					              <input id="fullname" name="fullname" type="text" autocomplete="off" pInputText
 | 
				
			||||||
          <small *ngIf="diagnosis.invalid && diagnosis.touched" class="p-error">
 | 
					                [(ngModel)]="selectedPatient.fullName" placeholder="Enter full patient name" required
 | 
				
			||||||
            Diagnosis is required.
 | 
					                #fullname="ngModel" />
 | 
				
			||||||
          </small>
 | 
					              <small *ngIf="fullname.invalid && fullname.touched" class="p-error">
 | 
				
			||||||
 | 
					                Full Name is required.
 | 
				
			||||||
 | 
					              </small>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div> -->
 | 
				
			||||||
 | 
					          <!-- <div class="p-col-6">
 | 
				
			||||||
 | 
					            <div class="field">
 | 
				
			||||||
 | 
					              <label for="mobile">Mobile</label>
 | 
				
			||||||
 | 
					              <input id="mobile" name="mobile" type="text" autocomplete="off" pInputText
 | 
				
			||||||
 | 
					                [(ngModel)]="selectedPatient.mobile" maxlength="10" pattern="^[0-9]{10}$"
 | 
				
			||||||
 | 
					                placeholder="Enter mobile number" required #mobile="ngModel" />
 | 
				
			||||||
 | 
					              <small *ngIf="mobile.invalid && mobile.touched" class="p-error">
 | 
				
			||||||
 | 
					                Mobile number is required and must be 10 digits.
 | 
				
			||||||
 | 
					              </small>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div> -->
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <div class="p-grid">
 | 
				
			||||||
 | 
					          <div class="p-col-6">
 | 
				
			||||||
 | 
					            <!-- <div class="field">
 | 
				
			||||||
 | 
					              <label for="gender">Gender</label>
 | 
				
			||||||
 | 
					              <div>
 | 
				
			||||||
 | 
					                <label class="mx-1">
 | 
				
			||||||
 | 
					                  <input style="background-color: #fff;" id="male" type="radio" name="gender"
 | 
				
			||||||
 | 
					                    [(ngModel)]="selectedgender" [value]="1" required #gender="ngModel" />
 | 
				
			||||||
 | 
					                  Male
 | 
				
			||||||
 | 
					                </label>
 | 
				
			||||||
 | 
					                <label>
 | 
				
			||||||
 | 
					                  <input style="background-color: #fff;" id="female" type="radio" name="gender"
 | 
				
			||||||
 | 
					                    [(ngModel)]="selectedgender" [value]="2" required />
 | 
				
			||||||
 | 
					                  Female
 | 
				
			||||||
 | 
					                </label>
 | 
				
			||||||
 | 
					                <small *ngIf="!selectedgender" class="p-error">
 | 
				
			||||||
 | 
					                  Please select a gender.
 | 
				
			||||||
 | 
					                </small>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					            </div> -->
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					          <div class="p-col-6">
 | 
				
			||||||
 | 
					            <div class="field">
 | 
				
			||||||
 | 
					              <label for="admissionDate">Admission Date</label>
 | 
				
			||||||
 | 
					              <p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectdateOfAdmission" showIcon required
 | 
				
			||||||
 | 
					                #admissionDate="ngModel"></p-calendar>
 | 
				
			||||||
 | 
					              <small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
 | 
				
			||||||
 | 
					                Admission Date is required.
 | 
				
			||||||
 | 
					              </small>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <div class="p-grid">
 | 
				
			||||||
 | 
					          <div class="p-col-6">
 | 
				
			||||||
 | 
					            <div class="field">
 | 
				
			||||||
 | 
					              <label for="labReport">Lab Report</label>
 | 
				
			||||||
 | 
					              <input type="file" id="labReport" name="labReport" accept=".pdf,.doc,.docx"
 | 
				
			||||||
 | 
					                (change)="handleLabReportUpload($event)" />
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <small *ngIf="labReportUrlpath !==''">{{labReportUrlpath}} <i class="pi pi-file-pdf pdf-icon"></i></small>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					          <div class="p-col-6">
 | 
				
			||||||
 | 
					            <div class="field">
 | 
				
			||||||
 | 
					              <label for="medications">Medications</label>
 | 
				
			||||||
 | 
					              <input type="file" id="medications" name="medications" accept=".pdf,.doc,.docx"
 | 
				
			||||||
 | 
					                (change)="handleMedicationsUpload($event)" />
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <small *ngIf="medicationUrlpath !==''">{{medicationUrlpath}} <i class="pi pi-file-pdf pdf-icon"></i></small>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <div class="p-grid">
 | 
				
			||||||
 | 
					          <div class="p-col-6">
 | 
				
			||||||
 | 
					            <div class="field">
 | 
				
			||||||
 | 
					              <label for="medicationHistory">Medication History</label>
 | 
				
			||||||
 | 
					              <input type="file" id="medicationHistory" name="medicationHistory" accept=".pdf,.doc,.docx"
 | 
				
			||||||
 | 
					                (change)="handleMedicationHistoryUpload($event)" />
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <small *ngIf="medicationHistoryUrlpath !==''">{{medicationHistoryUrlpath}} <i class="pi pi-file-pdf pdf-icon"></i></small>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					          <div class="p-col-6">
 | 
				
			||||||
 | 
					            <div class="field">
 | 
				
			||||||
 | 
					              <label for="nextFollowUp">Next FollowUp Date</label>
 | 
				
			||||||
 | 
					              <p-calendar id="nextFollowUp" name="nextFollowUp" [(ngModel)]="selectnextFollowUp" showIcon required
 | 
				
			||||||
 | 
					                #nextFollowUp="ngModel"></p-calendar>
 | 
				
			||||||
 | 
					              <small *ngIf="nextFollowUp.invalid && nextFollowUp.touched" class="p-error">
 | 
				
			||||||
 | 
					                Next Follow-Up Date is required.
 | 
				
			||||||
 | 
					              </small>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <div class="p-grid">
 | 
				
			||||||
 | 
					          <div class="p-col-12">
 | 
				
			||||||
 | 
					            <div class="field">
 | 
				
			||||||
 | 
					              <div>
 | 
				
			||||||
 | 
					                <label for="diagnosis">Diagnosis</label>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              <textarea style="width: 100%; background-color: #fff; color: black;" id="diagnosis" name="diagnosis"
 | 
				
			||||||
 | 
					                pInputTextarea rows="5" cols="30" [(ngModel)]="selectedPatient.diagnosis" required
 | 
				
			||||||
 | 
					                #diagnosis="ngModel"></textarea>
 | 
				
			||||||
 | 
					              <small *ngIf="diagnosis.invalid && diagnosis.touched" class="p-error">
 | 
				
			||||||
 | 
					                Diagnosis is required.
 | 
				
			||||||
 | 
					              </small>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <div class="p-grid">
 | 
				
			||||||
 | 
					          <div class="p-col-6">
 | 
				
			||||||
 | 
					            <div class="field">
 | 
				
			||||||
 | 
					              <label for="insuranceProvider">Insurance Provider</label>
 | 
				
			||||||
 | 
					              <input id="insuranceProvider" name="insuranceProvider" type="text" autocomplete="off" pInputText
 | 
				
			||||||
 | 
					                [(ngModel)]="selectedPatient.insuranceProvider" required placeholder="Enter insurance provider"
 | 
				
			||||||
 | 
					                #insurance="ngModel" />
 | 
				
			||||||
 | 
					              <small *ngIf="insurance.invalid && insurance.touched" class="p-error">
 | 
				
			||||||
 | 
					                Insurance is required.
 | 
				
			||||||
 | 
					              </small>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					          <div class="p-col-6">
 | 
				
			||||||
 | 
					            <!-- <div class="field">
 | 
				
			||||||
 | 
					              <label for="status">Status</label>
 | 
				
			||||||
 | 
					              <p-dropdown name="status" id="status" [options]="statuslist" [(ngModel)]="selectedstatus"
 | 
				
			||||||
 | 
					                optionLabel="label" optionValue="value" placeholder="Select status" required
 | 
				
			||||||
 | 
					                #status="ngModel"></p-dropdown>
 | 
				
			||||||
 | 
					              <small *ngIf="selectedstatus === 0" class="p-error">
 | 
				
			||||||
 | 
					                Status is required.
 | 
				
			||||||
 | 
					              </small>
 | 
				
			||||||
 | 
					            </div> -->
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div>
 | 
				
			||||||
      <!-- Insurance Provider -->
 | 
					        <button type="submit" pButton class="btn btn-primary" [disabled]="patientrecord.invalid">Save</button>
 | 
				
			||||||
      <div class="p-fluid">
 | 
					        <button pButton class="btn btn-secondary ml-1" (click)="closeDialog()">Close</button>
 | 
				
			||||||
        <div class="field">
 | 
					 | 
				
			||||||
          <label for="insuranceProvider"><i class="pi pi-credit-card"></i> Insurance Provider</label>
 | 
					 | 
				
			||||||
          <input id="insuranceProvider" name="insuranceProvider" type="text" pInputText
 | 
					 | 
				
			||||||
            [(ngModel)]="selectedPatient.insuranceProvider" required placeholder="Enter insurance provider"
 | 
					 | 
				
			||||||
            #insurance="ngModel" />
 | 
					 | 
				
			||||||
          <small *ngIf="insurance.invalid && insurance.touched" class="p-error">
 | 
					 | 
				
			||||||
            Insurance is required.
 | 
					 | 
				
			||||||
          </small>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <!-- Buttons -->
 | 
					 | 
				
			||||||
      <div class="p-dialog-footer flex justify-content-end">
 | 
					 | 
				
			||||||
        <button type="submit" pButton class="btn btn-primary" [disabled]="patientrecord.invalid">
 | 
					 | 
				
			||||||
          <i class="pi pi-check"></i> Save
 | 
					 | 
				
			||||||
        </button>
 | 
					 | 
				
			||||||
        <button pButton class="btn btn-secondary ml-2" (click)="closeDialog()">
 | 
					 | 
				
			||||||
          <i class="pi pi-times"></i> Close
 | 
					 | 
				
			||||||
        </button>
 | 
					 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </form>
 | 
					    </form>
 | 
				
			||||||
  </p-dialog>
 | 
					  </p-dialog>
 | 
				
			||||||
 | 
				
			|||||||
@ -18,8 +18,7 @@
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  .female {
 | 
					  .female {
 | 
				
			||||||
    background-color: #ff4081 !important;
 | 
					    background-color: purple;
 | 
				
			||||||
    color: white;
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  .pdf-icon {
 | 
					  .pdf-icon {
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,6 @@ import { PermissionService } from '@abp/ng.core';
 | 
				
			|||||||
import { ActivatedRoute, Router } from '@angular/router';
 | 
					import { ActivatedRoute, Router } from '@angular/router';
 | 
				
			||||||
import { environment } from 'src/environments/environment';
 | 
					import { environment } from 'src/environments/environment';
 | 
				
			||||||
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
 | 
					import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
 | 
				
			||||||
import { HttpClient, HttpEventType, HttpParams, HttpRequest } from '@angular/common/http';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Component({
 | 
					@Component({
 | 
				
			||||||
  selector: 'app-patient-record',
 | 
					  selector: 'app-patient-record',
 | 
				
			||||||
@ -41,9 +40,18 @@ export class PatientRecordComponent implements OnInit {
 | 
				
			|||||||
  medicationHistoryUrlpath: string;
 | 
					  medicationHistoryUrlpath: string;
 | 
				
			||||||
  medicationUrlpath: string;
 | 
					  medicationUrlpath: string;
 | 
				
			||||||
  guid: string = '00000000-0000-0000-0000-000000000000';
 | 
					  guid: string = '00000000-0000-0000-0000-000000000000';
 | 
				
			||||||
  uploadProgress1 = 0;
 | 
					  options: Partial<Confirmation.Options> = {
 | 
				
			||||||
  uploadProgress2 = 0;
 | 
					    hideCancelBtn: false,
 | 
				
			||||||
  uploadProgress3 = 0;
 | 
					    hideYesBtn: false,
 | 
				
			||||||
 | 
					    dismissible: false,
 | 
				
			||||||
 | 
					    cancelText: 'Close',
 | 
				
			||||||
 | 
					    yesText: 'Confirm',
 | 
				
			||||||
 | 
					    messageLocalizationParams: ['Demo'],
 | 
				
			||||||
 | 
					    titleLocalizationParams: [],
 | 
				
			||||||
 | 
					    // You can customize icon
 | 
				
			||||||
 | 
					    // icon: 'fa fa-exclamation-triangle', // or
 | 
				
			||||||
 | 
					    // iconTemplate : '<img src="custom-image-path.jpg" alt=""/>'
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  constructor(
 | 
					  constructor(
 | 
				
			||||||
    private patientService: PatientService,
 | 
					    private patientService: PatientService,
 | 
				
			||||||
@ -51,8 +59,7 @@ export class PatientRecordComponent implements OnInit {
 | 
				
			|||||||
    private permissionChecker: PermissionService,
 | 
					    private permissionChecker: PermissionService,
 | 
				
			||||||
    private toaster: ToasterService,
 | 
					    private toaster: ToasterService,
 | 
				
			||||||
    private route: ActivatedRoute,
 | 
					    private route: ActivatedRoute,
 | 
				
			||||||
    private router: Router,
 | 
					    private router: Router
 | 
				
			||||||
    private http: HttpClient
 | 
					 | 
				
			||||||
  ) {}
 | 
					  ) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ngOnInit() {
 | 
					  ngOnInit() {
 | 
				
			||||||
@ -96,9 +103,6 @@ export class PatientRecordComponent implements OnInit {
 | 
				
			|||||||
    this.medicationHistoryUrlpath = '';
 | 
					    this.medicationHistoryUrlpath = '';
 | 
				
			||||||
    this.selectdateOfAdmission = new Date();
 | 
					    this.selectdateOfAdmission = new Date();
 | 
				
			||||||
    this.selectnextFollowUp = new Date();
 | 
					    this.selectnextFollowUp = new Date();
 | 
				
			||||||
    this.uploadProgress1 = 0;
 | 
					 | 
				
			||||||
    this.uploadProgress2 = 0;
 | 
					 | 
				
			||||||
    this.uploadProgress3 = 0;
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  loadPatient(event: any, id: any) {
 | 
					  loadPatient(event: any, id: any) {
 | 
				
			||||||
@ -118,6 +122,7 @@ export class PatientRecordComponent implements OnInit {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
    this.patientService.getPatientRecordList(this.params, id).subscribe(data => {
 | 
					    this.patientService.getPatientRecordList(this.params, id).subscribe(data => {
 | 
				
			||||||
      this.patientrecords = data.items;
 | 
					      this.patientrecords = data.items;
 | 
				
			||||||
 | 
					      // console.log(data.items);
 | 
				
			||||||
      this.totalRecords = data.totalCount;
 | 
					      this.totalRecords = data.totalCount;
 | 
				
			||||||
      this.loading = false;
 | 
					      this.loading = false;
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
@ -196,113 +201,50 @@ export class PatientRecordComponent implements OnInit {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  handleUpload(event: Event, tag: string): void {
 | 
					  handleLabReportUpload(event: Event): void {
 | 
				
			||||||
    const input = event.target as HTMLInputElement;
 | 
					    const input = event.target as HTMLInputElement;
 | 
				
			||||||
    if (input.files.length > 0) {
 | 
					    if (input && input.files) {
 | 
				
			||||||
 | 
					      const tag = 'Lab-Report';
 | 
				
			||||||
      const formdata = new FormData();
 | 
					      const formdata = new FormData();
 | 
				
			||||||
      formdata.append('file', input.files[0]);
 | 
					      formdata.append('file', input.files[0]);
 | 
				
			||||||
      this.UploadFileData(tag, formdata);
 | 
					      this.UploadFileData(tag, formdata);
 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
      this.uploadProgress1 = 0;
 | 
					 | 
				
			||||||
      this.uploadProgress2 = 0;
 | 
					 | 
				
			||||||
      this.uploadProgress3 = 0;
 | 
					 | 
				
			||||||
      return;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // handleLabReportUpload(event: Event): void {
 | 
					  handleMedicationsUpload(event: any): void {
 | 
				
			||||||
  //   const input = event.target as HTMLInputElement;
 | 
					    const input = event.target as HTMLInputElement;
 | 
				
			||||||
  //   if (input && input.files) {
 | 
					    if (input && input.files) {
 | 
				
			||||||
  //     const tag = 'Lab-Report';
 | 
					      const tag = 'Medication';
 | 
				
			||||||
  //     const formdata = new FormData();
 | 
					      const formdata = new FormData();
 | 
				
			||||||
  //     formdata.append('file', input.files[0]);
 | 
					      formdata.append('file', input.files[0]);
 | 
				
			||||||
  //     this.UploadFileData(tag, formdata);
 | 
					      this.UploadFileData(tag, formdata);
 | 
				
			||||||
  //   }
 | 
					    }
 | 
				
			||||||
  // }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // handleMedicationsUpload(event: any): void {
 | 
					  handleMedicationHistoryUpload(event: any): void {
 | 
				
			||||||
  //   const input = event.target as HTMLInputElement;
 | 
					    const input = event.target as HTMLInputElement;
 | 
				
			||||||
  //   if (input && input.files) {
 | 
					    if (input && input.files) {
 | 
				
			||||||
  //     const tag = 'Medication';
 | 
					      const tag = 'Medication-History';
 | 
				
			||||||
  //     const formdata = new FormData();
 | 
					      const formdata = new FormData();
 | 
				
			||||||
  //     formdata.append('file', input.files[0]);
 | 
					      formdata.append('file', input.files[0]);
 | 
				
			||||||
  //     this.UploadFileData(tag, formdata);
 | 
					      this.UploadFileData(tag, formdata);
 | 
				
			||||||
  //   }
 | 
					    }
 | 
				
			||||||
  // }
 | 
					  }
 | 
				
			||||||
 | 
					 | 
				
			||||||
  // handleMedicationHistoryUpload(event: any): void {
 | 
					 | 
				
			||||||
  //   const input = event.target as HTMLInputElement;
 | 
					 | 
				
			||||||
  //   if (input && input.files) {
 | 
					 | 
				
			||||||
  //     const tag = 'Medication-History';
 | 
					 | 
				
			||||||
  //     const formdata = new FormData();
 | 
					 | 
				
			||||||
  //     formdata.append('file', input.files[0]);
 | 
					 | 
				
			||||||
  //     this.UploadFileData(tag, formdata);
 | 
					 | 
				
			||||||
  //   }
 | 
					 | 
				
			||||||
  // }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  UploadFileData(tag: string, formdata: FormData) {
 | 
					  UploadFileData(tag: string, formdata: FormData) {
 | 
				
			||||||
    // this.patientService.uploadFile(tag, formdata).subscribe(result => {
 | 
					    this.patientService.uploadFile(tag, formdata).subscribe(result => {
 | 
				
			||||||
    //   switch (tag) {
 | 
					      switch (tag) {
 | 
				
			||||||
    //     case 'Lab-Report':
 | 
					        case 'Lab-Report':
 | 
				
			||||||
    //       this.selectedPatient.labReportUrlID = result;
 | 
					          this.selectedPatient.labReportUrlID = result;
 | 
				
			||||||
    //       break;
 | 
					          break;
 | 
				
			||||||
    //     case 'Medication':
 | 
					        case 'Medication':
 | 
				
			||||||
    //       this.selectedPatient.medicationUrlID = result;
 | 
					          this.selectedPatient.medicationUrlID = result;
 | 
				
			||||||
    //       break;
 | 
					          break;
 | 
				
			||||||
    //     case 'Medication-History':
 | 
					        case 'Medication-History':
 | 
				
			||||||
    //       this.selectedPatient.medicationHistoryUrlID = result;
 | 
					          this.selectedPatient.medicationHistoryUrlID = result;
 | 
				
			||||||
    //       break;
 | 
					          break;
 | 
				
			||||||
    //   }
 | 
					 | 
				
			||||||
    // });
 | 
					 | 
				
			||||||
    const req = new HttpRequest(
 | 
					 | 
				
			||||||
      'POST',
 | 
					 | 
				
			||||||
      environment.apis.default.url + '/api/app/patient/upload-file',
 | 
					 | 
				
			||||||
      formdata,
 | 
					 | 
				
			||||||
      {
 | 
					 | 
				
			||||||
        reportProgress: true,
 | 
					 | 
				
			||||||
        responseType: 'text',
 | 
					 | 
				
			||||||
        params: new HttpParams().set('tagName', tag),
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    );
 | 
					    });
 | 
				
			||||||
    this.http.request(req).subscribe(
 | 
					 | 
				
			||||||
      event => {
 | 
					 | 
				
			||||||
        if (event.type === HttpEventType.UploadProgress) {
 | 
					 | 
				
			||||||
          // this.uploadProgress = Math.round((event.loaded / event.total!) * 100);
 | 
					 | 
				
			||||||
          switch (tag) {
 | 
					 | 
				
			||||||
            case 'Lab-Report':
 | 
					 | 
				
			||||||
              this.uploadProgress1 = Math.round((event.loaded / event.total!) * 100);
 | 
					 | 
				
			||||||
              break;
 | 
					 | 
				
			||||||
            case 'Medication':
 | 
					 | 
				
			||||||
              this.uploadProgress2 = Math.round((event.loaded / event.total!) * 100);
 | 
					 | 
				
			||||||
              break;
 | 
					 | 
				
			||||||
            case 'Medication-History':
 | 
					 | 
				
			||||||
              this.uploadProgress3 = Math.round((event.loaded / event.total!) * 100);
 | 
					 | 
				
			||||||
              break;
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        } else if (event.type === HttpEventType.Response) {
 | 
					 | 
				
			||||||
          switch (tag) {
 | 
					 | 
				
			||||||
            case 'Lab-Report':
 | 
					 | 
				
			||||||
              this.uploadProgress1 = 100;
 | 
					 | 
				
			||||||
              this.selectedPatient.labReportUrlID = event.body.toString();
 | 
					 | 
				
			||||||
              break;
 | 
					 | 
				
			||||||
            case 'Medication':
 | 
					 | 
				
			||||||
              this.uploadProgress2 = 100;
 | 
					 | 
				
			||||||
              this.selectedPatient.medicationUrlID = event.body.toString();
 | 
					 | 
				
			||||||
              break;
 | 
					 | 
				
			||||||
            case 'Medication-History':
 | 
					 | 
				
			||||||
              this.uploadProgress3 = 100;
 | 
					 | 
				
			||||||
              this.selectedPatient.medicationHistoryUrlID = event.body.toString();
 | 
					 | 
				
			||||||
              break;
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      error => {
 | 
					 | 
				
			||||||
        console.error('Upload failed', error);
 | 
					 | 
				
			||||||
        this.uploadProgress1 = 100;
 | 
					 | 
				
			||||||
        this.uploadProgress2 = 100;
 | 
					 | 
				
			||||||
        this.uploadProgress3 = 100;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  savePatient(form: NgForm) {
 | 
					  savePatient(form: NgForm) {
 | 
				
			||||||
 | 
				
			|||||||
@ -17,10 +17,6 @@ export interface AppointmentDto {
 | 
				
			|||||||
  timeOfAppointment?: string;
 | 
					  timeOfAppointment?: string;
 | 
				
			||||||
  injuryORContion?: string;
 | 
					  injuryORContion?: string;
 | 
				
			||||||
  note?: string;
 | 
					  note?: string;
 | 
				
			||||||
  insuranceProvider?: string;
 | 
					 | 
				
			||||||
  appointmentStatus: appointmentStatus;
 | 
					 | 
				
			||||||
  visitType: visitType;
 | 
					 | 
				
			||||||
  paymentStatus: paymentStatus;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface CreateOrUpdateAppointmentDto {
 | 
					export interface CreateOrUpdateAppointmentDto {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
 | 
				
			|||||||
import type { PagedResultDto } from '../abp/application/services/dto/models';
 | 
					import type { PagedResultDto } from '../abp/application/services/dto/models';
 | 
				
			||||||
import type { AppointmentDto, CreateOrUpdateAppointmentDto } from '../appoinments/dto/models';
 | 
					import type { AppointmentDto, CreateOrUpdateAppointmentDto } from '../appoinments/dto/models';
 | 
				
			||||||
import type { PagingSortResultDto } from '../dto/models';
 | 
					import type { PagingSortResultDto } from '../dto/models';
 | 
				
			||||||
 | 
					import type { PatientRecordDto } from '../patients/dto/models';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable({
 | 
					@Injectable({
 | 
				
			||||||
  providedIn: 'root',
 | 
					  providedIn: 'root',
 | 
				
			||||||
@ -20,14 +21,6 @@ export class AppointmentService {
 | 
				
			|||||||
    { apiName: this.apiName,...config });
 | 
					    { apiName: this.apiName,...config });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  deleteAppointmentRecord = (id: string, config?: Partial<Rest.Config>) =>
 | 
					 | 
				
			||||||
    this.restService.request<any, void>({
 | 
					 | 
				
			||||||
      method: 'DELETE',
 | 
					 | 
				
			||||||
      url: `/api/app/appointment/${id}/appointment-record`,
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    { apiName: this.apiName,...config });
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  get = (config?: Partial<Rest.Config>) =>
 | 
					  get = (config?: Partial<Rest.Config>) =>
 | 
				
			||||||
    this.restService.request<any, string>({
 | 
					    this.restService.request<any, string>({
 | 
				
			||||||
      method: 'GET',
 | 
					      method: 'GET',
 | 
				
			||||||
@ -37,14 +30,6 @@ export class AppointmentService {
 | 
				
			|||||||
    { apiName: this.apiName,...config });
 | 
					    { apiName: this.apiName,...config });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  getAppointmentById = (id: string, config?: Partial<Rest.Config>) =>
 | 
					 | 
				
			||||||
    this.restService.request<any, AppointmentDto>({
 | 
					 | 
				
			||||||
      method: 'GET',
 | 
					 | 
				
			||||||
      url: `/api/app/appointment/${id}/appointment-by-id`,
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    { apiName: this.apiName,...config });
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  getAppointmentList = (input: PagingSortResultDto, config?: Partial<Rest.Config>) =>
 | 
					  getAppointmentList = (input: PagingSortResultDto, config?: Partial<Rest.Config>) =>
 | 
				
			||||||
    this.restService.request<any, PagedResultDto<AppointmentDto>>({
 | 
					    this.restService.request<any, PagedResultDto<AppointmentDto>>({
 | 
				
			||||||
      method: 'GET',
 | 
					      method: 'GET',
 | 
				
			||||||
@ -54,10 +39,10 @@ export class AppointmentService {
 | 
				
			|||||||
    { apiName: this.apiName,...config });
 | 
					    { apiName: this.apiName,...config });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  updateAppointment = (input: CreateOrUpdateAppointmentDto, config?: Partial<Rest.Config>) =>
 | 
					  updateAppointment = (id: string, input: CreateOrUpdateAppointmentDto, config?: Partial<Rest.Config>) =>
 | 
				
			||||||
    this.restService.request<any, AppointmentDto>({
 | 
					    this.restService.request<any, PatientRecordDto>({
 | 
				
			||||||
      method: 'PUT',
 | 
					      method: 'PUT',
 | 
				
			||||||
      url: '/api/app/appointment/appointment',
 | 
					      url: `/api/app/appointment/${id}/appointment`,
 | 
				
			||||||
      body: input,
 | 
					      body: input,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    { apiName: this.apiName,...config });
 | 
					    { apiName: this.apiName,...config });
 | 
				
			||||||
 | 
				
			|||||||
@ -985,43 +985,6 @@
 | 
				
			|||||||
              "allowAnonymous": null,
 | 
					              "allowAnonymous": null,
 | 
				
			||||||
              "implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
 | 
					              "implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "GetAppointmentByIdAsyncById": {
 | 
					 | 
				
			||||||
              "uniqueName": "GetAppointmentByIdAsyncById",
 | 
					 | 
				
			||||||
              "name": "GetAppointmentByIdAsync",
 | 
					 | 
				
			||||||
              "httpMethod": "GET",
 | 
					 | 
				
			||||||
              "url": "api/app/appointment/{id}/appointment-by-id",
 | 
					 | 
				
			||||||
              "supportedVersions": [],
 | 
					 | 
				
			||||||
              "parametersOnMethod": [
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  "name": "id",
 | 
					 | 
				
			||||||
                  "typeAsString": "System.Guid, System.Private.CoreLib",
 | 
					 | 
				
			||||||
                  "type": "System.Guid",
 | 
					 | 
				
			||||||
                  "typeSimple": "string",
 | 
					 | 
				
			||||||
                  "isOptional": false,
 | 
					 | 
				
			||||||
                  "defaultValue": null
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
              ],
 | 
					 | 
				
			||||||
              "parameters": [
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  "nameOnMethod": "id",
 | 
					 | 
				
			||||||
                  "name": "id",
 | 
					 | 
				
			||||||
                  "jsonName": null,
 | 
					 | 
				
			||||||
                  "type": "System.Guid",
 | 
					 | 
				
			||||||
                  "typeSimple": "string",
 | 
					 | 
				
			||||||
                  "isOptional": false,
 | 
					 | 
				
			||||||
                  "defaultValue": null,
 | 
					 | 
				
			||||||
                  "constraintTypes": [],
 | 
					 | 
				
			||||||
                  "bindingSourceId": "Path",
 | 
					 | 
				
			||||||
                  "descriptorName": ""
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
              ],
 | 
					 | 
				
			||||||
              "returnValue": {
 | 
					 | 
				
			||||||
                "type": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto",
 | 
					 | 
				
			||||||
                "typeSimple": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto"
 | 
					 | 
				
			||||||
              },
 | 
					 | 
				
			||||||
              "allowAnonymous": null,
 | 
					 | 
				
			||||||
              "implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            "CreateAppointmentAsyncByInput": {
 | 
					            "CreateAppointmentAsyncByInput": {
 | 
				
			||||||
              "uniqueName": "CreateAppointmentAsyncByInput",
 | 
					              "uniqueName": "CreateAppointmentAsyncByInput",
 | 
				
			||||||
              "name": "CreateAppointmentAsync",
 | 
					              "name": "CreateAppointmentAsync",
 | 
				
			||||||
@ -1059,48 +1022,11 @@
 | 
				
			|||||||
              "allowAnonymous": null,
 | 
					              "allowAnonymous": null,
 | 
				
			||||||
              "implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
 | 
					              "implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "UpdateAppointmentAsyncByInput": {
 | 
					            "UpdateAppointmentAsyncByIdAndInput": {
 | 
				
			||||||
              "uniqueName": "UpdateAppointmentAsyncByInput",
 | 
					              "uniqueName": "UpdateAppointmentAsyncByIdAndInput",
 | 
				
			||||||
              "name": "UpdateAppointmentAsync",
 | 
					              "name": "UpdateAppointmentAsync",
 | 
				
			||||||
              "httpMethod": "PUT",
 | 
					              "httpMethod": "PUT",
 | 
				
			||||||
              "url": "api/app/appointment/appointment",
 | 
					              "url": "api/app/appointment/{id}/appointment",
 | 
				
			||||||
              "supportedVersions": [],
 | 
					 | 
				
			||||||
              "parametersOnMethod": [
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  "name": "input",
 | 
					 | 
				
			||||||
                  "typeAsString": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto, HospitalManagementSystem.Application.Contracts",
 | 
					 | 
				
			||||||
                  "type": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
 | 
					 | 
				
			||||||
                  "typeSimple": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
 | 
					 | 
				
			||||||
                  "isOptional": false,
 | 
					 | 
				
			||||||
                  "defaultValue": null
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
              ],
 | 
					 | 
				
			||||||
              "parameters": [
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  "nameOnMethod": "input",
 | 
					 | 
				
			||||||
                  "name": "input",
 | 
					 | 
				
			||||||
                  "jsonName": null,
 | 
					 | 
				
			||||||
                  "type": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
 | 
					 | 
				
			||||||
                  "typeSimple": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
 | 
					 | 
				
			||||||
                  "isOptional": false,
 | 
					 | 
				
			||||||
                  "defaultValue": null,
 | 
					 | 
				
			||||||
                  "constraintTypes": null,
 | 
					 | 
				
			||||||
                  "bindingSourceId": "Body",
 | 
					 | 
				
			||||||
                  "descriptorName": ""
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
              ],
 | 
					 | 
				
			||||||
              "returnValue": {
 | 
					 | 
				
			||||||
                "type": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto",
 | 
					 | 
				
			||||||
                "typeSimple": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto"
 | 
					 | 
				
			||||||
              },
 | 
					 | 
				
			||||||
              "allowAnonymous": null,
 | 
					 | 
				
			||||||
              "implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            "DeleteAppointmentRecordAsyncById": {
 | 
					 | 
				
			||||||
              "uniqueName": "DeleteAppointmentRecordAsyncById",
 | 
					 | 
				
			||||||
              "name": "DeleteAppointmentRecordAsync",
 | 
					 | 
				
			||||||
              "httpMethod": "DELETE",
 | 
					 | 
				
			||||||
              "url": "api/app/appointment/{id}/appointment-record",
 | 
					 | 
				
			||||||
              "supportedVersions": [],
 | 
					              "supportedVersions": [],
 | 
				
			||||||
              "parametersOnMethod": [
 | 
					              "parametersOnMethod": [
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
@ -1110,6 +1036,14 @@
 | 
				
			|||||||
                  "typeSimple": "string",
 | 
					                  "typeSimple": "string",
 | 
				
			||||||
                  "isOptional": false,
 | 
					                  "isOptional": false,
 | 
				
			||||||
                  "defaultValue": null
 | 
					                  "defaultValue": null
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                  "name": "input",
 | 
				
			||||||
 | 
					                  "typeAsString": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto, HospitalManagementSystem.Application.Contracts",
 | 
				
			||||||
 | 
					                  "type": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
 | 
				
			||||||
 | 
					                  "typeSimple": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
 | 
				
			||||||
 | 
					                  "isOptional": false,
 | 
				
			||||||
 | 
					                  "defaultValue": null
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "parameters": [
 | 
					              "parameters": [
 | 
				
			||||||
@ -1124,13 +1058,25 @@
 | 
				
			|||||||
                  "constraintTypes": [],
 | 
					                  "constraintTypes": [],
 | 
				
			||||||
                  "bindingSourceId": "Path",
 | 
					                  "bindingSourceId": "Path",
 | 
				
			||||||
                  "descriptorName": ""
 | 
					                  "descriptorName": ""
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                  "nameOnMethod": "input",
 | 
				
			||||||
 | 
					                  "name": "input",
 | 
				
			||||||
 | 
					                  "jsonName": null,
 | 
				
			||||||
 | 
					                  "type": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
 | 
				
			||||||
 | 
					                  "typeSimple": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
 | 
				
			||||||
 | 
					                  "isOptional": false,
 | 
				
			||||||
 | 
					                  "defaultValue": null,
 | 
				
			||||||
 | 
					                  "constraintTypes": null,
 | 
				
			||||||
 | 
					                  "bindingSourceId": "Body",
 | 
				
			||||||
 | 
					                  "descriptorName": ""
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "returnValue": {
 | 
					              "returnValue": {
 | 
				
			||||||
                "type": "System.Void",
 | 
					                "type": "HospitalManagementSystem.Patients.Dto.PatientRecordDto",
 | 
				
			||||||
                "typeSimple": "System.Void"
 | 
					                "typeSimple": "HospitalManagementSystem.Patients.Dto.PatientRecordDto"
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
              "allowAnonymous": false,
 | 
					              "allowAnonymous": null,
 | 
				
			||||||
              "implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
 | 
					              "implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@ -4785,8 +4731,8 @@
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          "name": "DOB",
 | 
					          "name": "DOB",
 | 
				
			||||||
          "jsonName": null,
 | 
					          "jsonName": null,
 | 
				
			||||||
          "type": "System.DateTime?",
 | 
					          "type": "System.String",
 | 
				
			||||||
          "typeSimple": "string?",
 | 
					          "typeSimple": "string",
 | 
				
			||||||
          "isRequired": false,
 | 
					          "isRequired": false,
 | 
				
			||||||
          "minLength": null,
 | 
					          "minLength": null,
 | 
				
			||||||
          "maxLength": null,
 | 
					          "maxLength": null,
 | 
				
			||||||
@ -4853,54 +4799,6 @@
 | 
				
			|||||||
          "minimum": null,
 | 
					          "minimum": null,
 | 
				
			||||||
          "maximum": null,
 | 
					          "maximum": null,
 | 
				
			||||||
          "regex": null
 | 
					          "regex": null
 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          "name": "InsuranceProvider",
 | 
					 | 
				
			||||||
          "jsonName": null,
 | 
					 | 
				
			||||||
          "type": "System.String",
 | 
					 | 
				
			||||||
          "typeSimple": "string",
 | 
					 | 
				
			||||||
          "isRequired": false,
 | 
					 | 
				
			||||||
          "minLength": null,
 | 
					 | 
				
			||||||
          "maxLength": null,
 | 
					 | 
				
			||||||
          "minimum": null,
 | 
					 | 
				
			||||||
          "maximum": null,
 | 
					 | 
				
			||||||
          "regex": null
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          "name": "AppointmentStatus",
 | 
					 | 
				
			||||||
          "jsonName": null,
 | 
					 | 
				
			||||||
          "type": "HospitalManagementSystem.GlobalEnum.appointmentStatus",
 | 
					 | 
				
			||||||
          "typeSimple": "HospitalManagementSystem.GlobalEnum.appointmentStatus",
 | 
					 | 
				
			||||||
          "isRequired": false,
 | 
					 | 
				
			||||||
          "minLength": null,
 | 
					 | 
				
			||||||
          "maxLength": null,
 | 
					 | 
				
			||||||
          "minimum": null,
 | 
					 | 
				
			||||||
          "maximum": null,
 | 
					 | 
				
			||||||
          "regex": null
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          "name": "VisitType",
 | 
					 | 
				
			||||||
          "jsonName": null,
 | 
					 | 
				
			||||||
          "type": "HospitalManagementSystem.GlobalEnum.visitType",
 | 
					 | 
				
			||||||
          "typeSimple": "HospitalManagementSystem.GlobalEnum.visitType",
 | 
					 | 
				
			||||||
          "isRequired": false,
 | 
					 | 
				
			||||||
          "minLength": null,
 | 
					 | 
				
			||||||
          "maxLength": null,
 | 
					 | 
				
			||||||
          "minimum": null,
 | 
					 | 
				
			||||||
          "maximum": null,
 | 
					 | 
				
			||||||
          "regex": null
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          "name": "PaymentStatus",
 | 
					 | 
				
			||||||
          "jsonName": null,
 | 
					 | 
				
			||||||
          "type": "HospitalManagementSystem.GlobalEnum.paymentStatus",
 | 
					 | 
				
			||||||
          "typeSimple": "HospitalManagementSystem.GlobalEnum.paymentStatus",
 | 
					 | 
				
			||||||
          "isRequired": false,
 | 
					 | 
				
			||||||
          "minLength": null,
 | 
					 | 
				
			||||||
          "maxLength": null,
 | 
					 | 
				
			||||||
          "minimum": null,
 | 
					 | 
				
			||||||
          "maximum": null,
 | 
					 | 
				
			||||||
          "regex": null
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -4998,8 +4896,8 @@
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          "name": "DOB",
 | 
					          "name": "DOB",
 | 
				
			||||||
          "jsonName": null,
 | 
					          "jsonName": null,
 | 
				
			||||||
          "type": "System.DateTime?",
 | 
					          "type": "System.String",
 | 
				
			||||||
          "typeSimple": "string?",
 | 
					          "typeSimple": "string",
 | 
				
			||||||
          "isRequired": false,
 | 
					          "isRequired": false,
 | 
				
			||||||
          "minLength": null,
 | 
					          "minLength": null,
 | 
				
			||||||
          "maxLength": null,
 | 
					          "maxLength": null,
 | 
				
			||||||
 | 
				
			|||||||
@ -1,38 +1,6 @@
 | 
				
			|||||||
import type { Gender } from '../../global-enum/gender.enum';
 | 
					import type { Gender } from '../../global-enum/gender.enum';
 | 
				
			||||||
import type { Status } from '../../global-enum/status.enum';
 | 
					import type { Status } from '../../global-enum/status.enum';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface CreateUpdatePatientDto {
 | 
					 | 
				
			||||||
  id?: string;
 | 
					 | 
				
			||||||
  name?: string;
 | 
					 | 
				
			||||||
  gender: Gender;
 | 
					 | 
				
			||||||
  mobile?: string;
 | 
					 | 
				
			||||||
  email?: string;
 | 
					 | 
				
			||||||
  age: number;
 | 
					 | 
				
			||||||
  treatment?: string;
 | 
					 | 
				
			||||||
  doctorAssigned?: string;
 | 
					 | 
				
			||||||
  address?: string;
 | 
					 | 
				
			||||||
  bloodGroup?: string;
 | 
					 | 
				
			||||||
  admissionDate?: string;
 | 
					 | 
				
			||||||
  dischargeDate?: string;
 | 
					 | 
				
			||||||
  status: Status;
 | 
					 | 
				
			||||||
  imageID?: string;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export interface CreateUpdatePatientRecordDto {
 | 
					 | 
				
			||||||
  id?: string;
 | 
					 | 
				
			||||||
  patientId?: string;
 | 
					 | 
				
			||||||
  dateOfAdmission?: string;
 | 
					 | 
				
			||||||
  labReportUrlID?: string;
 | 
					 | 
				
			||||||
  medicationUrlID?: string;
 | 
					 | 
				
			||||||
  medicationHistoryUrlID?: string;
 | 
					 | 
				
			||||||
  nextFollowUp?: string;
 | 
					 | 
				
			||||||
  diagnosis?: string;
 | 
					 | 
				
			||||||
  treatmentPlan?: string;
 | 
					 | 
				
			||||||
  doctorNotes?: string;
 | 
					 | 
				
			||||||
  insuranceProvider?: string;
 | 
					 | 
				
			||||||
  status: Status;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export interface PatientDto {
 | 
					export interface PatientDto {
 | 
				
			||||||
  id?: string;
 | 
					  id?: string;
 | 
				
			||||||
  name?: string;
 | 
					  name?: string;
 | 
				
			||||||
@ -65,3 +33,35 @@ export interface PatientRecordDto {
 | 
				
			|||||||
  insuranceProvider?: string;
 | 
					  insuranceProvider?: string;
 | 
				
			||||||
  status: Status;
 | 
					  status: Status;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export interface CreateUpdatePatientDto {
 | 
				
			||||||
 | 
					  id?: string;
 | 
				
			||||||
 | 
					  name?: string;
 | 
				
			||||||
 | 
					  gender: Gender;
 | 
				
			||||||
 | 
					  mobile?: string;
 | 
				
			||||||
 | 
					  email?: string;
 | 
				
			||||||
 | 
					  age: number;
 | 
				
			||||||
 | 
					  treatment?: string;
 | 
				
			||||||
 | 
					  doctorAssigned?: string;
 | 
				
			||||||
 | 
					  address?: string;
 | 
				
			||||||
 | 
					  bloodGroup?: string;
 | 
				
			||||||
 | 
					  admissionDate?: string;
 | 
				
			||||||
 | 
					  dischargeDate?: string;
 | 
				
			||||||
 | 
					  status: Status;
 | 
				
			||||||
 | 
					  imageID?: string;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export interface CreateUpdatePatientRecordDto {
 | 
				
			||||||
 | 
					  id?: string;
 | 
				
			||||||
 | 
					  patientId?: string;
 | 
				
			||||||
 | 
					  dateOfAdmission?: string;
 | 
				
			||||||
 | 
					  labReportUrlID?: string;
 | 
				
			||||||
 | 
					  medicationUrlID?: string;
 | 
				
			||||||
 | 
					  medicationHistoryUrlID?: string;
 | 
				
			||||||
 | 
					  nextFollowUp?: string;
 | 
				
			||||||
 | 
					  diagnosis?: string;
 | 
				
			||||||
 | 
					  treatmentPlan?: string;
 | 
				
			||||||
 | 
					  doctorNotes?: string;
 | 
				
			||||||
 | 
					  insuranceProvider?: string;
 | 
				
			||||||
 | 
					  status: Status;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -16,15 +16,11 @@ namespace HospitalManagementSystem.Appoinments.Dto
 | 
				
			|||||||
        public string? Mobile { get; set; }
 | 
					        public string? Mobile { get; set; }
 | 
				
			||||||
        public string? Address { get; set; }
 | 
					        public string? Address { get; set; }
 | 
				
			||||||
        public string? Email { get; set; }
 | 
					        public string? Email { get; set; }
 | 
				
			||||||
        public DateTime? DOB { get; set; }
 | 
					        public string? DOB { get; set; }
 | 
				
			||||||
        public Guid? DoctorId { get; set; }
 | 
					        public Guid? DoctorId { get; set; }
 | 
				
			||||||
        public DateTime? DateOfAppointment { get; set; }
 | 
					        public DateTime? DateOfAppointment { get; set; }
 | 
				
			||||||
        public string? TimeOfAppointment { get; set; }
 | 
					        public string? TimeOfAppointment { get; set; }
 | 
				
			||||||
        public string? InjuryORContion { get; set; }
 | 
					        public string? InjuryORContion { get; set; }
 | 
				
			||||||
        public string? Note { get; set; }
 | 
					        public string? Note { get; set; }
 | 
				
			||||||
        public string? InsuranceProvider { get; set; }
 | 
					 | 
				
			||||||
        public appointmentStatus AppointmentStatus { get; set; }
 | 
					 | 
				
			||||||
        public visitType VisitType { get; set; }
 | 
					 | 
				
			||||||
        public paymentStatus PaymentStatus { get; set; }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,7 @@ namespace HospitalManagementSystem.Appoinments.Dto
 | 
				
			|||||||
        public string? Mobile { get; set; }
 | 
					        public string? Mobile { get; set; }
 | 
				
			||||||
        public string? Address { get; set; }
 | 
					        public string? Address { get; set; }
 | 
				
			||||||
        public string? Email { get; set; }
 | 
					        public string? Email { get; set; }
 | 
				
			||||||
        public DateTime? DOB { get; set; }
 | 
					        public string? DOB { get; set; }
 | 
				
			||||||
        public Guid? DoctorId { get; set; }
 | 
					        public Guid? DoctorId { get; set; }
 | 
				
			||||||
        public DateTime? DateOfAppointment { get; set; }
 | 
					        public DateTime? DateOfAppointment { get; set; }
 | 
				
			||||||
        public string? TimeOfAppointment { get; set; }
 | 
					        public string? TimeOfAppointment { get; set; }
 | 
				
			||||||
 | 
				
			|||||||
@ -18,8 +18,6 @@ using HospitalManagementSystem.Dto;
 | 
				
			|||||||
using Abp.Application.Services.Dto;
 | 
					using Abp.Application.Services.Dto;
 | 
				
			||||||
using Microsoft.EntityFrameworkCore;
 | 
					using Microsoft.EntityFrameworkCore;
 | 
				
			||||||
using System.Linq.Dynamic.Core;
 | 
					using System.Linq.Dynamic.Core;
 | 
				
			||||||
using Abp.UI;
 | 
					 | 
				
			||||||
using HospitalManagementSystem.Doctors;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace HospitalManagementSystem.Appointments
 | 
					namespace HospitalManagementSystem.Appointments
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -28,14 +26,11 @@ namespace HospitalManagementSystem.Appointments
 | 
				
			|||||||
        private readonly ICurrentUser _currentUser;
 | 
					        private readonly ICurrentUser _currentUser;
 | 
				
			||||||
        private readonly ICurrentTenant _currentTenant;
 | 
					        private readonly ICurrentTenant _currentTenant;
 | 
				
			||||||
        private IRepository<Appointment, Guid> _appointmentsRepository;
 | 
					        private IRepository<Appointment, Guid> _appointmentsRepository;
 | 
				
			||||||
        private readonly IRepository<Doctor, Guid> _doctorRepository;
 | 
					        public AppointmentAppService(ICurrentUser currentUser, ICurrentTenant currentTenant, IRepository<Appointment, Guid> appointmentsRepository)
 | 
				
			||||||
 | 
					 | 
				
			||||||
        public AppointmentAppService(ICurrentUser currentUser, ICurrentTenant currentTenant, IRepository<Appointment, Guid> appointmentsRepository, IRepository<Doctor, Guid> doctorRepository)
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            _currentUser = currentUser;
 | 
					            _currentUser = currentUser;
 | 
				
			||||||
            _currentTenant = currentTenant;
 | 
					            _currentTenant = currentTenant;
 | 
				
			||||||
            _appointmentsRepository = appointmentsRepository;
 | 
					            _appointmentsRepository = appointmentsRepository;
 | 
				
			||||||
            _doctorRepository = doctorRepository;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        public async Task<string> GetAsync()
 | 
					        public async Task<string> GetAsync()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@ -68,20 +63,6 @@ namespace HospitalManagementSystem.Appointments
 | 
				
			|||||||
            );
 | 
					            );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        #endregion
 | 
					 | 
				
			||||||
        #region Get Appointment by ID
 | 
					 | 
				
			||||||
        public async Task<AppointmentDto> GetAppointmentByIdAsync(Guid id)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            var appointment = await _appointmentsRepository.FirstOrDefaultAsync(x => x.Id == id);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            if (appointment == null)
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                throw new UserFriendlyException("Appointment Details not found");
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            return ObjectMapper.Map<Appointment, AppointmentDto>(appointment);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
        #region Create Appointment
 | 
					        #region Create Appointment
 | 
				
			||||||
        public async Task<AppointmentDto> CreateAppointmentAsync(CreateOrUpdateAppointmentDto input)
 | 
					        public async Task<AppointmentDto> CreateAppointmentAsync(CreateOrUpdateAppointmentDto input)
 | 
				
			||||||
@ -95,23 +76,13 @@ namespace HospitalManagementSystem.Appointments
 | 
				
			|||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #region Update Appointment
 | 
					        #region Update Appointment
 | 
				
			||||||
        public async Task<AppointmentDto> UpdateAppointmentAsync(CreateOrUpdateAppointmentDto input)
 | 
					        public async Task<PatientRecordDto> UpdateAppointmentAsync(Guid id, CreateOrUpdateAppointmentDto input)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            //var appointment = await _appointmentsRepository.GetAsync(input.Id);
 | 
					            var appointment = await _appointmentsRepository.GetAsync(id);
 | 
				
			||||||
            Appointment appointment = new Appointment();
 | 
					 | 
				
			||||||
            var newdata = ObjectMapper.Map<CreateOrUpdateAppointmentDto, Appointment>(input);
 | 
					            var newdata = ObjectMapper.Map<CreateOrUpdateAppointmentDto, Appointment>(input);
 | 
				
			||||||
            newdata.Doctor = await _doctorRepository.GetAsync(input.DoctorId.Value);
 | 
					 | 
				
			||||||
            appointment = newdata;
 | 
					            appointment = newdata;
 | 
				
			||||||
            appointment = await _appointmentsRepository.UpdateAsync(appointment);
 | 
					            appointment = await _appointmentsRepository.UpdateAsync(appointment);
 | 
				
			||||||
            return ObjectMapper.Map<Appointment, AppointmentDto>(appointment);
 | 
					            return ObjectMapper.Map<Appointment, PatientRecordDto>(appointment);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        #endregion
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        #region Delete Appointment
 | 
					 | 
				
			||||||
        [Authorize(HospitalManagementSystemPermissions.Patient.Delete)]
 | 
					 | 
				
			||||||
        public async Task DeleteAppointmentRecordAsync(Guid id)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            await _appointmentsRepository.DeleteAsync(id);
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -54,7 +54,7 @@ namespace HospitalManagementSystem.Patients
 | 
				
			|||||||
                .Include(x => x.LabReportUrl)
 | 
					                .Include(x => x.LabReportUrl)
 | 
				
			||||||
                .Include(x => x.MedicationUrl)
 | 
					                .Include(x => x.MedicationUrl)
 | 
				
			||||||
                .Include(x => x.MedicationHistoryUrl)
 | 
					                .Include(x => x.MedicationHistoryUrl)
 | 
				
			||||||
                .WhereIf(!string.IsNullOrEmpty(input.Search), x => x.Patients.Name.ToLower().Contains(input.Search.ToLower()) || x.Patients.Email.Contains(input.Search))
 | 
					                .WhereIf(!string.IsNullOrEmpty(input.Search), x => x.Patients.Name.ToLower().Contains(input.Search.ToLower()))
 | 
				
			||||||
                .Where(x => x.Patients.Id == Id);
 | 
					                .Where(x => x.Patients.Id == Id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var totalCount = await filteredQuery.CountAsync();
 | 
					            var totalCount = await filteredQuery.CountAsync();
 | 
				
			||||||
@ -270,7 +270,7 @@ namespace HospitalManagementSystem.Patients
 | 
				
			|||||||
            if (!string.IsNullOrEmpty(input.Search))
 | 
					            if (!string.IsNullOrEmpty(input.Search))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                query = _patientRepository.GetQueryableAsync().Result
 | 
					                query = _patientRepository.GetQueryableAsync().Result
 | 
				
			||||||
                    .Where(x => x.Name.ToLower().Contains(input.Search.ToLower()) || x.Email.Contains(input.Search))
 | 
					                    .Where(x => x.Name.ToLower().Contains(input.Search.ToLower()))
 | 
				
			||||||
                    .OrderBy(input.Sorting ?? (nameof(Patient.Id) + " asc"))
 | 
					                    .OrderBy(input.Sorting ?? (nameof(Patient.Id) + " asc"))
 | 
				
			||||||
                    .Skip(input.SkipCount)
 | 
					                    .Skip(input.SkipCount)
 | 
				
			||||||
                    .Take(input.MaxResultCount)
 | 
					                    .Take(input.MaxResultCount)
 | 
				
			||||||
 | 
				
			|||||||
@ -29,7 +29,6 @@ namespace HospitalManagementSystem.GlobalEnum
 | 
				
			|||||||
        NewPatient = 1,
 | 
					        NewPatient = 1,
 | 
				
			||||||
        Followup = 2,
 | 
					        Followup = 2,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    public enum paymentStatus
 | 
					    public enum paymentStatus
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        Paid = 1,
 | 
					        Paid = 1,
 | 
				
			||||||
 | 
				
			|||||||
@ -14,8 +14,8 @@ namespace HospitalManagementSystem.Appointments
 | 
				
			|||||||
        public string? Mobile { get; set; }
 | 
					        public string? Mobile { get; set; }
 | 
				
			||||||
        public string? Address { get; set; }
 | 
					        public string? Address { get; set; }
 | 
				
			||||||
        public string? Email { get; set; }
 | 
					        public string? Email { get; set; }
 | 
				
			||||||
        public DateTime? DOB { get; set; }
 | 
					        public string? DOB { get; set; }
 | 
				
			||||||
        //public Guid? DoctorId { get; set; }
 | 
					        public Guid? DoctorId { get; set; }
 | 
				
			||||||
        [ForeignKey("DoctorId")]
 | 
					        [ForeignKey("DoctorId")]
 | 
				
			||||||
        public virtual Doctor? Doctor { get; set; }
 | 
					        public virtual Doctor? Doctor { get; set; }
 | 
				
			||||||
        public DateTime? DateOfAppointment { get; set; }
 | 
					        public DateTime? DateOfAppointment { get; set; }
 | 
				
			||||||
 | 
				
			|||||||
@ -28,8 +28,4 @@
 | 
				
			|||||||
    </PackageReference>
 | 
					    </PackageReference>
 | 
				
			||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <ItemGroup>
 | 
					 | 
				
			||||||
    <Folder Include="Migrations\" />
 | 
					 | 
				
			||||||
  </ItemGroup>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</Project>
 | 
					</Project>
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1954
									
								
								aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250106103255_Initial.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										1954
									
								
								aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250106103255_Initial.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
 | 
				
			|||||||
namespace HospitalManagementSystem.Migrations
 | 
					namespace HospitalManagementSystem.Migrations
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /// <inheritdoc />
 | 
					    /// <inheritdoc />
 | 
				
			||||||
    public partial class initial : Migration
 | 
					    public partial class Initial : Migration
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        /// <inheritdoc />
 | 
					        /// <inheritdoc />
 | 
				
			||||||
        protected override void Up(MigrationBuilder migrationBuilder)
 | 
					        protected override void Up(MigrationBuilder migrationBuilder)
 | 
				
			||||||
@ -412,54 +412,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                    table.PrimaryKey("PK_AbpUsers", x => x.Id);
 | 
					                    table.PrimaryKey("PK_AbpUsers", x => x.Id);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					 | 
				
			||||||
                name: "Departments",
 | 
					 | 
				
			||||||
                columns: table => new
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    DepartmentNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    DepartmentDate = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    DepartmentHead = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Status = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
 | 
					 | 
				
			||||||
                    DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                constraints: table =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    table.PrimaryKey("PK_Departments", x => x.Id);
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					 | 
				
			||||||
                name: "EntityDocuments",
 | 
					 | 
				
			||||||
                columns: table => new
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    OriginalFileName = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    GeneratedFileName = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    FileSize = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    FilePath = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    FileType = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    TagName = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    UploadDate = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
 | 
					 | 
				
			||||||
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                constraints: table =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    table.PrimaryKey("PK_EntityDocuments", x => x.Id);
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
                name: "OpenIddictApplications",
 | 
					                name: "OpenIddictApplications",
 | 
				
			||||||
                columns: table => new
 | 
					                columns: table => new
 | 
				
			||||||
@ -755,75 +707,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                        onDelete: ReferentialAction.Cascade);
 | 
					                        onDelete: ReferentialAction.Cascade);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					 | 
				
			||||||
                name: "Doctors",
 | 
					 | 
				
			||||||
                columns: table => new
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Gender = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Designation = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    DOB = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Education = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
 | 
					 | 
				
			||||||
                    DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                constraints: table =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    table.PrimaryKey("PK_Doctors", x => x.Id);
 | 
					 | 
				
			||||||
                    table.ForeignKey(
 | 
					 | 
				
			||||||
                        name: "FK_Doctors_Departments_DepartmentId",
 | 
					 | 
				
			||||||
                        column: x => x.DepartmentId,
 | 
					 | 
				
			||||||
                        principalTable: "Departments",
 | 
					 | 
				
			||||||
                        principalColumn: "Id");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					 | 
				
			||||||
                name: "Patient",
 | 
					 | 
				
			||||||
                columns: table => new
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    Gender = table.Column<int>(type: "int", nullable: false),
 | 
					 | 
				
			||||||
                    Mobile = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    Age = table.Column<int>(type: "int", nullable: false),
 | 
					 | 
				
			||||||
                    Treatment = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    DoctorAssigned = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    Address = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    BloodGroup = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    AdmissionDate = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    DischargeDate = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    Status = table.Column<int>(type: "int", nullable: false),
 | 
					 | 
				
			||||||
                    ImagesId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
 | 
					 | 
				
			||||||
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                constraints: table =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    table.PrimaryKey("PK_Patient", x => x.Id);
 | 
					 | 
				
			||||||
                    table.ForeignKey(
 | 
					 | 
				
			||||||
                        name: "FK_Patient_EntityDocuments_ImagesId",
 | 
					 | 
				
			||||||
                        column: x => x.ImagesId,
 | 
					 | 
				
			||||||
                        principalTable: "EntityDocuments",
 | 
					 | 
				
			||||||
                        principalColumn: "Id");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
                name: "OpenIddictAuthorizations",
 | 
					                name: "OpenIddictAuthorizations",
 | 
				
			||||||
                columns: table => new
 | 
					                columns: table => new
 | 
				
			||||||
@ -872,126 +755,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                        onDelete: ReferentialAction.Cascade);
 | 
					                        onDelete: ReferentialAction.Cascade);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					 | 
				
			||||||
                name: "Appointments",
 | 
					 | 
				
			||||||
                columns: table => new
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Gender = table.Column<int>(type: "int", nullable: false),
 | 
					 | 
				
			||||||
                    Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    DOB = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    DoctorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    DateOfAppointment = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    TimeOfAppointment = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    InjuryORContion = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    Note = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    InsuranceProvider = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
					 | 
				
			||||||
                    AppointmentStatus = table.Column<int>(type: "int", nullable: false),
 | 
					 | 
				
			||||||
                    VisitType = table.Column<int>(type: "int", nullable: false),
 | 
					 | 
				
			||||||
                    PaymentStatus = table.Column<int>(type: "int", nullable: false),
 | 
					 | 
				
			||||||
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
 | 
					 | 
				
			||||||
                    DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                constraints: table =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    table.PrimaryKey("PK_Appointments", x => x.Id);
 | 
					 | 
				
			||||||
                    table.ForeignKey(
 | 
					 | 
				
			||||||
                        name: "FK_Appointments_Doctors_DoctorId",
 | 
					 | 
				
			||||||
                        column: x => x.DoctorId,
 | 
					 | 
				
			||||||
                        principalTable: "Doctors",
 | 
					 | 
				
			||||||
                        principalColumn: "Id");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					 | 
				
			||||||
                name: "PatientDocuments",
 | 
					 | 
				
			||||||
                columns: table => new
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    PatientsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    EntityDocumentsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    TagName = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
 | 
					 | 
				
			||||||
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                constraints: table =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    table.PrimaryKey("PK_PatientDocuments", x => x.Id);
 | 
					 | 
				
			||||||
                    table.ForeignKey(
 | 
					 | 
				
			||||||
                        name: "FK_PatientDocuments_EntityDocuments_EntityDocumentsId",
 | 
					 | 
				
			||||||
                        column: x => x.EntityDocumentsId,
 | 
					 | 
				
			||||||
                        principalTable: "EntityDocuments",
 | 
					 | 
				
			||||||
                        principalColumn: "Id",
 | 
					 | 
				
			||||||
                        onDelete: ReferentialAction.Cascade);
 | 
					 | 
				
			||||||
                    table.ForeignKey(
 | 
					 | 
				
			||||||
                        name: "FK_PatientDocuments_Patient_PatientsId",
 | 
					 | 
				
			||||||
                        column: x => x.PatientsId,
 | 
					 | 
				
			||||||
                        principalTable: "Patient",
 | 
					 | 
				
			||||||
                        principalColumn: "Id",
 | 
					 | 
				
			||||||
                        onDelete: ReferentialAction.Cascade);
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					 | 
				
			||||||
                name: "PatientRecords",
 | 
					 | 
				
			||||||
                columns: table => new
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    PatientsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
					 | 
				
			||||||
                    DateOfAdmission = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    Diagnosis = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    TreatmentPlan = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    DoctorNotes = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    LabReportUrlId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    MedicationUrlId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    MedicationHistoryUrlId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    NextFollowUp = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    InsuranceProvider = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    Status = table.Column<int>(type: "int", nullable: false),
 | 
					 | 
				
			||||||
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
					 | 
				
			||||||
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
 | 
					 | 
				
			||||||
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
					 | 
				
			||||||
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
					 | 
				
			||||||
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
					 | 
				
			||||||
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                constraints: table =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    table.PrimaryKey("PK_PatientRecords", x => x.Id);
 | 
					 | 
				
			||||||
                    table.ForeignKey(
 | 
					 | 
				
			||||||
                        name: "FK_PatientRecords_EntityDocuments_LabReportUrlId",
 | 
					 | 
				
			||||||
                        column: x => x.LabReportUrlId,
 | 
					 | 
				
			||||||
                        principalTable: "EntityDocuments",
 | 
					 | 
				
			||||||
                        principalColumn: "Id");
 | 
					 | 
				
			||||||
                    table.ForeignKey(
 | 
					 | 
				
			||||||
                        name: "FK_PatientRecords_EntityDocuments_MedicationHistoryUrlId",
 | 
					 | 
				
			||||||
                        column: x => x.MedicationHistoryUrlId,
 | 
					 | 
				
			||||||
                        principalTable: "EntityDocuments",
 | 
					 | 
				
			||||||
                        principalColumn: "Id");
 | 
					 | 
				
			||||||
                    table.ForeignKey(
 | 
					 | 
				
			||||||
                        name: "FK_PatientRecords_EntityDocuments_MedicationUrlId",
 | 
					 | 
				
			||||||
                        column: x => x.MedicationUrlId,
 | 
					 | 
				
			||||||
                        principalTable: "EntityDocuments",
 | 
					 | 
				
			||||||
                        principalColumn: "Id");
 | 
					 | 
				
			||||||
                    table.ForeignKey(
 | 
					 | 
				
			||||||
                        name: "FK_PatientRecords_Patient_PatientsId",
 | 
					 | 
				
			||||||
                        column: x => x.PatientsId,
 | 
					 | 
				
			||||||
                        principalTable: "Patient",
 | 
					 | 
				
			||||||
                        principalColumn: "Id",
 | 
					 | 
				
			||||||
                        onDelete: ReferentialAction.Cascade);
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateTable(
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
                name: "OpenIddictTokens",
 | 
					                name: "OpenIddictTokens",
 | 
				
			||||||
                columns: table => new
 | 
					                columns: table => new
 | 
				
			||||||
@ -1244,16 +1007,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                table: "AbpUsers",
 | 
					                table: "AbpUsers",
 | 
				
			||||||
                column: "UserName");
 | 
					                column: "UserName");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					 | 
				
			||||||
                name: "IX_Appointments_DoctorId",
 | 
					 | 
				
			||||||
                table: "Appointments",
 | 
					 | 
				
			||||||
                column: "DoctorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					 | 
				
			||||||
                name: "IX_Doctors_DepartmentId",
 | 
					 | 
				
			||||||
                table: "Doctors",
 | 
					 | 
				
			||||||
                column: "DepartmentId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
                name: "IX_OpenIddictApplications_ClientId",
 | 
					                name: "IX_OpenIddictApplications_ClientId",
 | 
				
			||||||
                table: "OpenIddictApplications",
 | 
					                table: "OpenIddictApplications",
 | 
				
			||||||
@ -1283,41 +1036,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                name: "IX_OpenIddictTokens_ReferenceId",
 | 
					                name: "IX_OpenIddictTokens_ReferenceId",
 | 
				
			||||||
                table: "OpenIddictTokens",
 | 
					                table: "OpenIddictTokens",
 | 
				
			||||||
                column: "ReferenceId");
 | 
					                column: "ReferenceId");
 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					 | 
				
			||||||
                name: "IX_Patient_ImagesId",
 | 
					 | 
				
			||||||
                table: "Patient",
 | 
					 | 
				
			||||||
                column: "ImagesId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					 | 
				
			||||||
                name: "IX_PatientDocuments_EntityDocumentsId",
 | 
					 | 
				
			||||||
                table: "PatientDocuments",
 | 
					 | 
				
			||||||
                column: "EntityDocumentsId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					 | 
				
			||||||
                name: "IX_PatientDocuments_PatientsId",
 | 
					 | 
				
			||||||
                table: "PatientDocuments",
 | 
					 | 
				
			||||||
                column: "PatientsId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					 | 
				
			||||||
                name: "IX_PatientRecords_LabReportUrlId",
 | 
					 | 
				
			||||||
                table: "PatientRecords",
 | 
					 | 
				
			||||||
                column: "LabReportUrlId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					 | 
				
			||||||
                name: "IX_PatientRecords_MedicationHistoryUrlId",
 | 
					 | 
				
			||||||
                table: "PatientRecords",
 | 
					 | 
				
			||||||
                column: "MedicationHistoryUrlId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					 | 
				
			||||||
                name: "IX_PatientRecords_MedicationUrlId",
 | 
					 | 
				
			||||||
                table: "PatientRecords",
 | 
					 | 
				
			||||||
                column: "MedicationUrlId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.CreateIndex(
 | 
					 | 
				
			||||||
                name: "IX_PatientRecords_PatientsId",
 | 
					 | 
				
			||||||
                table: "PatientRecords",
 | 
					 | 
				
			||||||
                column: "PatientsId");
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <inheritdoc />
 | 
					        /// <inheritdoc />
 | 
				
			||||||
@ -1395,21 +1113,12 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
            migrationBuilder.DropTable(
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
                name: "AbpUserTokens");
 | 
					                name: "AbpUserTokens");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					 | 
				
			||||||
                name: "Appointments");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
                name: "OpenIddictScopes");
 | 
					                name: "OpenIddictScopes");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
                name: "OpenIddictTokens");
 | 
					                name: "OpenIddictTokens");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					 | 
				
			||||||
                name: "PatientDocuments");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					 | 
				
			||||||
                name: "PatientRecords");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
                name: "AbpEntityChanges");
 | 
					                name: "AbpEntityChanges");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1425,26 +1134,14 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
            migrationBuilder.DropTable(
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
                name: "AbpUsers");
 | 
					                name: "AbpUsers");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					 | 
				
			||||||
                name: "Doctors");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
                name: "OpenIddictAuthorizations");
 | 
					                name: "OpenIddictAuthorizations");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					 | 
				
			||||||
                name: "Patient");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
                name: "AbpAuditLogs");
 | 
					                name: "AbpAuditLogs");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					 | 
				
			||||||
                name: "Departments");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
                name: "OpenIddictApplications");
 | 
					                name: "OpenIddictApplications");
 | 
				
			||||||
 | 
					 | 
				
			||||||
            migrationBuilder.DropTable(
 | 
					 | 
				
			||||||
                name: "EntityDocuments");
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
 | 
				
			|||||||
namespace HospitalManagementSystem.Migrations
 | 
					namespace HospitalManagementSystem.Migrations
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    [DbContext(typeof(HospitalManagementSystemDbContext))]
 | 
					    [DbContext(typeof(HospitalManagementSystemDbContext))]
 | 
				
			||||||
    [Migration("20250206080641_dobdatetime")]
 | 
					    [Migration("20250115133021_addedDepartment_Doctor_Appointment_Table")]
 | 
				
			||||||
    partial class dobdatetime
 | 
					    partial class addedDepartment_Doctor_Appointment_Table
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        /// <inheritdoc />
 | 
					        /// <inheritdoc />
 | 
				
			||||||
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 | 
					        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 | 
				
			||||||
@ -22,7 +22,7 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
#pragma warning disable 612, 618
 | 
					#pragma warning disable 612, 618
 | 
				
			||||||
            modelBuilder
 | 
					            modelBuilder
 | 
				
			||||||
                .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
 | 
					                .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
 | 
				
			||||||
                .HasAnnotation("ProductVersion", "9.0.1")
 | 
					                .HasAnnotation("ProductVersion", "9.0.0")
 | 
				
			||||||
                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 | 
					                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
 | 
					            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
 | 
				
			||||||
@ -35,9 +35,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                    b.Property<string>("Address")
 | 
					                    b.Property<string>("Address")
 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					                        .HasColumnType("nvarchar(max)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    b.Property<int>("AppointmentStatus")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					                    b.Property<DateTime>("CreationTime")
 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					                        .HasColumnType("datetime2")
 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					                        .HasColumnName("CreationTime");
 | 
				
			||||||
@ -46,8 +43,8 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                        .HasColumnType("uniqueidentifier")
 | 
					                        .HasColumnType("uniqueidentifier")
 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					                        .HasColumnName("CreatorId");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    b.Property<DateTime?>("DOB")
 | 
					                    b.Property<string>("DOB")
 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					                        .HasColumnType("nvarchar(max)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    b.Property<DateTime?>("DateOfAppointment")
 | 
					                    b.Property<DateTime?>("DateOfAppointment")
 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					                        .HasColumnType("datetime2");
 | 
				
			||||||
@ -69,13 +66,10 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                    b.Property<string>("FirstName")
 | 
					                    b.Property<string>("FirstName")
 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					                        .HasColumnType("nvarchar(max)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    b.Property<int>("Gender")
 | 
					                    b.Property<string>("Gender")
 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("InjuryORContion")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					                        .HasColumnType("nvarchar(max)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    b.Property<string>("InsuranceProvider")
 | 
					                    b.Property<string>("InjuryORContion")
 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					                        .HasColumnType("nvarchar(max)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    b.Property<bool>("IsDeleted")
 | 
					                    b.Property<bool>("IsDeleted")
 | 
				
			||||||
@ -101,15 +95,9 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                    b.Property<string>("Note")
 | 
					                    b.Property<string>("Note")
 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					                        .HasColumnType("nvarchar(max)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    b.Property<int>("PaymentStatus")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("TimeOfAppointment")
 | 
					                    b.Property<string>("TimeOfAppointment")
 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					                        .HasColumnType("nvarchar(max)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    b.Property<int>("VisitType")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					                    b.HasKey("Id");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    b.HasIndex("DoctorId");
 | 
					                    b.HasIndex("DoctorId");
 | 
				
			||||||
@ -250,292 +238,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                    b.ToTable("Doctors");
 | 
					                    b.ToTable("Doctors");
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("ConcurrencyStamp")
 | 
					 | 
				
			||||||
                        .IsConcurrencyToken()
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasMaxLength(40)
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(40)")
 | 
					 | 
				
			||||||
                        .HasColumnName("ConcurrencyStamp");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("ExtraProperties")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)")
 | 
					 | 
				
			||||||
                        .HasColumnName("ExtraProperties");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("FilePath")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("FileSize")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("FileType")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("GeneratedFileName")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("OriginalFileName")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("TagName")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("UploadDate")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("EntityDocuments", (string)null);
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("ConcurrencyStamp")
 | 
					 | 
				
			||||||
                        .IsConcurrencyToken()
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasMaxLength(40)
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(40)")
 | 
					 | 
				
			||||||
                        .HasColumnName("ConcurrencyStamp");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid>("EntityDocumentsId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("ExtraProperties")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)")
 | 
					 | 
				
			||||||
                        .HasColumnName("ExtraProperties");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid>("PatientsId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("TagName")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("EntityDocumentsId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("PatientsId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("PatientDocuments", (string)null);
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Patients.Patient", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Address")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("AdmissionDate")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("Age")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("BloodGroup")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("ConcurrencyStamp")
 | 
					 | 
				
			||||||
                        .IsConcurrencyToken()
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasMaxLength(40)
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(40)")
 | 
					 | 
				
			||||||
                        .HasColumnName("ConcurrencyStamp");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DischargeDate")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DoctorAssigned")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Email")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("ExtraProperties")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)")
 | 
					 | 
				
			||||||
                        .HasColumnName("ExtraProperties");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("Gender")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("ImagesId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Mobile")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Name")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("Status")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Treatment")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("ImagesId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("Patient", (string)null);
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Patients.PatientRecord", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("ConcurrencyStamp")
 | 
					 | 
				
			||||||
                        .IsConcurrencyToken()
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasMaxLength(40)
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(40)")
 | 
					 | 
				
			||||||
                        .HasColumnName("ConcurrencyStamp");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("DateOfAdmission")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Diagnosis")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DoctorNotes")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("ExtraProperties")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)")
 | 
					 | 
				
			||||||
                        .HasColumnName("ExtraProperties");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("InsuranceProvider")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LabReportUrlId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("MedicationHistoryUrlId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("MedicationUrlId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("NextFollowUp")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid>("PatientsId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("Status")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("TreatmentPlan")
 | 
					 | 
				
			||||||
                        .IsRequired()
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("LabReportUrlId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("MedicationHistoryUrlId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("MedicationUrlId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("PatientsId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("PatientRecords", (string)null);
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
 | 
					            modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					                    b.Property<Guid>("Id")
 | 
				
			||||||
@ -2294,63 +1996,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                    b.Navigation("Department");
 | 
					                    b.Navigation("Department");
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
 | 
					 | 
				
			||||||
                        .WithMany()
 | 
					 | 
				
			||||||
                        .HasForeignKey("EntityDocumentsId")
 | 
					 | 
				
			||||||
                        .OnDelete(DeleteBehavior.Cascade)
 | 
					 | 
				
			||||||
                        .IsRequired();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Patients.Patient", "Patients")
 | 
					 | 
				
			||||||
                        .WithMany()
 | 
					 | 
				
			||||||
                        .HasForeignKey("PatientsId")
 | 
					 | 
				
			||||||
                        .OnDelete(DeleteBehavior.Cascade)
 | 
					 | 
				
			||||||
                        .IsRequired();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("EntityDocuments");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("Patients");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Patients.Patient", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "Images")
 | 
					 | 
				
			||||||
                        .WithMany()
 | 
					 | 
				
			||||||
                        .HasForeignKey("ImagesId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("Images");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Patients.PatientRecord", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "LabReportUrl")
 | 
					 | 
				
			||||||
                        .WithMany()
 | 
					 | 
				
			||||||
                        .HasForeignKey("LabReportUrlId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "MedicationHistoryUrl")
 | 
					 | 
				
			||||||
                        .WithMany()
 | 
					 | 
				
			||||||
                        .HasForeignKey("MedicationHistoryUrlId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "MedicationUrl")
 | 
					 | 
				
			||||||
                        .WithMany()
 | 
					 | 
				
			||||||
                        .HasForeignKey("MedicationUrlId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Patients.Patient", "Patients")
 | 
					 | 
				
			||||||
                        .WithMany()
 | 
					 | 
				
			||||||
                        .HasForeignKey("PatientsId")
 | 
					 | 
				
			||||||
                        .OnDelete(DeleteBehavior.Cascade)
 | 
					 | 
				
			||||||
                        .IsRequired();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("LabReportUrl");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("MedicationHistoryUrl");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("MedicationUrl");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("Patients");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
 | 
					            modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
 | 
					                    b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
 | 
				
			||||||
@ -0,0 +1,131 @@
 | 
				
			|||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using Microsoft.EntityFrameworkCore.Migrations;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#nullable disable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace HospitalManagementSystem.Migrations
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <inheritdoc />
 | 
				
			||||||
 | 
					    public partial class addedDepartment_Doctor_Appointment_Table : Migration
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <inheritdoc />
 | 
				
			||||||
 | 
					        protected override void Up(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
 | 
					                name: "Departments",
 | 
				
			||||||
 | 
					                columns: table => new
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    DepartmentNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    DepartmentDate = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    DepartmentHead = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Status = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
 | 
				
			||||||
 | 
					                    DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                constraints: table =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    table.PrimaryKey("PK_Departments", x => x.Id);
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
 | 
					                name: "Doctors",
 | 
				
			||||||
 | 
					                columns: table => new
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Gender = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Designation = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    DOB = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Education = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
 | 
				
			||||||
 | 
					                    DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                constraints: table =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    table.PrimaryKey("PK_Doctors", x => x.Id);
 | 
				
			||||||
 | 
					                    table.ForeignKey(
 | 
				
			||||||
 | 
					                        name: "FK_Doctors_Departments_DepartmentId",
 | 
				
			||||||
 | 
					                        column: x => x.DepartmentId,
 | 
				
			||||||
 | 
					                        principalTable: "Departments",
 | 
				
			||||||
 | 
					                        principalColumn: "Id");
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
 | 
					                name: "Appointments",
 | 
				
			||||||
 | 
					                columns: table => new
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Gender = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    DOB = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    DoctorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    DateOfAppointment = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    TimeOfAppointment = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    InjuryORContion = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    Note = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
 | 
				
			||||||
 | 
					                    DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                constraints: table =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    table.PrimaryKey("PK_Appointments", x => x.Id);
 | 
				
			||||||
 | 
					                    table.ForeignKey(
 | 
				
			||||||
 | 
					                        name: "FK_Appointments_Doctors_DoctorId",
 | 
				
			||||||
 | 
					                        column: x => x.DoctorId,
 | 
				
			||||||
 | 
					                        principalTable: "Doctors",
 | 
				
			||||||
 | 
					                        principalColumn: "Id");
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_Appointments_DoctorId",
 | 
				
			||||||
 | 
					                table: "Appointments",
 | 
				
			||||||
 | 
					                column: "DoctorId");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_Doctors_DepartmentId",
 | 
				
			||||||
 | 
					                table: "Doctors",
 | 
				
			||||||
 | 
					                column: "DepartmentId");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <inheritdoc />
 | 
				
			||||||
 | 
					        protected override void Down(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
 | 
					                name: "Appointments");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
 | 
					                name: "Doctors");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
 | 
					                name: "Departments");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -0,0 +1,93 @@
 | 
				
			|||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using Microsoft.EntityFrameworkCore.Migrations;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#nullable disable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace HospitalManagementSystem.Migrations
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <inheritdoc />
 | 
				
			||||||
 | 
					    public partial class added_patientinpatientrecord : Migration
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <inheritdoc />
 | 
				
			||||||
 | 
					        protected override void Up(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
 | 
					                name: "Patient",
 | 
				
			||||||
 | 
					                columns: table => new
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    Gender = table.Column<int>(type: "int", nullable: false),
 | 
				
			||||||
 | 
					                    Mobile = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    Age = table.Column<int>(type: "int", nullable: false),
 | 
				
			||||||
 | 
					                    Treatment = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    DoctorAssigned = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    Address = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    BloodGroup = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    AdmissionDate = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    DischargeDate = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    Status = table.Column<int>(type: "int", nullable: false),
 | 
				
			||||||
 | 
					                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
 | 
				
			||||||
 | 
					                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                constraints: table =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    table.PrimaryKey("PK_Patient", x => x.Id);
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
 | 
					                name: "PatientRecords",
 | 
				
			||||||
 | 
					                columns: table => new
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    PatientsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    DateOfAdmission = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    Diagnosis = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    TreatmentPlan = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    DoctorNotes = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    LabReportUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    MedicationUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    MedicationHistoryUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
				
			||||||
 | 
					                    NextFollowUp = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    InsuranceProvider = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    Status = table.Column<int>(type: "int", nullable: false),
 | 
				
			||||||
 | 
					                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
 | 
				
			||||||
 | 
					                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                constraints: table =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    table.PrimaryKey("PK_PatientRecords", x => x.Id);
 | 
				
			||||||
 | 
					                    table.ForeignKey(
 | 
				
			||||||
 | 
					                        name: "FK_PatientRecords_Patient_PatientsId",
 | 
				
			||||||
 | 
					                        column: x => x.PatientsId,
 | 
				
			||||||
 | 
					                        principalTable: "Patient",
 | 
				
			||||||
 | 
					                        principalColumn: "Id",
 | 
				
			||||||
 | 
					                        onDelete: ReferentialAction.Cascade);
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_PatientRecords_PatientsId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                column: "PatientsId");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <inheritdoc />
 | 
				
			||||||
 | 
					        protected override void Down(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
 | 
					                name: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
 | 
					                name: "Patient");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -1,20 +1,19 @@
 | 
				
			|||||||
using System;
 | 
					using Microsoft.EntityFrameworkCore.Migrations;
 | 
				
			||||||
using Microsoft.EntityFrameworkCore.Migrations;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#nullable disable
 | 
					#nullable disable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace HospitalManagementSystem.Migrations
 | 
					namespace HospitalManagementSystem.Migrations
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /// <inheritdoc />
 | 
					    /// <inheritdoc />
 | 
				
			||||||
    public partial class dobdatetime : Migration
 | 
					    public partial class changeGenderEnumToString : Migration
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        /// <inheritdoc />
 | 
					        /// <inheritdoc />
 | 
				
			||||||
        protected override void Up(MigrationBuilder migrationBuilder)
 | 
					        protected override void Up(MigrationBuilder migrationBuilder)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            migrationBuilder.AlterColumn<DateTime>(
 | 
					            migrationBuilder.AlterColumn<int>(
 | 
				
			||||||
                name: "DOB",
 | 
					                name: "Gender",
 | 
				
			||||||
                table: "Appointments",
 | 
					                table: "Appointments",
 | 
				
			||||||
                type: "datetime2",
 | 
					                type: "int",
 | 
				
			||||||
                nullable: true,
 | 
					                nullable: true,
 | 
				
			||||||
                oldClrType: typeof(string),
 | 
					                oldClrType: typeof(string),
 | 
				
			||||||
                oldType: "nvarchar(max)",
 | 
					                oldType: "nvarchar(max)",
 | 
				
			||||||
@ -25,12 +24,12 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
        protected override void Down(MigrationBuilder migrationBuilder)
 | 
					        protected override void Down(MigrationBuilder migrationBuilder)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            migrationBuilder.AlterColumn<string>(
 | 
					            migrationBuilder.AlterColumn<string>(
 | 
				
			||||||
                name: "DOB",
 | 
					                name: "Gender",
 | 
				
			||||||
                table: "Appointments",
 | 
					                table: "Appointments",
 | 
				
			||||||
                type: "nvarchar(max)",
 | 
					                type: "nvarchar(max)",
 | 
				
			||||||
                nullable: true,
 | 
					                nullable: true,
 | 
				
			||||||
                oldClrType: typeof(DateTime),
 | 
					                oldClrType: typeof(int),
 | 
				
			||||||
                oldType: "datetime2",
 | 
					                oldType: "int",
 | 
				
			||||||
                oldNullable: true);
 | 
					                oldNullable: true);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
 | 
				
			|||||||
namespace HospitalManagementSystem.Migrations
 | 
					namespace HospitalManagementSystem.Migrations
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    [DbContext(typeof(HospitalManagementSystemDbContext))]
 | 
					    [DbContext(typeof(HospitalManagementSystemDbContext))]
 | 
				
			||||||
    [Migration("20250206061352_initial")]
 | 
					    [Migration("20250131062928_patientdocument_entitydocument")]
 | 
				
			||||||
    partial class initial
 | 
					    partial class patientdocument_entitydocument
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        /// <inheritdoc />
 | 
					        /// <inheritdoc />
 | 
				
			||||||
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 | 
					        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 | 
				
			||||||
@ -27,229 +27,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
 | 
					            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Appointments.Appointment", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Address")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("AppointmentStatus")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DOB")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DateOfAppointment")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DeleterId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeleterId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DeletionTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeletionTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DoctorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Email")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("FirstName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("Gender")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("InjuryORContion")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("InsuranceProvider")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<bool>("IsDeleted")
 | 
					 | 
				
			||||||
                        .ValueGeneratedOnAdd()
 | 
					 | 
				
			||||||
                        .HasColumnType("bit")
 | 
					 | 
				
			||||||
                        .HasDefaultValue(false)
 | 
					 | 
				
			||||||
                        .HasColumnName("IsDeleted");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("LastName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Mobile")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Note")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("PaymentStatus")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("TimeOfAppointment")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("VisitType")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("DoctorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("Appointments");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Departments.Department", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DeleterId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeleterId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DeletionTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeletionTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DepartmentDate")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DepartmentHead")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DepartmentName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DepartmentNo")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Description")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<bool>("IsDeleted")
 | 
					 | 
				
			||||||
                        .ValueGeneratedOnAdd()
 | 
					 | 
				
			||||||
                        .HasColumnType("bit")
 | 
					 | 
				
			||||||
                        .HasDefaultValue(false)
 | 
					 | 
				
			||||||
                        .HasColumnName("IsDeleted");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Status")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("Departments");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Address")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DOB")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DeleterId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeleterId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DeletionTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeletionTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DepartmentId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Designation")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Education")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Email")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("FirstName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Gender")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<bool>("IsDeleted")
 | 
					 | 
				
			||||||
                        .ValueGeneratedOnAdd()
 | 
					 | 
				
			||||||
                        .HasColumnType("bit")
 | 
					 | 
				
			||||||
                        .HasDefaultValue(false)
 | 
					 | 
				
			||||||
                        .HasColumnName("IsDeleted");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("LastName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Mobile")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Password")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("DepartmentId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("Doctors");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
 | 
					            modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					                    b.Property<Guid>("Id")
 | 
				
			||||||
@ -2276,24 +2053,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                    b.ToTable("AbpTenantConnectionStrings", (string)null);
 | 
					                    b.ToTable("AbpTenantConnectionStrings", (string)null);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Appointments.Appointment", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Doctors.Doctor", "Doctor")
 | 
					 | 
				
			||||||
                        .WithMany("Appointments")
 | 
					 | 
				
			||||||
                        .HasForeignKey("DoctorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("Doctor");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Departments.Department", "Department")
 | 
					 | 
				
			||||||
                        .WithMany()
 | 
					 | 
				
			||||||
                        .HasForeignKey("DepartmentId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("Department");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
 | 
					            modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
 | 
					                    b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
 | 
				
			||||||
@ -2493,11 +2252,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                        .IsRequired();
 | 
					                        .IsRequired();
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Navigation("Appointments");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
 | 
					            modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.Navigation("Actions");
 | 
					                    b.Navigation("Actions");
 | 
				
			||||||
@ -0,0 +1,241 @@
 | 
				
			|||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using Microsoft.EntityFrameworkCore.Migrations;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#nullable disable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace HospitalManagementSystem.Migrations
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <inheritdoc />
 | 
				
			||||||
 | 
					    public partial class patientdocument_entitydocument : Migration
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <inheritdoc />
 | 
				
			||||||
 | 
					        protected override void Up(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.DropColumn(
 | 
				
			||||||
 | 
					                name: "LabReportUrl",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropColumn(
 | 
				
			||||||
 | 
					                name: "MedicationHistoryUrl",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropColumn(
 | 
				
			||||||
 | 
					                name: "MedicationUrl",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddColumn<Guid>(
 | 
				
			||||||
 | 
					                name: "LabReportUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                type: "uniqueidentifier",
 | 
				
			||||||
 | 
					                nullable: true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddColumn<Guid>(
 | 
				
			||||||
 | 
					                name: "MedicationHistoryUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                type: "uniqueidentifier",
 | 
				
			||||||
 | 
					                nullable: true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddColumn<Guid>(
 | 
				
			||||||
 | 
					                name: "MedicationUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                type: "uniqueidentifier",
 | 
				
			||||||
 | 
					                nullable: true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddColumn<Guid>(
 | 
				
			||||||
 | 
					                name: "ImagesId",
 | 
				
			||||||
 | 
					                table: "Patient",
 | 
				
			||||||
 | 
					                type: "uniqueidentifier",
 | 
				
			||||||
 | 
					                nullable: true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
 | 
					                name: "EntityDocuments",
 | 
				
			||||||
 | 
					                columns: table => new
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    OriginalFileName = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    GeneratedFileName = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    FileSize = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    FilePath = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    FileType = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    TagName = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    UploadDate = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
 | 
				
			||||||
 | 
					                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                constraints: table =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    table.PrimaryKey("PK_EntityDocuments", x => x.Id);
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
 | 
					                name: "PatientDocuments",
 | 
				
			||||||
 | 
					                columns: table => new
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    PatientsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    EntityDocumentsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    TagName = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
				
			||||||
 | 
					                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
 | 
				
			||||||
 | 
					                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
				
			||||||
 | 
					                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                constraints: table =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    table.PrimaryKey("PK_PatientDocuments", x => x.Id);
 | 
				
			||||||
 | 
					                    table.ForeignKey(
 | 
				
			||||||
 | 
					                        name: "FK_PatientDocuments_EntityDocuments_EntityDocumentsId",
 | 
				
			||||||
 | 
					                        column: x => x.EntityDocumentsId,
 | 
				
			||||||
 | 
					                        principalTable: "EntityDocuments",
 | 
				
			||||||
 | 
					                        principalColumn: "Id",
 | 
				
			||||||
 | 
					                        onDelete: ReferentialAction.Cascade);
 | 
				
			||||||
 | 
					                    table.ForeignKey(
 | 
				
			||||||
 | 
					                        name: "FK_PatientDocuments_Patient_PatientsId",
 | 
				
			||||||
 | 
					                        column: x => x.PatientsId,
 | 
				
			||||||
 | 
					                        principalTable: "Patient",
 | 
				
			||||||
 | 
					                        principalColumn: "Id",
 | 
				
			||||||
 | 
					                        onDelete: ReferentialAction.Cascade);
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_PatientRecords_LabReportUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                column: "LabReportUrlId");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_PatientRecords_MedicationHistoryUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                column: "MedicationHistoryUrlId");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_PatientRecords_MedicationUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                column: "MedicationUrlId");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_Patient_ImagesId",
 | 
				
			||||||
 | 
					                table: "Patient",
 | 
				
			||||||
 | 
					                column: "ImagesId");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_PatientDocuments_EntityDocumentsId",
 | 
				
			||||||
 | 
					                table: "PatientDocuments",
 | 
				
			||||||
 | 
					                column: "EntityDocumentsId");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_PatientDocuments_PatientsId",
 | 
				
			||||||
 | 
					                table: "PatientDocuments",
 | 
				
			||||||
 | 
					                column: "PatientsId");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddForeignKey(
 | 
				
			||||||
 | 
					                name: "FK_Patient_EntityDocuments_ImagesId",
 | 
				
			||||||
 | 
					                table: "Patient",
 | 
				
			||||||
 | 
					                column: "ImagesId",
 | 
				
			||||||
 | 
					                principalTable: "EntityDocuments",
 | 
				
			||||||
 | 
					                principalColumn: "Id");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddForeignKey(
 | 
				
			||||||
 | 
					                name: "FK_PatientRecords_EntityDocuments_LabReportUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                column: "LabReportUrlId",
 | 
				
			||||||
 | 
					                principalTable: "EntityDocuments",
 | 
				
			||||||
 | 
					                principalColumn: "Id");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddForeignKey(
 | 
				
			||||||
 | 
					                name: "FK_PatientRecords_EntityDocuments_MedicationHistoryUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                column: "MedicationHistoryUrlId",
 | 
				
			||||||
 | 
					                principalTable: "EntityDocuments",
 | 
				
			||||||
 | 
					                principalColumn: "Id");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddForeignKey(
 | 
				
			||||||
 | 
					                name: "FK_PatientRecords_EntityDocuments_MedicationUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                column: "MedicationUrlId",
 | 
				
			||||||
 | 
					                principalTable: "EntityDocuments",
 | 
				
			||||||
 | 
					                principalColumn: "Id");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <inheritdoc />
 | 
				
			||||||
 | 
					        protected override void Down(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.DropForeignKey(
 | 
				
			||||||
 | 
					                name: "FK_Patient_EntityDocuments_ImagesId",
 | 
				
			||||||
 | 
					                table: "Patient");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropForeignKey(
 | 
				
			||||||
 | 
					                name: "FK_PatientRecords_EntityDocuments_LabReportUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropForeignKey(
 | 
				
			||||||
 | 
					                name: "FK_PatientRecords_EntityDocuments_MedicationHistoryUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropForeignKey(
 | 
				
			||||||
 | 
					                name: "FK_PatientRecords_EntityDocuments_MedicationUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
 | 
					                name: "PatientDocuments");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
 | 
					                name: "EntityDocuments");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropIndex(
 | 
				
			||||||
 | 
					                name: "IX_PatientRecords_LabReportUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropIndex(
 | 
				
			||||||
 | 
					                name: "IX_PatientRecords_MedicationHistoryUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropIndex(
 | 
				
			||||||
 | 
					                name: "IX_PatientRecords_MedicationUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropIndex(
 | 
				
			||||||
 | 
					                name: "IX_Patient_ImagesId",
 | 
				
			||||||
 | 
					                table: "Patient");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropColumn(
 | 
				
			||||||
 | 
					                name: "LabReportUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropColumn(
 | 
				
			||||||
 | 
					                name: "MedicationHistoryUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropColumn(
 | 
				
			||||||
 | 
					                name: "MedicationUrlId",
 | 
				
			||||||
 | 
					                table: "PatientRecords");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.DropColumn(
 | 
				
			||||||
 | 
					                name: "ImagesId",
 | 
				
			||||||
 | 
					                table: "Patient");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddColumn<string>(
 | 
				
			||||||
 | 
					                name: "LabReportUrl",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                type: "nvarchar(max)",
 | 
				
			||||||
 | 
					                nullable: true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddColumn<string>(
 | 
				
			||||||
 | 
					                name: "MedicationHistoryUrl",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                type: "nvarchar(max)",
 | 
				
			||||||
 | 
					                nullable: true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.AddColumn<string>(
 | 
				
			||||||
 | 
					                name: "MedicationUrl",
 | 
				
			||||||
 | 
					                table: "PatientRecords",
 | 
				
			||||||
 | 
					                type: "nvarchar(max)",
 | 
				
			||||||
 | 
					                nullable: true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -24,229 +24,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
 | 
					            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Appointments.Appointment", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Address")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("AppointmentStatus")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DOB")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DateOfAppointment")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DeleterId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeleterId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DeletionTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeletionTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DoctorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Email")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("FirstName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("Gender")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("InjuryORContion")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("InsuranceProvider")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<bool>("IsDeleted")
 | 
					 | 
				
			||||||
                        .ValueGeneratedOnAdd()
 | 
					 | 
				
			||||||
                        .HasColumnType("bit")
 | 
					 | 
				
			||||||
                        .HasDefaultValue(false)
 | 
					 | 
				
			||||||
                        .HasColumnName("IsDeleted");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("LastName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Mobile")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Note")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("PaymentStatus")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("TimeOfAppointment")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<int>("VisitType")
 | 
					 | 
				
			||||||
                        .HasColumnType("int");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("DoctorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("Appointments");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Departments.Department", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DeleterId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeleterId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DeletionTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeletionTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DepartmentDate")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DepartmentHead")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DepartmentName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DepartmentNo")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Description")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<bool>("IsDeleted")
 | 
					 | 
				
			||||||
                        .ValueGeneratedOnAdd()
 | 
					 | 
				
			||||||
                        .HasColumnType("bit")
 | 
					 | 
				
			||||||
                        .HasDefaultValue(false)
 | 
					 | 
				
			||||||
                        .HasColumnName("IsDeleted");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Status")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("Departments");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Address")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime>("CreationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("CreatorId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("CreatorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("DOB")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DeleterId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeleterId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("DeletionTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("DeletionTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("DepartmentId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Designation")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Education")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Email")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("FirstName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Gender")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<bool>("IsDeleted")
 | 
					 | 
				
			||||||
                        .ValueGeneratedOnAdd()
 | 
					 | 
				
			||||||
                        .HasColumnType("bit")
 | 
					 | 
				
			||||||
                        .HasDefaultValue(false)
 | 
					 | 
				
			||||||
                        .HasColumnName("IsDeleted");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<DateTime?>("LastModificationTime")
 | 
					 | 
				
			||||||
                        .HasColumnType("datetime2")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModificationTime");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<Guid?>("LastModifierId")
 | 
					 | 
				
			||||||
                        .HasColumnType("uniqueidentifier")
 | 
					 | 
				
			||||||
                        .HasColumnName("LastModifierId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("LastName")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Mobile")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Property<string>("Password")
 | 
					 | 
				
			||||||
                        .HasColumnType("nvarchar(max)");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasKey("Id");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.HasIndex("DepartmentId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.ToTable("Doctors");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
 | 
					            modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.Property<Guid>("Id")
 | 
					                    b.Property<Guid>("Id")
 | 
				
			||||||
@ -2273,24 +2050,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                    b.ToTable("AbpTenantConnectionStrings", (string)null);
 | 
					                    b.ToTable("AbpTenantConnectionStrings", (string)null);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Appointments.Appointment", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Doctors.Doctor", "Doctor")
 | 
					 | 
				
			||||||
                        .WithMany("Appointments")
 | 
					 | 
				
			||||||
                        .HasForeignKey("DoctorId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("Doctor");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Departments.Department", "Department")
 | 
					 | 
				
			||||||
                        .WithMany()
 | 
					 | 
				
			||||||
                        .HasForeignKey("DepartmentId");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    b.Navigation("Department");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
 | 
					            modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
 | 
					                    b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
 | 
				
			||||||
@ -2490,11 +2249,6 @@ namespace HospitalManagementSystem.Migrations
 | 
				
			|||||||
                        .IsRequired();
 | 
					                        .IsRequired();
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    b.Navigation("Appointments");
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
 | 
					            modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.Navigation("Actions");
 | 
					                    b.Navigation("Actions");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user