diff --git a/angular/src/app/app-routing.module.ts b/angular/src/app/app-routing.module.ts
index b303787..2dd6ad4 100644
--- a/angular/src/app/app-routing.module.ts
+++ b/angular/src/app/app-routing.module.ts
@@ -48,6 +48,10 @@ const routes: Routes = [
path: 'departments',
loadChildren: () => import('./departments/departments.module').then(m => m.DepartmentsModule),
},
+ {
+ path: 'doctors',
+ loadChildren: () => import('./doctors/doctors.module').then(m => m.DoctorsModule),
+ },
];
@NgModule({
diff --git a/angular/src/app/app.module.ts b/angular/src/app/app.module.ts
index 833d377..c31a2b3 100644
--- a/angular/src/app/app.module.ts
+++ b/angular/src/app/app.module.ts
@@ -29,13 +29,11 @@ import { AccountLayoutModule } from '@abp/ng.theme.lepton-x/account';
AppRoutingModule,
CoreModule,
ThemeSharedModule,
-
-
-
+
InternetConnectionStatusComponent,
- ThemeLeptonXModule.forRoot(),
- SideMenuLayoutModule.forRoot(),
- AccountLayoutModule.forRoot(),
+ ThemeLeptonXModule.forRoot(),
+ SideMenuLayoutModule.forRoot(),
+ AccountLayoutModule.forRoot(),
],
declarations: [AppComponent],
providers: [
diff --git a/angular/src/app/appointment/appointment-calendar/appointment-calendar.component.ts b/angular/src/app/appointment/appointment-calendar/appointment-calendar.component.ts
index b16ea83..3a344da 100644
--- a/angular/src/app/appointment/appointment-calendar/appointment-calendar.component.ts
+++ b/angular/src/app/appointment/appointment-calendar/appointment-calendar.component.ts
@@ -39,7 +39,6 @@ export class AppointmentCalendarComponent implements OnInit {
search: event.globalFilter == null ? '' : event.globalFilter,
};
this.appointmentService.getAppointmentList(this.params).subscribe(data => {
- debugger
this.appointments = data.items;
this.updateCalendarEvents();
});
@@ -65,7 +64,6 @@ export class AppointmentCalendarComponent implements OnInit {
};
}
combineDateTime(dateStr: string, timeStr: string): string {
- debugger
if (!timeStr) return dateStr;
const date = new Date(dateStr);
const [hours, minutes] = timeStr.split(':');
@@ -82,7 +80,6 @@ export class AppointmentCalendarComponent implements OnInit {
],
};
closeDialog() {
- debugger;
this.isModalVisible = false;
this.loadAppointments({
first: 0,
@@ -93,7 +90,6 @@ export class AppointmentCalendarComponent implements OnInit {
});
}
handleDateClick(arg) {
- debugger;
this.selectedDate = arg.dateStr;
this.isModalVisible = true;
this.isEditMode = false;
@@ -107,7 +103,6 @@ export class AppointmentCalendarComponent implements OnInit {
}
onEventClick(info: any) {
- debugger;
this.appointmentIdToEdit = info.event.id;
this.isEditMode = true;
this.isModalVisible = true;
diff --git a/angular/src/app/departments/department-dialog.component.html b/angular/src/app/departments/department-dialog.component.html
index fe05f33..eb6561d 100644
--- a/angular/src/app/departments/department-dialog.component.html
+++ b/angular/src/app/departments/department-dialog.component.html
@@ -4,15 +4,15 @@
role="dialog"
style="background: rgba(0, 0, 0, 0.5)"
*ngIf="visible"
- aria-label="l('name')"
+ aria-label="l('Doctor')"
>
diff --git a/angular/src/app/departments/department-dialog.component.spec.ts b/angular/src/app/departments/department-dialog.component.spec.ts
new file mode 100644
index 0000000..b468be8
--- /dev/null
+++ b/angular/src/app/departments/department-dialog.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DepartmentDialogComponent } from './department-dialog.component';
+
+describe('DepartmentDialogComponent', () => {
+ let component: DepartmentDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [DepartmentDialogComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(DepartmentDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/angular/src/app/departments/department-dialog.component.ts b/angular/src/app/departments/department-dialog.component.ts
index 5fc427d..63758a5 100644
--- a/angular/src/app/departments/department-dialog.component.ts
+++ b/angular/src/app/departments/department-dialog.component.ts
@@ -50,7 +50,6 @@ export class DepartmentDialogComponent implements OnInit {
private toaster: ToasterService
) {}
ngOnInit(): void {
- debugger;
if(this.isEditMode){
this.fetchDepartmentData();
}
@@ -69,8 +68,6 @@ export class DepartmentDialogComponent implements OnInit {
this.DepartmentService.getDepartmentById(this.Id).subscribe(result => {
this.department = result;
this.Departmentdate = new Date(result.departmentDate);
-
-
});
}
saveDepartment(form: NgForm) {
diff --git a/angular/src/app/doctors/doctor-dialog.component.html b/angular/src/app/doctors/doctor-dialog.component.html
new file mode 100644
index 0000000..f2f54ec
--- /dev/null
+++ b/angular/src/app/doctors/doctor-dialog.component.html
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
diff --git a/angular/src/app/doctors/doctor-dialog.component.scss b/angular/src/app/doctors/doctor-dialog.component.scss
new file mode 100644
index 0000000..c1581bc
--- /dev/null
+++ b/angular/src/app/doctors/doctor-dialog.component.scss
@@ -0,0 +1,23 @@
+.hide_body{
+ scrollbar-width: auto !important;
+ min-height: 150px;
+ max-height: calc(100vh - 13rem);
+ overflow-y: auto;
+ }
+ .is-valid {
+ border-color: green !important;
+ }
+ .is-invalid {
+ border-color: red !important;
+ }
+
+ /* Adjust the z-index of the calendar dropdown */
+.p-calendar .p-datepicker {
+ z-index: 1050 !important; /* Make sure it's above other elements */
+ }
+
+ /* You can also adjust modal z-index if necessary */
+ .modal {
+ z-index: 1040; /* Set lower z-index to ensure modal is behind the calendar */
+ }
+
\ No newline at end of file
diff --git a/angular/src/app/doctors/doctor-dialog.component.spec.ts b/angular/src/app/doctors/doctor-dialog.component.spec.ts
new file mode 100644
index 0000000..eeccdc9
--- /dev/null
+++ b/angular/src/app/doctors/doctor-dialog.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DoctorDialogComponent } from './doctor-dialog.component';
+
+describe('DoctorDialogComponent', () => {
+ let component: DoctorDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [DoctorDialogComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(DoctorDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/angular/src/app/doctors/doctor-dialog.component.ts b/angular/src/app/doctors/doctor-dialog.component.ts
new file mode 100644
index 0000000..5f42012
--- /dev/null
+++ b/angular/src/app/doctors/doctor-dialog.component.ts
@@ -0,0 +1,129 @@
+import { ToasterService } from '@abp/ng.theme.shared';
+import { CommonModule } from '@angular/common';
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+import { FormsModule, NgForm } from '@angular/forms';
+import { DoctorService } from '@proxy/doctors';
+import { CreateDoctorDto } from '@proxy/dtos';
+import { ButtonModule } from 'primeng/button';
+import { CalendarModule } from 'primeng/calendar';
+import { ChipModule } from 'primeng/chip';
+import { DialogModule } from 'primeng/dialog';
+import { DropdownModule } from 'primeng/dropdown';
+import { InputTextModule } from 'primeng/inputtext';
+import { InputTextareaModule } from 'primeng/inputtextarea';
+import { RadioButtonModule } from 'primeng/radiobutton';
+import { TableModule } from 'primeng/table';
+import { RatingModule } from 'primeng/rating';
+import { workScheduleOptions } from '@proxy/global-enum';
+
+@Component({
+ selector: 'app-doctor-dialog',
+ standalone: true,
+ imports: [
+ TableModule,
+ DialogModule,
+ FormsModule,
+ TableModule,
+ ButtonModule,
+ DialogModule,
+ InputTextModule,
+ CalendarModule,
+ DropdownModule,
+ RadioButtonModule,
+ InputTextareaModule,
+ ChipModule,
+ CommonModule,
+ RatingModule
+ ],
+ templateUrl: './doctor-dialog.component.html',
+ styleUrl: './doctor-dialog.component.scss',
+})
+export class DoctorDialogComponent implements OnInit {
+ @Input() visible: boolean = false;
+ @Input() name: string;
+ @Input() isEditMode: boolean = false;
+ @Output() save = new EventEmitter();
+ @Output() close = new EventEmitter();
+ @Input() Id: string;
+ doctorDialog: boolean;
+ JoiningDate: Date;
+ dateofbirth: Date;
+
+ constructor(private DoctorService: DoctorService, private toaster: ToasterService) {}
+
+
+ ngOnInit(): void {
+ if (this.isEditMode) {
+ this.fetchDoctorData();
+ }
+ }
+
+ doctor: CreateDoctorDto = {
+ id: '',
+ firstName: '',
+ lastName: '',
+ gender: '',
+ mobile: '',
+ password: '',
+ designation: '',
+ departmentId: '',
+ address: '',
+ email: '',
+ dob: '',
+ education: '',
+ specialization: '',
+ degree: '',
+ joiningDate: '',
+ experience: 0,
+ consultationFee: 0,
+ availability: null,
+ rating: 0,
+ clinicLocation: '',
+ };
+ workScheduleOptions = Object.keys(workScheduleOptions)
+ .filter(key => isNaN(Number(key)))
+ .map(key => ({
+ label: key.replace(/([A-Z])/g, ' $1').trim(),
+ value: workScheduleOptions[key as keyof typeof workScheduleOptions]
+ }));
+ fetchDoctorData() {
+ this.DoctorService.getDoctorById(this.Id).subscribe(result => {
+ this.doctor = result;
+ this.JoiningDate = new Date(result.joiningDate);
+ this.dateofbirth = new Date(result.dob);
+ });
+ }
+ saveDoctor(form: NgForm) {
+ if (form.invalid) {
+ Object.values(form.controls).forEach(control => control.markAsTouched());
+ return;
+ }
+ this.doctor.dob = this.dateofbirth.toDateString();
+
+ if (this.isEditMode) {
+ this.DoctorService.updatDoctor(this.doctor).subscribe(
+ () => {
+ this.toaster.success('Updated Successfully', 'Success');
+ this.onClose();
+ },
+ error => {
+ this.toaster.error(error, 'Error');
+ }
+ );
+ } else {
+ this.DoctorService.createDoctor(this.doctor).subscribe(
+ () => {
+ this.toaster.success('created successfully', 'Success');
+ this.onClose();
+ },
+ error => {
+ this.toaster.error(error, 'Error');
+ }
+ );
+ }
+ }
+ onClose() {
+ this.Id = '';
+ this.close.emit();
+ }
+}
diff --git a/angular/src/app/doctors/doctors-routing.module.ts b/angular/src/app/doctors/doctors-routing.module.ts
new file mode 100644
index 0000000..deaf348
--- /dev/null
+++ b/angular/src/app/doctors/doctors-routing.module.ts
@@ -0,0 +1,11 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { DoctorsComponent } from './doctors.component';
+
+const routes: Routes = [{ path: '', component: DoctorsComponent }];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule],
+})
+export class DoctorsRoutingModule {}
diff --git a/angular/src/app/doctors/doctors.component.html b/angular/src/app/doctors/doctors.component.html
new file mode 100644
index 0000000..86132c3
--- /dev/null
+++ b/angular/src/app/doctors/doctors.component.html
@@ -0,0 +1,81 @@
+
+
+
+
+
Doctor List
+
+
+
+
+
+
+
+
+
+
+ First Name |
+ Last Name |
+ Mobile |
+ Email |
+ Specialization |
+ Experience |
+ Rating |
+ Actions |
+
+
+
+
+ {{ doctor.firstName }} |
+ {{ doctor.lastName }} |
+ {{ doctor.mobile }} |
+ {{ doctor.email }} |
+ {{ doctor.specialization }} |
+ {{ doctor.experience }} years |
+ {{ doctor.rating }} |
+
+
+
+ |
+
+
+
+
+
+
diff --git a/angular/src/app/doctors/doctors.component.scss b/angular/src/app/doctors/doctors.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/angular/src/app/doctors/doctors.component.spec.ts b/angular/src/app/doctors/doctors.component.spec.ts
new file mode 100644
index 0000000..49045e4
--- /dev/null
+++ b/angular/src/app/doctors/doctors.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DoctorsComponent } from './doctors.component';
+
+describe('DoctorsComponent', () => {
+ let component: DoctorsComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [DoctorsComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(DoctorsComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/angular/src/app/doctors/doctors.component.ts b/angular/src/app/doctors/doctors.component.ts
new file mode 100644
index 0000000..c768b0f
--- /dev/null
+++ b/angular/src/app/doctors/doctors.component.ts
@@ -0,0 +1,108 @@
+import { ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { DoctorService } from '@proxy/doctors';
+import { PagingSortResultDto } from '@proxy/dto';
+import { workScheduleOptions } from '@proxy/global-enum';
+
+@Component({
+ selector: 'app-doctors',
+ templateUrl: './doctors.component.html',
+ styleUrl: './doctors.component.scss',
+})
+export class DoctorsComponent implements OnInit {
+ totalRecords: number = 0;
+ doctors = [];
+ loading: boolean = false;
+ params: PagingSortResultDto;
+ isModalVisible: boolean=false;
+ isEditMode: boolean = false;
+ DoctorIdToEdit: string;
+
+ ngOnInit(): void {
+ this.loadDoctors({
+ first: 0,
+ rows: 10,
+ sortField: 'id',
+ sortOrder: 1,
+ globalFilter: null,
+ });
+ }
+ constructor(
+ private DoctorService: DoctorService,
+ private http: HttpClient,
+ private confirmation: ConfirmationService,
+ private toaster: ToasterService
+ ) {}
+ workSchedule = Object.keys(workScheduleOptions)
+ .filter(key => !isNaN(Number(key)))
+ .map(key => ({
+ label: workScheduleOptions[key as unknown as keyof typeof workScheduleOptions],
+ value: Number(key),
+ }));
+
+ loadDoctors(event: any) {
+ this.loading = true;
+ let order = event.sortOrder == 1 ? ' asc' : ' desc';
+ event.sortField = event.sortField == undefined ? 'id' : event.sortField;
+ this.params = {
+ skipCount: event.first,
+ maxResultCount: event.rows,
+ sorting: event.sortField + order,
+ search: event.globalFilter == null ? '' : event.globalFilter,
+ };
+
+ this.DoctorService.getDoctorList(this.params).subscribe(data => {
+ this.doctors = data.items;
+ this.totalRecords = data.totalCount;
+ this.loading = false;
+ });
+ }
+
+ openNewDoctorDialog() {
+ this.isModalVisible=true;
+ this.isEditMode = false;
+ }
+ editDoctor(Doctor: any) {
+ this.isEditMode = true;
+ this.DoctorIdToEdit = Doctor.id;
+ this.isModalVisible=true;
+ }
+
+ closeDialog() {
+ this.isModalVisible = false;
+ this.loadDoctors({
+ first: 0,
+ rows: 10,
+ sortField: 'id',
+ sortOrder: 1,
+ globalFilter: null,
+ });
+ }
+
+ exportDoctors() {
+ this.DoctorService.getExportDoctorsRecord().subscribe(result => {
+ const binary = atob(result.fileContent);
+ const len = binary.length;
+ const bytes = new Uint8Array(len);
+
+ for (let i = 0; i < len; i++) {
+ bytes[i] = binary.charCodeAt(i);
+ }
+
+ const blob = new Blob([bytes], { type: 'application/xlsx' });
+
+ const url = window.URL.createObjectURL(blob);
+
+ const link = document.createElement('a');
+ link.href = url;
+ link.download = result.fileName;
+
+ document.body.appendChild(link);
+ link.click();
+
+ document.body.removeChild(link);
+ window.URL.revokeObjectURL(url);
+ });
+ }
+}
diff --git a/angular/src/app/doctors/doctors.module.ts b/angular/src/app/doctors/doctors.module.ts
new file mode 100644
index 0000000..ac7c84b
--- /dev/null
+++ b/angular/src/app/doctors/doctors.module.ts
@@ -0,0 +1,39 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { DoctorsRoutingModule } from './doctors-routing.module';
+import { DoctorsComponent } from './doctors.component';
+import { FormsModule } from '@angular/forms';
+import { ButtonModule } from 'primeng/button';
+import { CalendarModule } from 'primeng/calendar';
+import { ChipModule } from 'primeng/chip';
+import { DialogModule } from 'primeng/dialog';
+import { DropdownModule } from 'primeng/dropdown';
+import { InputTextModule } from 'primeng/inputtext';
+import { InputTextareaModule } from 'primeng/inputtextarea';
+import { RadioButtonModule } from 'primeng/radiobutton';
+import { TableModule } from 'primeng/table';
+import { DoctorDialogComponent } from './doctor-dialog.component';
+
+@NgModule({
+ declarations: [DoctorsComponent],
+ imports: [
+ CommonModule,
+ DoctorsRoutingModule,
+ TableModule,
+ DialogModule,
+ FormsModule,
+ TableModule,
+ ButtonModule,
+ DialogModule,
+ InputTextModule,
+ CalendarModule,
+ DropdownModule,
+ RadioButtonModule,
+ InputTextareaModule,
+ ChipModule,
+ DoctorDialogComponent
+
+],
+})
+export class DoctorsModule {}
diff --git a/angular/src/app/proxy/doctors/doctor.service.ts b/angular/src/app/proxy/doctors/doctor.service.ts
index b0d9ad4..6607852 100644
--- a/angular/src/app/proxy/doctors/doctor.service.ts
+++ b/angular/src/app/proxy/doctors/doctor.service.ts
@@ -1,6 +1,8 @@
import type { DoctorDto } from './dto/models';
import { RestService, Rest } from '@abp/ng.core';
import { Injectable } from '@angular/core';
+import type { PagedResultDto } from '../abp/application/services/dto/models';
+import type { FileDownloadDto, PagingSortResultDto } from '../dto/models';
import type { CreateDoctorDto } from '../dtos/models';
@Injectable({
@@ -10,21 +12,63 @@ export class DoctorService {
apiName = 'Default';
- create = (input: CreateDoctorDto, config?: Partial) =>
- this.restService.request({
+ createDoctor = (input: CreateDoctorDto, config?: Partial) =>
+ this.restService.request({
method: 'POST',
- url: '/api/app/doctor',
+ url: '/api/app/doctor/doctor',
body: input,
},
{ apiName: this.apiName,...config });
+ deleteDoctorRecord = (id: string, config?: Partial) =>
+ this.restService.request({
+ method: 'DELETE',
+ url: `/api/app/doctor/${id}/doctor-record`,
+ },
+ { apiName: this.apiName,...config });
+
+
get = (config?: Partial) =>
this.restService.request({
method: 'GET',
url: '/api/app/doctor',
},
{ apiName: this.apiName,...config });
+
+
+ getDoctorById = (id: string, config?: Partial) =>
+ this.restService.request({
+ method: 'GET',
+ url: `/api/app/doctor/${id}/doctor-by-id`,
+ },
+ { apiName: this.apiName,...config });
+
+
+ getDoctorList = (input: PagingSortResultDto, config?: Partial) =>
+ this.restService.request>({
+ method: 'GET',
+ url: '/api/app/doctor/doctor-list',
+ params: { search: input.search, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
+ },
+ { apiName: this.apiName,...config });
+
+
+ getExportDoctorsRecord = (config?: Partial) =>
+ this.restService.request({
+ method: 'GET',
+ url: '/api/app/doctor/export-doctors-record',
+ },
+ { apiName: this.apiName,...config });
+
+
+ updatDoctor = (input: CreateDoctorDto, config?: Partial) =>
+ this.restService.request({
+ method: 'POST',
+ url: '/api/app/doctor/updat-doctor',
+ body: input,
+ },
+ { apiName: this.apiName,...config });
constructor(private restService: RestService) {}
}
diff --git a/angular/src/app/proxy/doctors/dto/models.ts b/angular/src/app/proxy/doctors/dto/models.ts
index fd9ad8b..711f9b2 100644
--- a/angular/src/app/proxy/doctors/dto/models.ts
+++ b/angular/src/app/proxy/doctors/dto/models.ts
@@ -1,4 +1,5 @@
import type { FullAuditedEntity } from '../../volo/abp/domain/entities/auditing/models';
+import type { WorkSchedule } from '../../global-enum/work-schedule.enum';
export interface DoctorDto extends FullAuditedEntity {
id?: string;
@@ -12,4 +13,12 @@ export interface DoctorDto extends FullAuditedEntity {
email?: string;
dob?: string;
education?: string;
+ specialization?: string;
+ degree?: string;
+ joiningDate?: string;
+ experience?: number;
+ consultationFee?: number;
+ availability?: WorkSchedule;
+ rating?: number;
+ clinicLocation?: string;
}
diff --git a/angular/src/app/proxy/dtos/models.ts b/angular/src/app/proxy/dtos/models.ts
index 9837656..d94a412 100644
--- a/angular/src/app/proxy/dtos/models.ts
+++ b/angular/src/app/proxy/dtos/models.ts
@@ -1,3 +1,4 @@
+import type { WorkSchedule } from '../global-enum/work-schedule.enum';
import type { FullAuditedEntity } from '../volo/abp/domain/entities/auditing/models';
export interface CreateDepartmentDto {
@@ -11,6 +12,7 @@ export interface CreateDepartmentDto {
}
export interface CreateDoctorDto {
+ id?: string;
firstName?: string;
lastName?: string;
gender?: string;
@@ -22,6 +24,14 @@ export interface CreateDoctorDto {
email?: string;
dob?: string;
education?: string;
+ specialization?: string;
+ degree?: string;
+ joiningDate?: string;
+ experience?: number;
+ consultationFee?: number;
+ availability?: WorkSchedule;
+ rating?: number;
+ clinicLocation?: string;
}
export interface DepartmentDto extends FullAuditedEntity {
diff --git a/angular/src/app/proxy/generate-proxy.json b/angular/src/app/proxy/generate-proxy.json
index 9faf3e3..f70e398 100644
--- a/angular/src/app/proxy/generate-proxy.json
+++ b/angular/src/app/proxy/generate-proxy.json
@@ -1404,22 +1404,7 @@
"isIntegrationService": false,
"apiVersion": null,
"type": "HospitalManagementSystem.Doctors.DoctorAppService",
- "interfaces": [
- {
- "type": "HospitalManagementSystem.Doctors.IDoctorAppService",
- "name": "IDoctorAppService",
- "methods": [
- {
- "name": "GetAsync",
- "parametersOnMethod": [],
- "returnValue": {
- "type": "System.Collections.Generic.List",
- "typeSimple": "[HospitalManagementSystem.Doctors.Dto.DoctorDto]"
- }
- }
- ]
- }
- ],
+ "interfaces": [],
"actions": {
"GetAsync": {
"uniqueName": "GetAsync",
@@ -1434,13 +1419,138 @@
"typeSimple": "[HospitalManagementSystem.Doctors.Dto.DoctorDto]"
},
"allowAnonymous": null,
- "implementFrom": "HospitalManagementSystem.Doctors.IDoctorAppService"
+ "implementFrom": "HospitalManagementSystem.Doctors.DoctorAppService"
},
- "CreateAsyncByInput": {
- "uniqueName": "CreateAsyncByInput",
- "name": "CreateAsync",
+ "GetDoctorListAsyncByInput": {
+ "uniqueName": "GetDoctorListAsyncByInput",
+ "name": "GetDoctorListAsync",
+ "httpMethod": "GET",
+ "url": "api/app/doctor/doctor-list",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "input",
+ "typeAsString": "HospitalManagementSystem.Dto.PagingSortResultDto, HospitalManagementSystem.Domain.Shared",
+ "type": "HospitalManagementSystem.Dto.PagingSortResultDto",
+ "typeSimple": "HospitalManagementSystem.Dto.PagingSortResultDto",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "input",
+ "name": "Search",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "Sorting",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "SkipCount",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "MaxResultCount",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ }
+ ],
+ "returnValue": {
+ "type": "Abp.Application.Services.Dto.PagedResultDto",
+ "typeSimple": "Abp.Application.Services.Dto.PagedResultDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Doctors.DoctorAppService"
+ },
+ "GetDoctorByIdAsyncById": {
+ "uniqueName": "GetDoctorByIdAsyncById",
+ "name": "GetDoctorByIdAsync",
+ "httpMethod": "GET",
+ "url": "api/app/doctor/{id}/doctor-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.Doctors.Dto.DoctorDto",
+ "typeSimple": "HospitalManagementSystem.Doctors.Dto.DoctorDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Doctors.DoctorAppService"
+ },
+ "GetExportDoctorsRecordAsync": {
+ "uniqueName": "GetExportDoctorsRecordAsync",
+ "name": "GetExportDoctorsRecordAsync",
+ "httpMethod": "GET",
+ "url": "api/app/doctor/export-doctors-record",
+ "supportedVersions": [],
+ "parametersOnMethod": [],
+ "parameters": [],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Dto.FileDownloadDto",
+ "typeSimple": "HospitalManagementSystem.Dto.FileDownloadDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Doctors.DoctorAppService"
+ },
+ "CreateDoctorAsyncByInput": {
+ "uniqueName": "CreateDoctorAsyncByInput",
+ "name": "CreateDoctorAsync",
"httpMethod": "POST",
- "url": "api/app/doctor",
+ "url": "api/app/doctor/doctor",
"supportedVersions": [],
"parametersOnMethod": [
{
@@ -1467,10 +1577,84 @@
}
],
"returnValue": {
- "type": "HospitalManagementSystem.Doctors.Dto.DoctorDto",
- "typeSimple": "HospitalManagementSystem.Doctors.Dto.DoctorDto"
+ "type": "System.Void",
+ "typeSimple": "System.Void"
},
- "allowAnonymous": null,
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Doctors.DoctorAppService"
+ },
+ "UpdatDoctorAsyncByInput": {
+ "uniqueName": "UpdatDoctorAsyncByInput",
+ "name": "UpdatDoctorAsync",
+ "httpMethod": "POST",
+ "url": "api/app/doctor/updat-doctor",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "input",
+ "typeAsString": "HospitalManagementSystem.Dtos.CreateDoctorDto, HospitalManagementSystem.Application",
+ "type": "HospitalManagementSystem.Dtos.CreateDoctorDto",
+ "typeSimple": "HospitalManagementSystem.Dtos.CreateDoctorDto",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "input",
+ "name": "input",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.Dtos.CreateDoctorDto",
+ "typeSimple": "HospitalManagementSystem.Dtos.CreateDoctorDto",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "Body",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "System.Void",
+ "typeSimple": "System.Void"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Doctors.DoctorAppService"
+ },
+ "DeleteDoctorRecordAsyncById": {
+ "uniqueName": "DeleteDoctorRecordAsyncById",
+ "name": "DeleteDoctorRecordAsync",
+ "httpMethod": "DELETE",
+ "url": "api/app/doctor/{id}/doctor-record",
+ "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": "System.Void",
+ "typeSimple": "System.Void"
+ },
+ "allowAnonymous": false,
"implementFrom": "HospitalManagementSystem.Doctors.DoctorAppService"
}
}
@@ -5447,6 +5631,18 @@
{
"name": "DOB",
"jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Education",
+ "jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isRequired": false,
@@ -5457,7 +5653,91 @@
"regex": null
},
{
- "name": "Education",
+ "name": "Specialization",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Degree",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "JoiningDate",
+ "jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Experience",
+ "jsonName": null,
+ "type": "System.Int32?",
+ "typeSimple": "number?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "ConsultationFee",
+ "jsonName": null,
+ "type": "System.Decimal?",
+ "typeSimple": "number?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Availability",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.GlobalEnum.WorkSchedule?",
+ "typeSimple": "HospitalManagementSystem.GlobalEnum.WorkSchedule?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Rating",
+ "jsonName": null,
+ "type": "System.Decimal?",
+ "typeSimple": "number?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "ClinicLocation",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
@@ -5750,6 +6030,18 @@
"enumValues": null,
"genericArguments": null,
"properties": [
+ {
+ "name": "Id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
{
"name": "FirstName",
"jsonName": null,
@@ -5861,6 +6153,18 @@
{
"name": "DOB",
"jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Education",
+ "jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isRequired": false,
@@ -5871,7 +6175,91 @@
"regex": null
},
{
- "name": "Education",
+ "name": "Specialization",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Degree",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "JoiningDate",
+ "jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Experience",
+ "jsonName": null,
+ "type": "System.Int32?",
+ "typeSimple": "number?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "ConsultationFee",
+ "jsonName": null,
+ "type": "System.Decimal?",
+ "typeSimple": "number?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Availability",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.GlobalEnum.WorkSchedule?",
+ "typeSimple": "HospitalManagementSystem.GlobalEnum.WorkSchedule?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Rating",
+ "jsonName": null,
+ "type": "System.Decimal?",
+ "typeSimple": "number?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "ClinicLocation",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
@@ -6041,6 +6429,58 @@
"genericArguments": null,
"properties": null
},
+ "HospitalManagementSystem.GlobalEnum.WorkSchedule": {
+ "baseType": "System.Enum",
+ "isEnum": true,
+ "enumNames": [
+ "MondayToFriday",
+ "TuesdayToSaturday",
+ "WednesdayToSunday",
+ "ThursdayToMonday",
+ "FridayToTuesday",
+ "SaturdayToWednesday",
+ "SundayToThursday",
+ "MondayToThursday",
+ "TuesdayToFriday",
+ "WednesdayToSaturday",
+ "ThursdayToSunday",
+ "FridayToMonday",
+ "SaturdayToTuesday",
+ "SundayToWednesday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ "Sunday"
+ ],
+ "enumValues": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21
+ ],
+ "genericArguments": null,
+ "properties": null
+ },
"HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto": {
"baseType": null,
"isEnum": false,
@@ -6794,6 +7234,41 @@
}
]
},
+ "System.Nullable": {
+ "baseType": "System.ValueType",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": [
+ "T"
+ ],
+ "properties": [
+ {
+ "name": "HasValue",
+ "jsonName": null,
+ "type": "System.Boolean",
+ "typeSimple": "boolean",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Value",
+ "jsonName": null,
+ "type": "T",
+ "typeSimple": "T",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
"Volo.Abp.Account.ChangePasswordInput": {
"baseType": null,
"isEnum": false,
diff --git a/angular/src/app/proxy/global-enum/index.ts b/angular/src/app/proxy/global-enum/index.ts
index 2c8e9cf..0134ca4 100644
--- a/angular/src/app/proxy/global-enum/index.ts
+++ b/angular/src/app/proxy/global-enum/index.ts
@@ -3,3 +3,4 @@ export * from './gender.enum';
export * from './payment-status.enum';
export * from './status.enum';
export * from './visit-type.enum';
+export * from './work-schedule.enum';
diff --git a/angular/src/app/proxy/global-enum/work-schedule.enum.ts b/angular/src/app/proxy/global-enum/work-schedule.enum.ts
new file mode 100644
index 0000000..0bb9f67
--- /dev/null
+++ b/angular/src/app/proxy/global-enum/work-schedule.enum.ts
@@ -0,0 +1,27 @@
+import { mapEnumToOptions } from '@abp/ng.core';
+
+export enum WorkSchedule {
+ MondayToFriday = 1,
+ TuesdayToSaturday = 2,
+ WednesdayToSunday = 3,
+ ThursdayToMonday = 4,
+ FridayToTuesday = 5,
+ SaturdayToWednesday = 6,
+ SundayToThursday = 7,
+ MondayToThursday = 8,
+ TuesdayToFriday = 9,
+ WednesdayToSaturday = 10,
+ ThursdayToSunday = 11,
+ FridayToMonday = 12,
+ SaturdayToTuesday = 13,
+ SundayToWednesday = 14,
+ Monday = 15,
+ Tuesday = 16,
+ Wednesday = 17,
+ Thursday = 18,
+ Friday = 19,
+ Saturday = 20,
+ Sunday = 21,
+}
+
+export const workScheduleOptions = mapEnumToOptions(WorkSchedule);
diff --git a/angular/src/app/route.provider.ts b/angular/src/app/route.provider.ts
index 0bcfff3..1a34e20 100644
--- a/angular/src/app/route.provider.ts
+++ b/angular/src/app/route.provider.ts
@@ -76,7 +76,21 @@ function configureRoutes(routesService: RoutesService) {
order: 302,
requiredPolicy:'HospitalManagementSystem.Department'
},
-
+ {
+ path: '',
+ name: 'Doctors',
+ order: 401,
+ iconClass: 'fas fa-user-md',
+ layout: eLayoutType.application,
+ },
+ {
+ path: '/doctors',
+ name: 'All Doctors',
+ parentName: 'Doctors',
+ iconClass: 'fas fa-clock',
+ order: 402,
+ requiredPolicy:'HospitalManagementSystem.Doctor'
+ },
]);
};
}
diff --git a/angular/src/index.html b/angular/src/index.html
index 5cd0100..6a56309 100644
--- a/angular/src/index.html
+++ b/angular/src/index.html
@@ -2,7 +2,7 @@
- HospitalManagementSystem
+ Hospital Management System
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/DoctorDto.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/DoctorDto.cs
index e9f03bf..d361d3a 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/DoctorDto.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/DoctorDto.cs
@@ -1,4 +1,5 @@
-using System;
+using HospitalManagementSystem.GlobalEnum;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -18,7 +19,15 @@ namespace HospitalManagementSystem.Doctors.Dto
public Guid? DepartmentId { get; set; }
public string? Address { get; set; }
public string? Email { get; set; }
- public string? DOB { get; set; }
+ public DateTime? DOB { get; set; }
public string? Education { get; set; }
+ public string? Specialization { get; set; }
+ public string? Degree { get; set; }
+ public DateTime? JoiningDate { get; set; }
+ public int? Experience { get; set; }
+ public decimal? ConsultationFee { get; set; }
+ public WorkSchedule? Availability { get; set; }
+ public decimal? Rating { get; set; }
+ public string? ClinicLocation { get; set; }
}
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissionDefinitionProvider.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissionDefinitionProvider.cs
index e6adb0f..034486d 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissionDefinitionProvider.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissionDefinitionProvider.cs
@@ -21,7 +21,11 @@ public class HospitalManagementSystemPermissionDefinitionProvider : PermissionDe
DepartmentPermission.AddChild(HospitalManagementSystemPermissions.Department.Edit);
DepartmentPermission.AddChild(HospitalManagementSystemPermissions.Department.Delete);
-
+ //Doctors
+ var DoctorsPermission = HostipalManagementGroup.AddPermission(HospitalManagementSystemPermissions.Doctor.Default);
+ DoctorsPermission.AddChild(HospitalManagementSystemPermissions.Doctor.Create);
+ DoctorsPermission.AddChild(HospitalManagementSystemPermissions.Doctor.Edit);
+ DoctorsPermission.AddChild(HospitalManagementSystemPermissions.Doctor.Delete);
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissions.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissions.cs
index 3fe0162..2d70742 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissions.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissions.cs
@@ -20,4 +20,11 @@ public static class HospitalManagementSystemPermissions
public const string Edit = Default + ".Edit";
public const string Delete = Default + ".Delete";
}
+ public static class Doctor
+ {
+ public const string Default = GroupName + ".Doctor";
+ public const string Create = Default + ".Create";
+ public const string Edit = Default + ".Edit";
+ public const string Delete = Default + ".Delete";
+ }
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/Doctors/DoctorAppService.cs b/aspnet-core/src/HospitalManagementSystem.Application/Doctors/DoctorAppService.cs
index 009605e..acf98b6 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application/Doctors/DoctorAppService.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application/Doctors/DoctorAppService.cs
@@ -1,19 +1,34 @@
-using HospitalManagementSystem.Departments;
+using Abp.Application.Services.Dto;
+using ClosedXML.Excel;
+using HospitalManagementSystem.Departments;
using HospitalManagementSystem.Doctors.Dto;
+using HospitalManagementSystem.Dto;
using HospitalManagementSystem.Dtos;
+using HospitalManagementSystem.Permissions;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
+using System.IO;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
+using System.IO;
+using System.Linq;
+using System.Linq.Dynamic.Core;
+using Abp.UI;
namespace HospitalManagementSystem.Doctors
{
- public class DoctorAppService : ApplicationService, IDoctorAppService
+ public class DoctorAppService : ApplicationService
{
private readonly IRepository _doctorRepository;
- public DoctorAppService(IRepository doctorRepository)
+ private readonly IWebHostEnvironment _env;
+
+ public DoctorAppService(IRepository doctorRepository, IWebHostEnvironment env)
{
_doctorRepository = doctorRepository;
+ _env = env;
}
public async Task> GetAsync()
{
@@ -22,11 +37,160 @@ namespace HospitalManagementSystem.Doctors
doctorDtos = ObjectMapper.Map, List>(data);
return doctorDtos;
}
- public async Task CreateAsync(CreateDoctorDto input)
+ //public async Task CreateAsync(CreateDoctorDto input)
+ //{
+ // var doctor = new Doctor(Guid.NewGuid(), input.FirstName, input.LastName, input.Gender, input.Mobile, input.Password, input.Designation, input.DepartmentId, input.Address, input.Email, input.DOB, input.Education);
+ // await _doctorRepository.InsertAsync(doctor);
+ // return ObjectMapper.Map(doctor);
+ //}
+
+
+ #region Get Doctors List with Paging and Searching
+ [Authorize(HospitalManagementSystemPermissions.Doctor.Default)]
+
+ public async Task> GetDoctorListAsync(PagingSortResultDto input)
{
- var doctor = new Doctor(Guid.NewGuid(), input.FirstName, input.LastName, input.Gender, input.Mobile, input.Password, input.Designation, input.DepartmentId, input.Address, input.Email, input.DOB, input.Education);
- await _doctorRepository.InsertAsync(doctor);
+ var queryable = await _doctorRepository.GetQueryableAsync();
+
+ var filteredQuery = queryable
+ .WhereIf(!string.IsNullOrEmpty(input.Search), x => x.FirstName.ToLower().Contains(input.Search.ToLower()) || x.LastName.ToLower().Contains(input.Search.ToLower()) || x.Mobile.ToLower().Contains(input.Search.ToLower()));
+
+ var totalCount = await filteredQuery.CountAsync();
+
+ filteredQuery = !string.IsNullOrEmpty(input.Sorting)
+ ? filteredQuery.OrderBy(input.Sorting)
+ : filteredQuery.OrderBy(x => x.Id);
+
+ var pagedQuery = await filteredQuery
+ .Skip(input.SkipCount)
+ .Take(input.MaxResultCount)
+ .ToListAsync();
+ var doctorDto = ObjectMapper.Map, List>(pagedQuery);
+
+ return new PagedResultDto(
+ totalCount,
+ doctorDto
+ );
+
+ }
+ #endregion
+
+ #region Get Doctors by ID
+ [Authorize(HospitalManagementSystemPermissions.Doctor.Default)]
+
+ public async Task GetDoctorByIdAsync(Guid id)
+ {
+ var doctor = await _doctorRepository.FirstOrDefaultAsync(x => x.Id == id);
+ if (doctor == null)
+ {
+ throw new UserFriendlyException("Doctor Details not found");
+ }
return ObjectMapper.Map(doctor);
}
+
+ #endregion
+ #region Export Doctors Data to Excel
+ [Authorize(HospitalManagementSystemPermissions.Doctor.Default)]
+
+ public async Task GetExportDoctorsRecordAsync()
+ {
+ var DoctorRecord = await _doctorRepository.ToListAsync();
+
+ var folderPath = Path.Combine(_env.WebRootPath, "temp");
+ if (!Directory.Exists(folderPath))
+ {
+ Directory.CreateDirectory(folderPath);
+ }
+
+ var filename = "Doctors_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".xlsx";
+ var filePath = Path.Combine(folderPath, filename);
+
+ // Create a workbook and worksheet
+ using (var workbook = new XLWorkbook())
+ {
+ var worksheet = workbook.Worksheets.Add("Doctor");
+
+ // Add headers
+ worksheet.Cell(1, 1).Value = "Name";
+ worksheet.Cell(1, 2).Value = "Email";
+ worksheet.Cell(1, 3).Value = "Specialization";
+ worksheet.Cell(1, 4).Value = "Date";
+ worksheet.Cell(1, 5).Value = "Department";
+ worksheet.Cell(1, 6).Value = "Mobile";
+ worksheet.Cell(1, 7).Value = "Degree";
+ worksheet.Cell(1, 8).Value = "Experience Years";
+ worksheet.Cell(1, 9).Value = "Fees";
+ worksheet.Cell(1, 10).Value = "Availability";
+ worksheet.Cell(1, 11).Value = "Rating";
+ worksheet.Cell(1, 12).Value = "Clinic Location";
+
+ for (int i = 0; i < DoctorRecord.Count; i++)
+ {
+ worksheet.Cell(i + 2, 1).Value = DoctorRecord[i].FirstName+" "+ DoctorRecord[i].LastName;
+ worksheet.Cell(i + 2, 2).Value = DoctorRecord[i].Email;
+ worksheet.Cell(i + 2, 3).Value = DoctorRecord[i].Specialization;
+ worksheet.Cell(i + 2, 4).Value = DoctorRecord[i].JoiningDate?.ToShortDateString();
+ worksheet.Cell(i + 2, 5).Value = DoctorRecord[i].Department.DepartmentName;
+ worksheet.Cell(i + 2, 6).Value = DoctorRecord[i].Mobile;
+ worksheet.Cell(i + 2, 6).Value = DoctorRecord[i].Degree;
+ worksheet.Cell(i + 2, 6).Value = DoctorRecord[i].Experience;
+ worksheet.Cell(i + 2, 6).Value = DoctorRecord[i].ConsultationFee;
+ worksheet.Cell(i + 2, 6).Value = DoctorRecord[i].Availability.ToString();
+ worksheet.Cell(i + 2, 6).Value = DoctorRecord[i].Rating;
+ worksheet.Cell(i + 2, 6).Value = DoctorRecord[i].ClinicLocation;
+
+ }
+
+ worksheet.Columns().AdjustToContents();
+ workbook.SaveAs(filePath);
+ }
+
+ byte[] fileBytes = await File.ReadAllBytesAsync(filePath);
+ File.Delete(filePath);
+
+ return new FileDownloadDto
+ {
+ FileName = filename,
+ FileContent = Convert.ToBase64String(fileBytes)
+ };
+ }
+
+ #endregion
+
+ #region Create Doctors
+ [Authorize(HospitalManagementSystemPermissions.Doctor.Create)]
+
+ public async Task CreateDoctorAsync(CreateDoctorDto input)
+ {
+ var newdata = ObjectMapper.Map(input);
+ await _doctorRepository.InsertAsync(newdata);
+
+ }
+ #endregion
+
+ #region Update Doctors
+ [Authorize(HospitalManagementSystemPermissions.Doctor.Edit)]
+
+ public async Task UpdatDoctorAsync(CreateDoctorDto input)
+ {
+ try
+ {
+ var newdata = ObjectMapper.Map(input);
+
+ await _doctorRepository.UpdateAsync(newdata);
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
+ }
+ #endregion
+ #region Delete Doctors
+ [Authorize(HospitalManagementSystemPermissions.Doctor.Delete)]
+ public async Task DeleteDoctorRecordAsync(Guid id)
+ {
+ await _doctorRepository.DeleteAsync(id);
+ }
+ #endregion
}
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/Dtos/CreateDoctorDto.cs b/aspnet-core/src/HospitalManagementSystem.Application/Dtos/CreateDoctorDto.cs
index 51157b3..9f56671 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application/Dtos/CreateDoctorDto.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application/Dtos/CreateDoctorDto.cs
@@ -1,4 +1,5 @@
using HospitalManagementSystem.Enums;
+using HospitalManagementSystem.GlobalEnum;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -9,6 +10,8 @@ namespace HospitalManagementSystem.Dtos
{
public class CreateDoctorDto
{
+ public Guid Id { get; set; }
+
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? Gender { get; set; }
@@ -18,7 +21,15 @@ namespace HospitalManagementSystem.Dtos
public Guid? DepartmentId { get; set; }
public string? Address { get; set; }
public string? Email { get; set; }
- public string? DOB { get; set; }
+ public DateTime? DOB { get; set; }
public string? Education { get; set; }
+ public string? Specialization { get; set; }
+ public string? Degree { get; set; }
+ public DateTime? JoiningDate { get; set; }
+ public int? Experience { get; set; }
+ public decimal? ConsultationFee { get; set; }
+ public WorkSchedule? Availability { get; set; }
+ public decimal? Rating { get; set; }
+ public string? ClinicLocation { get; set; }
}
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/MainAppAutoMapperProfile.cs b/aspnet-core/src/HospitalManagementSystem.Application/MainAppAutoMapperProfile.cs
index 0bfdff6..4306bb4 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application/MainAppAutoMapperProfile.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application/MainAppAutoMapperProfile.cs
@@ -50,6 +50,8 @@ namespace HospitalManagementSystem
#region Doctor
CreateMap();
CreateMap();
+ CreateMap();
+ CreateMap();
#endregion
}
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs b/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs
index 0ac620a..5c19c7b 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs
@@ -31,12 +31,12 @@ namespace HospitalManagementSystem.Patients
private IRepository _patientRepository;
private IRepository _entityDocumentRepository;
private IRepository _patientDocumentRepository;
- private IRepository _doctorrepository;
+ private IRepository _doctorrepository;
private readonly IWebHostEnvironment _env;
private SharedAppService _sharedappService;
List uniqueid = new List();
- public PatientAppService(IRepository patientrecordRepository, IRepository patientRepository, IWebHostEnvironment env, IRepository entityDocumentRepository, IRepository patientDocumentRepository, SharedAppService sharedappService, IRepository doctorrepository)
+ public PatientAppService(IRepository patientrecordRepository, IRepository patientRepository, IWebHostEnvironment env, IRepository entityDocumentRepository, IRepository patientDocumentRepository, SharedAppService sharedappService, IRepository doctorrepository)
{
_patientrecordRepository = patientrecordRepository;
_patientRepository = patientRepository;
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs
index 0df8378..966b82e 100644
--- a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs
@@ -37,4 +37,30 @@ namespace HospitalManagementSystem.GlobalEnum
Unpaid = 3,
}
+ public enum WorkSchedule
+ {
+ MondayToFriday = 1,
+ TuesdayToSaturday = 2,
+ WednesdayToSunday = 3,
+ ThursdayToMonday = 4,
+ FridayToTuesday = 5,
+ SaturdayToWednesday = 6,
+ SundayToThursday = 7,
+ MondayToThursday = 8,
+ TuesdayToFriday = 9,
+ WednesdayToSaturday = 10,
+ ThursdayToSunday = 11,
+ FridayToMonday = 12,
+ SaturdayToTuesday = 13,
+ SundayToWednesday = 14,
+ Monday = 15,
+ Tuesday = 16,
+ Wednesday = 17,
+ Thursday = 18,
+ Friday = 19,
+ Saturday = 20,
+ Sunday = 21
+ }
+
+
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/Doctor.cs b/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/Doctor.cs
index 53fe041..5f020cf 100644
--- a/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/Doctor.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/Doctor.cs
@@ -1,6 +1,7 @@
using HospitalManagementSystem.Appointments;
using HospitalManagementSystem.Departments;
using HospitalManagementSystem.Enums;
+using HospitalManagementSystem.GlobalEnum;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
@@ -21,8 +22,16 @@ namespace HospitalManagementSystem.Doctors
public virtual Department? Department { get; set; }
public string? Address { get; set; }
public string? Email { get; set; }
- public string? DOB { get; set; }
+ public DateTime? DOB { get; set; }
public string? Education { get; set; }
+ public string? Specialization { get; set; }
+ public string? Degree { get; set; }
+ public DateTime? JoiningDate { get; set; }
+ public int? Experience { get; set; }
+ public decimal? ConsultationFee { get; set; }
+ public WorkSchedule? Availability { get; set; }
+ public decimal? Rating { get; set; }
+ public string? ClinicLocation { get; set; }
public virtual ICollection Appointments { get; set; } = new List();
public Doctor()
{
@@ -31,7 +40,7 @@ namespace HospitalManagementSystem.Doctors
public Doctor(Guid id, string? firstName, string? lastName,
string? gender, string? mobile, string? password,
string? designation, Guid? departmentId, string? address,
- string? email, string? dOB, string? education) : base(id)
+ string? email, DateTime? dOB, string? education) : base(id)
{
FirstName = firstName;
LastName = lastName;
diff --git a/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250212060155_modify_doctor.Designer.cs b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250212060155_modify_doctor.Designer.cs
new file mode 100644
index 0000000..baa58d0
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250212060155_modify_doctor.Designer.cs
@@ -0,0 +1,2565 @@
+//
+using System;
+using HospitalManagementSystem.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+#nullable disable
+
+namespace HospitalManagementSystem.Migrations
+{
+ [DbContext(typeof(HospitalManagementSystemDbContext))]
+ [Migration("20250212060155_modify_doctor")]
+ partial class modify_doctor
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("ProductVersion", "9.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("HospitalManagementSystem.Appointments.Appointment", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Address")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AppointmentStatus")
+ .HasColumnType("int");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DOB")
+ .HasColumnType("datetime2");
+
+ b.Property("DateOfAppointment")
+ .HasColumnType("datetime2");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("DoctorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Email")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FirstName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Gender")
+ .HasColumnType("int");
+
+ b.Property("InjuryORContion")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("InsuranceProvider")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("LastName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Mobile")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Note")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PaymentStatus")
+ .HasColumnType("int");
+
+ b.Property("TimeOfAppointment")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("VisitType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DoctorId");
+
+ b.ToTable("Appointments");
+ });
+
+ modelBuilder.Entity("HospitalManagementSystem.Departments.Department", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("DepartmentDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DepartmentHead")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DepartmentName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DepartmentNo")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Status")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Departments");
+ });
+
+ modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Address")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Availability")
+ .HasColumnType("int");
+
+ b.Property("ClinicLocation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConsultationFee")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DOB")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Degree")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("DepartmentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Designation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Education")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Email")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Experience")
+ .HasColumnType("int");
+
+ b.Property("FirstName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Gender")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("JoiningDate")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("LastName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Mobile")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Password")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Rating")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Specialization")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DepartmentId");
+
+ b.ToTable("Doctors");
+ });
+
+ modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("FilePath")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FileSize")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FileType")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("GeneratedFileName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("OriginalFileName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TagName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("UploadDate")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.ToTable("EntityDocuments", (string)null);
+ });
+
+ modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EntityDocumentsId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PatientsId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("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("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Address")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Age")
+ .HasColumnType("int");
+
+ b.Property("BloodGroup")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Gender")
+ .HasColumnType("int");
+
+ b.Property("ImagesId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("InsuranceProvider")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Mobile")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PatientCardId")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ImagesId");
+
+ b.ToTable("Patient", (string)null);
+ });
+
+ modelBuilder.Entity("HospitalManagementSystem.Patients.PatientRecord", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DateOfAdmission")
+ .HasColumnType("datetime2");
+
+ b.Property("Diagnosis")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DischargeDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DoctorAssignedId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DoctorNotes")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("LabReportUrlId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MedicationHistoryUrlId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("MedicationUrlId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("NextFollowUp")
+ .HasColumnType("datetime2");
+
+ b.Property("PatientsId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Status")
+ .HasColumnType("int");
+
+ b.Property("TreatmentPlan")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DoctorAssignedId");
+
+ b.HasIndex("LabReportUrlId");
+
+ b.HasIndex("MedicationHistoryUrlId");
+
+ b.HasIndex("MedicationUrlId");
+
+ b.HasIndex("PatientsId");
+
+ b.ToTable("PatientRecords", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ApplicationName")
+ .HasMaxLength(96)
+ .HasColumnType("nvarchar(96)")
+ .HasColumnName("ApplicationName");
+
+ b.Property("BrowserInfo")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)")
+ .HasColumnName("BrowserInfo");
+
+ b.Property("ClientId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ClientId");
+
+ b.Property("ClientIpAddress")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ClientIpAddress");
+
+ b.Property("ClientName")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("ClientName");
+
+ b.Property("Comments")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("Comments");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CorrelationId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("CorrelationId");
+
+ b.Property("Exceptions")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExecutionDuration")
+ .HasColumnType("int")
+ .HasColumnName("ExecutionDuration");
+
+ b.Property("ExecutionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("HttpMethod")
+ .HasMaxLength(16)
+ .HasColumnType("nvarchar(16)")
+ .HasColumnName("HttpMethod");
+
+ b.Property("HttpStatusCode")
+ .HasColumnType("int")
+ .HasColumnName("HttpStatusCode");
+
+ b.Property("ImpersonatorTenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("ImpersonatorTenantId");
+
+ b.Property("ImpersonatorTenantName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ImpersonatorTenantName");
+
+ b.Property("ImpersonatorUserId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("ImpersonatorUserId");
+
+ b.Property("ImpersonatorUserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("ImpersonatorUserName");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TenantName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("TenantName");
+
+ b.Property("Url")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("Url");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("UserId");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("UserName");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "ExecutionTime");
+
+ b.HasIndex("TenantId", "UserId", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogs", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditLogId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("AuditLogId");
+
+ b.Property("ExecutionDuration")
+ .HasColumnType("int")
+ .HasColumnName("ExecutionDuration");
+
+ b.Property("ExecutionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("ExecutionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("MethodName")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("MethodName");
+
+ b.Property("Parameters")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)")
+ .HasColumnName("Parameters");
+
+ b.Property("ServiceName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("ServiceName");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogActions", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditLogId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("AuditLogId");
+
+ b.Property("ChangeTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("ChangeTime");
+
+ b.Property("ChangeType")
+ .HasColumnType("tinyint")
+ .HasColumnName("ChangeType");
+
+ b.Property("EntityId")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("EntityId");
+
+ b.Property("EntityTenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EntityTypeFullName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("EntityTypeFullName");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
+
+ b.ToTable("AbpEntityChanges", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EntityChangeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("NewValue")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)")
+ .HasColumnName("NewValue");
+
+ b.Property("OriginalValue")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)")
+ .HasColumnName("OriginalValue");
+
+ b.Property("PropertyName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("PropertyName");
+
+ b.Property("PropertyTypeFullName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("PropertyTypeFullName");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EntityChangeId");
+
+ b.ToTable("AbpEntityPropertyChanges", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsAbandoned")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("JobArgs")
+ .IsRequired()
+ .HasMaxLength(1048576)
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("JobName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("LastTryTime")
+ .HasColumnType("datetime2");
+
+ b.Property("NextTryTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Priority")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint")
+ .HasDefaultValue((byte)15);
+
+ b.Property