diff --git a/angular/src/app/doctors/doctor-dialog.component.scss b/angular/src/app/doctors/doctor-dialog.component.scss
index 42889f1..27140ca 100644
--- a/angular/src/app/doctors/doctor-dialog.component.scss
+++ b/angular/src/app/doctors/doctor-dialog.component.scss
@@ -32,4 +32,54 @@
.w-full {
width: 100%;
}
-
\ No newline at end of file
+ .dropdown-item-container {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0.5rem 0; /* adjust as needed */
+ }
+
+ .day-label {
+ flex: 0 0 auto;
+ }
+
+ .time-options {
+ flex: 1;
+ display: flex;
+ gap: 0.5rem;
+ justify-content: flex-end;
+ }
+
+ .time-label {
+ display: flex;
+ align-items: center;
+ }
+/* Style for the container below the multi-select */
+.selected-days-container {
+ margin-top: 1rem;
+ padding: 1rem;
+ border: 1px solid #e0e0e0;
+ border-radius: 4px;
+ background: #fafafa;
+}
+
+/* Header styling */
+.selected-days-header {
+ margin-bottom: 0.75rem;
+ font-size: 1.1rem;
+ color: #333;
+}
+
+/* Each day row */
+.day-time-row {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ margin-bottom: 0.5rem;
+}
+
+/* Fixed width for day label */
+.day-label {
+ width: 100px;
+ font-weight: 600;
+}
diff --git a/angular/src/app/doctors/doctor-dialog.component.ts b/angular/src/app/doctors/doctor-dialog.component.ts
index 4e1b0ab..4020043 100644
--- a/angular/src/app/doctors/doctor-dialog.component.ts
+++ b/angular/src/app/doctors/doctor-dialog.component.ts
@@ -14,12 +14,14 @@ import { InputTextareaModule } from 'primeng/inputtextarea';
import { RadioButtonModule } from 'primeng/radiobutton';
import { TableModule } from 'primeng/table';
import { RatingModule } from 'primeng/rating';
-import { TimeSlot, WorkSchedule, workScheduleOptions } from '@proxy/global-enum';
+import { MultiSelectModule } from 'primeng/multiselect';
+import { TimeSlot, timeSlotOptions, WorkSchedule, workScheduleOptions } from '@proxy/global-enum';
// Define Type for Availability
-interface AvailabilitySchedule {
- schedule: WorkSchedule | null;
- startTime: Date | null;
- endTime: Date | null;
+
+interface ScheduleOption {
+ label: string;
+ value: string;
+ items?: ScheduleOption[];
}
@Component({
selector: 'app-doctor-dialog',
@@ -39,6 +41,7 @@ interface AvailabilitySchedule {
ChipModule,
CommonModule,
RatingModule,
+ MultiSelectModule,
],
templateUrl: './doctor-dialog.component.html',
styleUrl: './doctor-dialog.component.scss',
@@ -53,15 +56,24 @@ export class DoctorDialogComponent implements OnInit {
doctorDialog: boolean;
JoiningDate: Date;
dateofbirth: Date;
- availabilitySchedules: AvailabilitySchedule[] = []; // Separate storage for availability
+ isSchedulePopupVisible = false;
+ selectedDays: { label: string; value: string }[] = [];
+ selectedTimeSlots: { [key: number]: number | null } = {};
+
+ displayDialog: boolean = false;
+ selectedDay: any = null;
+ selectedTime: any = null;
+ selectedTimes: { [key: number]: number } = {};
+
+ workScheduleOptions: { label: string; value: number }[] = [];
+ timeSlotOptions: { label: string; value: number }[] = [];
constructor(private DoctorService: DoctorService, private toaster: ToasterService) {}
ngOnInit(): void {
if (this.isEditMode) {
this.fetchDoctorData();
- }
- else{
+ } else {
this.doctor = {
firstName: '',
lastName: '',
@@ -80,11 +92,12 @@ export class DoctorDialogComponent implements OnInit {
experience: 0,
consultationFee: 0,
availability: null,
- timeSlot:null,
rating: 0,
clinicLocation: '',
};
}
+ this.initializeWorkScheduleOptions();
+ this.initializeTimeSlotOptions();
}
doctor: CreateDoctorDto = {
@@ -106,28 +119,48 @@ export class DoctorDialogComponent implements OnInit {
experience: 0,
consultationFee: 0,
availability: null,
- timeSlot:null,
-
rating: 0,
clinicLocation: '',
};
- workScheduleOptions = Object.keys(WorkSchedule)
- .filter((key) => isNaN(Number(key))) // Only get string keys (not numeric values)
- .map((key) => ({
- label: key.replace(/([A-Z])/g, ' $1').trim(), // Format enum keys as readable labels
- value: WorkSchedule[key as keyof typeof WorkSchedule], // Get enum value
- }));
+
+ openDialog() {
+ this.displayDialog = true;
+ }
+ onDaysChange(event: any) {
+ this.selectedDays=event.value;
+ }
+ onTimeChange(dayValue: number, timeValue: number) {
+ this.selectedTimes[dayValue] = timeValue;
+ }
+ closeDialog() {
+ this.displayDialog = false;
+ }
+ initializeWorkScheduleOptions() {
+ this.workScheduleOptions = Object.keys(WorkSchedule)
+ .filter(key => isNaN(Number(key)))
+ .map(key => {
+ const value = WorkSchedule[key as keyof typeof WorkSchedule];
+ return { label: key, value };
+ });
+ }
+
+ initializeTimeSlotOptions() {
+ this.timeSlotOptions = Object.keys(TimeSlot)
+ .filter(key => isNaN(Number(key)))
+ .map(key => {
+ const value = TimeSlot[key as keyof typeof TimeSlot];
+ return { label: key, value };
+ });
+ }
+
+ saveSelection() {
+ const availability = this.selectedDays.map(day => ({
+ day: day.value,
+ time: this.selectedTimes[day.value] || null,
+ }));
+ this.displayDialog = false;
+ }
- timeSlotOptions: { label: string, value: TimeSlot }[] = [
- { label: '10:00 AM - 7:00 PM', value: TimeSlot.TenToSeven },
- { label: '09:00 AM - 5:00 PM', value: TimeSlot.NineToFive },
- { label: '08:00 AM - 4:00 PM', value: TimeSlot.EightToFour },
- { label: '07:00 AM - 4:00 PM', value: TimeSlot.SevenToFour },
- { label: '06:00 AM - 3:00 PM', value: TimeSlot.SixToThree },
- { label: '12:00 PM - 9:00 PM', value: TimeSlot.TwelveToNine },
- { label: '10:00 AM - 6:00 PM', value: TimeSlot.TenToSix },
- { label: '11:00 AM - 8:00 PM', value: TimeSlot.ElevenToEight },
- ];
fetchDoctorData() {
this.DoctorService.getDoctorById(this.Id).subscribe(result => {
this.doctor = result;
@@ -168,18 +201,4 @@ export class DoctorDialogComponent implements OnInit {
this.Id = '';
this.close.emit();
}
- addAvailability() {
- this.availabilitySchedules.push({ schedule: null, startTime: null, endTime: null });
- this.syncDoctorAvailability(); // Sync with doctor object
- }
-
- removeAvailability(index: number) {
- this.availabilitySchedules.splice(index, 1);
- this.syncDoctorAvailability(); // Sync after removal
- }
-
- syncDoctorAvailability() {
- // this.doctor.availability = [...this.availabilitySchedules]; // Keep doctor object updated
- }
-
}
diff --git a/angular/src/app/doctors/doctors-routing.module.ts b/angular/src/app/doctors/doctors-routing.module.ts
index deaf348..89397d4 100644
--- a/angular/src/app/doctors/doctors-routing.module.ts
+++ b/angular/src/app/doctors/doctors-routing.module.ts
@@ -1,8 +1,12 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DoctorsComponent } from './doctors.component';
+import { ShiftManagementComponent } from './shift-management/shift-management.component';
-const routes: Routes = [{ path: '', component: DoctorsComponent }];
+const routes: Routes = [
+ { path: '', component: DoctorsComponent },
+ { path: 'shift-management/:id', component: ShiftManagementComponent },
+];
@NgModule({
imports: [RouterModule.forChild(routes)],
diff --git a/angular/src/app/doctors/doctors.component.html b/angular/src/app/doctors/doctors.component.html
index 283741c..5754075 100644
--- a/angular/src/app/doctors/doctors.component.html
+++ b/angular/src/app/doctors/doctors.component.html
@@ -69,6 +69,9 @@
+
diff --git a/angular/src/app/doctors/doctors.component.ts b/angular/src/app/doctors/doctors.component.ts
index c768b0f..d0bc2a1 100644
--- a/angular/src/app/doctors/doctors.component.ts
+++ b/angular/src/app/doctors/doctors.component.ts
@@ -1,6 +1,7 @@
import { ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
import { DoctorService } from '@proxy/doctors';
import { PagingSortResultDto } from '@proxy/dto';
import { workScheduleOptions } from '@proxy/global-enum';
@@ -15,7 +16,7 @@ export class DoctorsComponent implements OnInit {
doctors = [];
loading: boolean = false;
params: PagingSortResultDto;
- isModalVisible: boolean=false;
+ isModalVisible: boolean = false;
isEditMode: boolean = false;
DoctorIdToEdit: string;
@@ -32,7 +33,8 @@ export class DoctorsComponent implements OnInit {
private DoctorService: DoctorService,
private http: HttpClient,
private confirmation: ConfirmationService,
- private toaster: ToasterService
+ private toaster: ToasterService,
+ private router: Router
) {}
workSchedule = Object.keys(workScheduleOptions)
.filter(key => !isNaN(Number(key)))
@@ -60,13 +62,13 @@ export class DoctorsComponent implements OnInit {
}
openNewDoctorDialog() {
- this.isModalVisible=true;
+ this.isModalVisible = true;
this.isEditMode = false;
}
editDoctor(Doctor: any) {
this.isEditMode = true;
- this.DoctorIdToEdit = Doctor.id;
- this.isModalVisible=true;
+ this.DoctorIdToEdit = Doctor.id;
+ this.isModalVisible = true;
}
closeDialog() {
@@ -105,4 +107,9 @@ export class DoctorsComponent implements OnInit {
window.URL.revokeObjectURL(url);
});
}
+ GotoShiftManagement(id:string) {
+ this.router.navigate(['/doctors/shift-management', id]);
+
+
+ }
}
diff --git a/angular/src/app/doctors/doctors.module.ts b/angular/src/app/doctors/doctors.module.ts
index ac7c84b..0649ee2 100644
--- a/angular/src/app/doctors/doctors.module.ts
+++ b/angular/src/app/doctors/doctors.module.ts
@@ -14,9 +14,10 @@ import { InputTextareaModule } from 'primeng/inputtextarea';
import { RadioButtonModule } from 'primeng/radiobutton';
import { TableModule } from 'primeng/table';
import { DoctorDialogComponent } from './doctor-dialog.component';
+import { ShiftManagementComponent } from './shift-management/shift-management.component';
@NgModule({
- declarations: [DoctorsComponent],
+ declarations: [DoctorsComponent,ShiftManagementComponent],
imports: [
CommonModule,
DoctorsRoutingModule,
@@ -32,7 +33,9 @@ import { DoctorDialogComponent } from './doctor-dialog.component';
RadioButtonModule,
InputTextareaModule,
ChipModule,
- DoctorDialogComponent
+ DoctorDialogComponent,
+
+
],
})
diff --git a/angular/src/app/doctors/shift-management/shift-management.component.html b/angular/src/app/doctors/shift-management/shift-management.component.html
new file mode 100644
index 0000000..b4c03d3
--- /dev/null
+++ b/angular/src/app/doctors/shift-management/shift-management.component.html
@@ -0,0 +1,52 @@
+
+
Shift Management
+
+
+
+
+
diff --git a/angular/src/app/doctors/shift-management/shift-management.component.scss b/angular/src/app/doctors/shift-management/shift-management.component.scss
new file mode 100644
index 0000000..81733d3
--- /dev/null
+++ b/angular/src/app/doctors/shift-management/shift-management.component.scss
@@ -0,0 +1,66 @@
+.shift-column-layout {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ gap: 20px;
+ margin-top: 20px;
+}
+
+.shift-column {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ background: #f8f9fa;
+ border-radius: 8px;
+ padding: 15px;
+ min-width: 150px;
+ max-width: 180px;
+ flex: 1;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ transition: all 0.3s ease-in-out;
+}
+
+.shift-column:hover {
+ transform: scale(1.05);
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
+}
+
+.day-header {
+ font-size: 16px;
+ font-weight: bold;
+ margin-bottom: 10px;
+ color: #007bff;
+ text-transform: uppercase;
+}
+
+.dropdown-item {
+ width: 100%;
+}
+
+
+/* Center the button (optional) */
+.button-container {
+ margin: 1rem 0;
+}
+
+/* Styling for the dialog */
+.availability-dialog .p-dialog-header {
+ background-color: #1976d2;
+ color: #fff;
+ font-weight: 600;
+}
+
+.availability-dialog .p-dialog-content {
+ padding: 1.5rem;
+}
+
+.footer-buttons {
+ display: flex;
+ justify-content: flex-end;
+ gap: 0.5rem;
+}
+
+/* Optional: Adjust field spacing */
+.field {
+ margin-bottom: 1rem;
+}
diff --git a/angular/src/app/doctors/shift-management/shift-management.component.spec.ts b/angular/src/app/doctors/shift-management/shift-management.component.spec.ts
new file mode 100644
index 0000000..3ee6ffc
--- /dev/null
+++ b/angular/src/app/doctors/shift-management/shift-management.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ShiftManagementComponent } from './shift-management.component';
+
+describe('ShiftManagementComponent', () => {
+ let component: ShiftManagementComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [ShiftManagementComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(ShiftManagementComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/angular/src/app/doctors/shift-management/shift-management.component.ts b/angular/src/app/doctors/shift-management/shift-management.component.ts
new file mode 100644
index 0000000..bc00ea4
--- /dev/null
+++ b/angular/src/app/doctors/shift-management/shift-management.component.ts
@@ -0,0 +1,173 @@
+import { ToasterService } from '@abp/ng.theme.shared';
+import { Component, OnChanges, OnInit, SimpleChanges } from '@angular/core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { DoctorService } from '@proxy/doctors';
+import { CreateUpdateShiftManagementDto } from '@proxy/doctors/dto';
+import { TimeSlot, WorkSchedule } from '@proxy/global-enum';
+import { ShiftManagementService } from '@proxy/shift-management';
+
+@Component({
+ selector: 'app-shift-management',
+ templateUrl: './shift-management.component.html',
+ styleUrl: './shift-management.component.scss',
+})
+export class ShiftManagementComponent implements OnInit {
+ doctors = [];
+ selectedDoctor: string | null = null;
+ selectedDoctorName = '';
+ selectedDoctorEmail = '';
+ selectedDoctorPhone = '';
+ selectedDoctorSpecialty = '';
+ selectedDays = [];
+ selectedTimeSlots: { [key: string]: TimeSlot } = {};
+ DoctorID: string;
+ constructor(
+ private DoctorService: DoctorService,
+ private shiftService: ShiftManagementService,
+ private toaster: ToasterService,
+ private router: Router,
+ private route: ActivatedRoute
+ ) {}
+ ngOnInit(): void {
+ this.getdoctorlist();
+
+ setTimeout(() => {
+ this.DoctorID = this.route.snapshot.paramMap.get('id');
+ this.onDoctorSelect(this.DoctorID);
+ }, 10);
+
+ }
+
+ getdoctorlist() {
+ this.DoctorService.get().subscribe(result => {
+ const doctors = result;
+ this.doctors = doctors.map(doctor => ({
+ label: `Dr. ${doctor.firstName} ${doctor.lastName}`,
+ value: doctor.id,
+ availability: doctor.availability,
+ email: doctor.email,
+ phoneNo: doctor.mobile,
+ specialist: doctor.specialization,
+ }));
+ });
+ }
+
+ shiftData: CreateUpdateShiftManagementDto = {
+ doctorId: this.selectedDoctor,
+ shifts: {} as Record,
+ isActive: true,
+ };
+
+ workScheduleOptions = Object.keys(WorkSchedule)
+ .filter(key => isNaN(Number(key)))
+ .map(key => ({
+ label: key.replace(/([A-Z])/g, ' $1').trim(),
+ value: WorkSchedule[key as keyof typeof WorkSchedule],
+ }));
+
+ getTimeRangeLabel(value: TimeSlot): string {
+ const timeRanges = {
+ [TimeSlot.TenToSeven]: { start: 10, end: 19 },
+ [TimeSlot.NineToFive]: { start: 9, end: 17 },
+ [TimeSlot.EightToFour]: { start: 8, end: 16 },
+ [TimeSlot.SevenToFour]: { start: 7, end: 16 },
+ [TimeSlot.SixToThree]: { start: 6, end: 15 },
+ [TimeSlot.TwelveToNine]: { start: 12, end: 21 },
+ [TimeSlot.TenToSix]: { start: 10, end: 18 },
+ [TimeSlot.ElevenToEight]: { start: 11, end: 20 },
+ };
+
+ const { start, end } = timeRanges[value];
+ const formatTime = (hour: number): string => {
+ const period = hour >= 12 ? 'PM' : 'AM';
+ const formattedHour = hour % 12 || 12;
+ return `${formattedHour}:00 ${period}`;
+ };
+
+ return `${formatTime(start)} - ${formatTime(end)}`;
+ }
+ timeSlotOptions = Object.keys(TimeSlot)
+ .filter(key => isNaN(Number(key)))
+ .map(key => ({
+ label: this.getTimeRangeLabel(TimeSlot[key as keyof typeof TimeSlot]),
+ value: TimeSlot[key as keyof typeof TimeSlot],
+ }));
+
+ onDoctorSelect(doctorId: string) {
+ const selectedDoctor = this.doctors.find(doctor => doctor.value === doctorId);
+
+ if (selectedDoctor) {
+ this.selectedDoctorName = selectedDoctor.label;
+ this.selectedDoctorEmail = selectedDoctor.email;
+ this.selectedDoctorPhone = selectedDoctor.phoneNo;
+ this.selectedDoctorSpecialty = selectedDoctor.specialist;
+ this.shiftService.getShiftsByDoctorId(doctorId).subscribe(data => {
+ if (data && data.shifts && Object.keys(data.shifts).length > 0) {
+ this.selectedTimeSlots = {};
+ this.selectedDays = Object.keys(data.shifts).map(key => {
+ return this.daysOfWeek[WorkSchedule[key as keyof typeof WorkSchedule] - 1];
+ });
+ for (const [day, timeSlot] of Object.entries(data.shifts)) {
+ const dayEnumKey = WorkSchedule[day as keyof typeof WorkSchedule];
+ if (dayEnumKey !== undefined) {
+ this.selectedTimeSlots[this.daysOfWeek[dayEnumKey - 1]] = timeSlot;
+ }
+ }
+ } else {
+ this.selectedDays = this.getDaysFromSchedule(selectedDoctor.availability);
+ this.selectedDays.forEach(day => {
+ this.selectedTimeSlots[day] = TimeSlot.NineToFive;
+ });
+ }
+ });
+ }
+ }
+
+ daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
+
+ getDaysFromSchedule(scheduleValue: WorkSchedule): string[] {
+ let days: string[] = [];
+ if (scheduleValue >= 1 && scheduleValue <= 7) {
+ days.push(this.daysOfWeek[scheduleValue - 1]);
+ } else {
+ const startDayIndex = (scheduleValue - 8) % 7;
+ const endDayIndex = (startDayIndex + 4) % 7;
+ for (let i = 0; i < 5; i++) {
+ days.push(this.daysOfWeek[(startDayIndex + i) % 7]);
+ }
+ }
+ return days;
+ }
+
+ saveShiftData() {
+ if (!this.selectedDoctor) {
+ return;
+ }
+ this.selectedDays;
+ const shiftData: CreateUpdateShiftManagementDto = {
+ doctorId: this.selectedDoctor,
+ shifts: Object.keys(this.selectedTimeSlots).reduce((acc, day) => {
+ const timeSlot = this.selectedTimeSlots[day]; // Get selected time slot
+ const dayEnumKey = WorkSchedule[day as keyof typeof WorkSchedule]; // Convert string to WorkSchedule enum
+
+ if (timeSlot !== undefined && dayEnumKey !== undefined) {
+ acc[dayEnumKey] = timeSlot; // Store correctly in shifts
+ }
+ return acc;
+ }, {} as Record),
+ isActive: true,
+ };
+
+ this.shiftService.createOrUpdateShift(shiftData).subscribe({
+ next: response => {
+ this.toaster.success('Updated Successfully', 'Success');
+ },
+ error: err => {
+ this.toaster.error(err, 'Error');
+ },
+ });
+ }
+ backToDoctor() {
+ this.router.navigate(['/doctors']);
+ }
+}
diff --git a/angular/src/app/proxy/doctors/dto/models.ts b/angular/src/app/proxy/doctors/dto/models.ts
index a122baa..ada3959 100644
--- a/angular/src/app/proxy/doctors/dto/models.ts
+++ b/angular/src/app/proxy/doctors/dto/models.ts
@@ -1,5 +1,6 @@
import type { FullAuditedEntity } from '../../volo/abp/domain/entities/auditing/models';
import type { WorkSchedule } from '../../global-enum/work-schedule.enum';
+import type { FullAuditedEntityDto } from '@abp/ng.core';
import type { TimeSlot } from '../../global-enum/time-slot.enum';
export interface DoctorDto extends FullAuditedEntity {
@@ -19,8 +20,20 @@ export interface DoctorDto extends FullAuditedEntity {
joiningDate?: string;
experience?: number;
consultationFee?: number;
- availability?: WorkSchedule;
- timeSlot: TimeSlot;
+ availability: WorkSchedule[];
rating?: number;
clinicLocation?: string;
+ shifts: ShiftManagementDto[];
+}
+
+export interface ShiftManagementDto extends FullAuditedEntityDto {
+ doctorId?: string;
+ shifts: Record;
+ isActive: boolean;
+}
+
+export interface CreateUpdateShiftManagementDto {
+ doctorId?: string;
+ shifts: Record;
+ isActive: boolean;
}
diff --git a/angular/src/app/proxy/dtos/models.ts b/angular/src/app/proxy/dtos/models.ts
index f2f5bbd..dd9e00a 100644
--- a/angular/src/app/proxy/dtos/models.ts
+++ b/angular/src/app/proxy/dtos/models.ts
@@ -1,5 +1,4 @@
import type { WorkSchedule } from '../global-enum/work-schedule.enum';
-import type { TimeSlot } from '../global-enum/time-slot.enum';
import type { FullAuditedEntity } from '../volo/abp/domain/entities/auditing/models';
export interface CreateDepartmentDto {
@@ -30,8 +29,7 @@ export interface CreateDoctorDto {
joiningDate?: string;
experience?: number;
consultationFee?: number;
- availability?: WorkSchedule;
- timeSlot: TimeSlot;
+ availability: WorkSchedule[];
rating?: number;
clinicLocation?: string;
}
diff --git a/angular/src/app/proxy/generate-proxy.json b/angular/src/app/proxy/generate-proxy.json
index b7b0d25..edb0fe7 100644
--- a/angular/src/app/proxy/generate-proxy.json
+++ b/angular/src/app/proxy/generate-proxy.json
@@ -2383,6 +2383,143 @@
"implementFrom": "HospitalManagementSystem.Shared.SharedAppService"
}
}
+ },
+ "HospitalManagementSystem.Shift_Management.ShiftManagementAppService": {
+ "controllerName": "ShiftManagement",
+ "controllerGroupName": "ShiftManagement",
+ "isRemoteService": true,
+ "isIntegrationService": false,
+ "apiVersion": null,
+ "type": "HospitalManagementSystem.Shift_Management.ShiftManagementAppService",
+ "interfaces": [],
+ "actions": {
+ "GetAllShiftsAsync": {
+ "uniqueName": "GetAllShiftsAsync",
+ "name": "GetAllShiftsAsync",
+ "httpMethod": "GET",
+ "url": "api/app/shift-management/shifts",
+ "supportedVersions": [],
+ "parametersOnMethod": [],
+ "parameters": [],
+ "returnValue": {
+ "type": "System.Collections.Generic.List",
+ "typeSimple": "[HospitalManagementSystem.Doctors.Dto.ShiftManagementDto]"
+ },
+ "allowAnonymous": null,
+ "implementFrom": "HospitalManagementSystem.Shift_Management.ShiftManagementAppService"
+ },
+ "GetShiftsByDoctorIdAsyncByDoctorId": {
+ "uniqueName": "GetShiftsByDoctorIdAsyncByDoctorId",
+ "name": "GetShiftsByDoctorIdAsync",
+ "httpMethod": "GET",
+ "url": "api/app/shift-management/shifts-by-doctor-id/{doctorId}",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "doctorId",
+ "typeAsString": "System.Guid, System.Private.CoreLib",
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "doctorId",
+ "name": "doctorId",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": [],
+ "bindingSourceId": "Path",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Doctors.Dto.ShiftManagementDto",
+ "typeSimple": "HospitalManagementSystem.Doctors.Dto.ShiftManagementDto"
+ },
+ "allowAnonymous": null,
+ "implementFrom": "HospitalManagementSystem.Shift_Management.ShiftManagementAppService"
+ },
+ "CreateOrUpdateShiftAsyncByInput": {
+ "uniqueName": "CreateOrUpdateShiftAsyncByInput",
+ "name": "CreateOrUpdateShiftAsync",
+ "httpMethod": "POST",
+ "url": "api/app/shift-management/or-update-shift",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "input",
+ "typeAsString": "HospitalManagementSystem.Doctors.Dto.CreateUpdateShiftManagementDto, HospitalManagementSystem.Application.Contracts",
+ "type": "HospitalManagementSystem.Doctors.Dto.CreateUpdateShiftManagementDto",
+ "typeSimple": "HospitalManagementSystem.Doctors.Dto.CreateUpdateShiftManagementDto",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "input",
+ "name": "input",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.Doctors.Dto.CreateUpdateShiftManagementDto",
+ "typeSimple": "HospitalManagementSystem.Doctors.Dto.CreateUpdateShiftManagementDto",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "Body",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Doctors.Dto.ShiftManagementDto",
+ "typeSimple": "HospitalManagementSystem.Doctors.Dto.ShiftManagementDto"
+ },
+ "allowAnonymous": null,
+ "implementFrom": "HospitalManagementSystem.Shift_Management.ShiftManagementAppService"
+ },
+ "DeleteShiftAsyncById": {
+ "uniqueName": "DeleteShiftAsyncById",
+ "name": "DeleteShiftAsync",
+ "httpMethod": "DELETE",
+ "url": "api/app/shift-management/{id}/shift",
+ "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": null,
+ "implementFrom": "HospitalManagementSystem.Shift_Management.ShiftManagementAppService"
+ }
+ }
}
}
},
@@ -5513,6 +5650,51 @@
}
]
},
+ "HospitalManagementSystem.Doctors.Dto.CreateUpdateShiftManagementDto": {
+ "baseType": null,
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "DoctorId",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Shifts",
+ "jsonName": null,
+ "type": "{HospitalManagementSystem.GlobalEnum.WorkSchedule:HospitalManagementSystem.GlobalEnum.TimeSlot}",
+ "typeSimple": "{HospitalManagementSystem.GlobalEnum.WorkSchedule:HospitalManagementSystem.GlobalEnum.TimeSlot}",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "IsActive",
+ "jsonName": null,
+ "type": "System.Boolean",
+ "typeSimple": "boolean",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
"HospitalManagementSystem.Doctors.Dto.DoctorDto": {
"baseType": "Volo.Abp.Domain.Entities.Auditing.FullAuditedEntity",
"isEnum": false,
@@ -5715,20 +5897,8 @@
{
"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": "TimeSlot",
- "jsonName": null,
- "type": "HospitalManagementSystem.GlobalEnum.TimeSlot",
- "typeSimple": "HospitalManagementSystem.GlobalEnum.TimeSlot",
+ "type": "[HospitalManagementSystem.GlobalEnum.WorkSchedule]",
+ "typeSimple": "[HospitalManagementSystem.GlobalEnum.WorkSchedule]",
"isRequired": false,
"minLength": null,
"maxLength": null,
@@ -5759,6 +5929,63 @@
"minimum": null,
"maximum": null,
"regex": null
+ },
+ {
+ "name": "Shifts",
+ "jsonName": null,
+ "type": "[HospitalManagementSystem.Doctors.Dto.ShiftManagementDto]",
+ "typeSimple": "[HospitalManagementSystem.Doctors.Dto.ShiftManagementDto]",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "HospitalManagementSystem.Doctors.Dto.ShiftManagementDto": {
+ "baseType": "Volo.Abp.Application.Dtos.FullAuditedEntityDto",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "DoctorId",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Shifts",
+ "jsonName": null,
+ "type": "{HospitalManagementSystem.GlobalEnum.WorkSchedule:HospitalManagementSystem.GlobalEnum.TimeSlot}",
+ "typeSimple": "{HospitalManagementSystem.GlobalEnum.WorkSchedule:HospitalManagementSystem.GlobalEnum.TimeSlot}",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "IsActive",
+ "jsonName": null,
+ "type": "System.Boolean",
+ "typeSimple": "boolean",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
}
]
},
@@ -6249,20 +6476,8 @@
{
"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": "TimeSlot",
- "jsonName": null,
- "type": "HospitalManagementSystem.GlobalEnum.TimeSlot",
- "typeSimple": "HospitalManagementSystem.GlobalEnum.TimeSlot",
+ "type": "[HospitalManagementSystem.GlobalEnum.WorkSchedule]",
+ "typeSimple": "[HospitalManagementSystem.GlobalEnum.WorkSchedule]",
"isRequired": false,
"minLength": null,
"maxLength": null,
@@ -6489,21 +6704,7 @@
"Thursday",
"Friday",
"Saturday",
- "Sunday",
- "MondayToFriday",
- "TuesdayToSaturday",
- "WednesdayToSunday",
- "ThursdayToMonday",
- "FridayToTuesday",
- "SaturdayToWednesday",
- "SundayToThursday",
- "MondayToThursday",
- "TuesdayToFriday",
- "WednesdayToSaturday",
- "ThursdayToSunday",
- "FridayToMonday",
- "SaturdayToTuesday",
- "SundayToWednesday"
+ "Sunday"
],
"enumValues": [
1,
@@ -6512,21 +6713,7 @@
4,
5,
6,
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 16,
- 17,
- 18,
- 19,
- 20,
- 21
+ 7
],
"genericArguments": null,
"properties": null
@@ -7284,41 +7471,6 @@
}
]
},
- "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,
@@ -7828,6 +7980,107 @@
}
]
},
+ "Volo.Abp.Application.Dtos.AuditedEntityDto": {
+ "baseType": "Volo.Abp.Application.Dtos.CreationAuditedEntityDto",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": [
+ "TPrimaryKey"
+ ],
+ "properties": [
+ {
+ "name": "LastModificationTime",
+ "jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "LastModifierId",
+ "jsonName": null,
+ "type": "System.Guid?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "Volo.Abp.Application.Dtos.CreationAuditedEntityDto": {
+ "baseType": "Volo.Abp.Application.Dtos.EntityDto",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": [
+ "TPrimaryKey"
+ ],
+ "properties": [
+ {
+ "name": "CreationTime",
+ "jsonName": null,
+ "type": "System.DateTime",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "CreatorId",
+ "jsonName": null,
+ "type": "System.Guid?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "Volo.Abp.Application.Dtos.EntityDto": {
+ "baseType": null,
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": []
+ },
+ "Volo.Abp.Application.Dtos.EntityDto": {
+ "baseType": "Volo.Abp.Application.Dtos.EntityDto",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": [
+ "TKey"
+ ],
+ "properties": [
+ {
+ "name": "Id",
+ "jsonName": null,
+ "type": "TKey",
+ "typeSimple": "TKey",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
"Volo.Abp.Application.Dtos.ExtensibleAuditedEntityDto": {
"baseType": "Volo.Abp.Application.Dtos.ExtensibleCreationAuditedEntityDto",
"isEnum": false,
@@ -8063,6 +8316,53 @@
}
]
},
+ "Volo.Abp.Application.Dtos.FullAuditedEntityDto": {
+ "baseType": "Volo.Abp.Application.Dtos.AuditedEntityDto",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": [
+ "TPrimaryKey"
+ ],
+ "properties": [
+ {
+ "name": "IsDeleted",
+ "jsonName": null,
+ "type": "System.Boolean",
+ "typeSimple": "boolean",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DeleterId",
+ "jsonName": null,
+ "type": "System.Guid?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DeletionTime",
+ "jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
"Volo.Abp.Application.Dtos.LimitedResultRequestDto": {
"baseType": null,
"isEnum": false,
diff --git a/angular/src/app/proxy/global-enum/work-schedule.enum.ts b/angular/src/app/proxy/global-enum/work-schedule.enum.ts
index 7c1a327..00b4cc0 100644
--- a/angular/src/app/proxy/global-enum/work-schedule.enum.ts
+++ b/angular/src/app/proxy/global-enum/work-schedule.enum.ts
@@ -8,20 +8,6 @@ export enum WorkSchedule {
Friday = 5,
Saturday = 6,
Sunday = 7,
- MondayToFriday = 8,
- TuesdayToSaturday = 9,
- WednesdayToSunday = 10,
- ThursdayToMonday = 11,
- FridayToTuesday = 12,
- SaturdayToWednesday = 13,
- SundayToThursday = 14,
- MondayToThursday = 15,
- TuesdayToFriday = 16,
- WednesdayToSaturday = 17,
- ThursdayToSunday = 18,
- FridayToMonday = 19,
- SaturdayToTuesday = 20,
- SundayToWednesday = 21,
}
export const workScheduleOptions = mapEnumToOptions(WorkSchedule);
diff --git a/angular/src/app/proxy/index.ts b/angular/src/app/proxy/index.ts
index e540e8d..27e6a54 100644
--- a/angular/src/app/proxy/index.ts
+++ b/angular/src/app/proxy/index.ts
@@ -9,5 +9,6 @@ import * as Dtos from './dtos';
import * as GlobalEnum from './global-enum';
import * as Patients from './patients';
import * as Shared from './shared';
+import * as ShiftManagement from './shift-management';
import * as Volo from './volo';
-export { Abp, Appoinments, Appointments, Departments, Doctors, Documents, Dto, Dtos, GlobalEnum, Patients, Shared, Volo };
+export { Abp, Appoinments, Appointments, Departments, Doctors, Documents, Dto, Dtos, GlobalEnum, Patients, Shared, ShiftManagement, Volo };
diff --git a/angular/src/app/proxy/shift-management/index.ts b/angular/src/app/proxy/shift-management/index.ts
new file mode 100644
index 0000000..7b5bdd2
--- /dev/null
+++ b/angular/src/app/proxy/shift-management/index.ts
@@ -0,0 +1 @@
+export * from './shift-management.service';
diff --git a/angular/src/app/proxy/shift-management/shift-management.service.ts b/angular/src/app/proxy/shift-management/shift-management.service.ts
new file mode 100644
index 0000000..8568306
--- /dev/null
+++ b/angular/src/app/proxy/shift-management/shift-management.service.ts
@@ -0,0 +1,45 @@
+import { RestService, Rest } from '@abp/ng.core';
+import { Injectable } from '@angular/core';
+import type { CreateUpdateShiftManagementDto, ShiftManagementDto } from '../doctors/dto/models';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class ShiftManagementService {
+ apiName = 'Default';
+
+
+ createOrUpdateShift = (input: CreateUpdateShiftManagementDto, config?: Partial) =>
+ this.restService.request({
+ method: 'POST',
+ url: '/api/app/shift-management/or-update-shift',
+ body: input,
+ },
+ { apiName: this.apiName,...config });
+
+
+ deleteShift = (id: string, config?: Partial) =>
+ this.restService.request({
+ method: 'DELETE',
+ url: `/api/app/shift-management/${id}/shift`,
+ },
+ { apiName: this.apiName,...config });
+
+
+ getAllShifts = (config?: Partial) =>
+ this.restService.request({
+ method: 'GET',
+ url: '/api/app/shift-management/shifts',
+ },
+ { apiName: this.apiName,...config });
+
+
+ getShiftsByDoctorId = (doctorId: string, config?: Partial) =>
+ this.restService.request({
+ method: 'GET',
+ url: `/api/app/shift-management/shifts-by-doctor-id/${doctorId}`,
+ },
+ { apiName: this.apiName,...config });
+
+ constructor(private restService: RestService) {}
+}
diff --git a/angular/src/app/room-management/room-management-routing.module.ts b/angular/src/app/room-management/room-management-routing.module.ts
new file mode 100644
index 0000000..102c5b7
--- /dev/null
+++ b/angular/src/app/room-management/room-management-routing.module.ts
@@ -0,0 +1,13 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { RoomsComponent } from './rooms.component';
+
+const routes: Routes = [
+ { path: '', component: RoomsComponent }
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class RoomManagementRoutingModule { }
diff --git a/angular/src/app/room-management/room-management.module.ts b/angular/src/app/room-management/room-management.module.ts
new file mode 100644
index 0000000..ff5de61
--- /dev/null
+++ b/angular/src/app/room-management/room-management.module.ts
@@ -0,0 +1,21 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { RoomManagementRoutingModule } from './room-management-routing.module';
+import { RoomsComponent } from './rooms.component';
+import { FormsModule } from '@angular/forms';
+import { CalendarModule } from 'primeng/calendar';
+import { ButtonModule } from 'primeng/button';
+
+
+@NgModule({
+ declarations: [RoomsComponent],
+ imports: [
+ CommonModule,
+ RoomManagementRoutingModule,
+ FormsModule ,
+ CalendarModule,
+ ButtonModule,
+ ]
+})
+export class RoomManagementModule { }
diff --git a/angular/src/app/room-management/rooms.component.ts b/angular/src/app/room-management/rooms.component.ts
index 18fc983..e1098cf 100644
--- a/angular/src/app/room-management/rooms.component.ts
+++ b/angular/src/app/room-management/rooms.component.ts
@@ -2,13 +2,12 @@ import { Component } from '@angular/core';
@Component({
selector: 'app-rooms',
-
templateUrl: './rooms.component.html',
styleUrl: './rooms.component.scss'
})
export class RoomsComponent {
- selectedDate: Date = new Date(); // Default to today
+ selectedDate: Date = new Date();
roomData = [
{ roomName: 'Room 101' },
@@ -23,7 +22,7 @@ export class RoomsComponent {
{ roomName: 'Room 303' },
{ roomName: 'Room 401' },
{ roomName: 'Room 402' },
- // Add more rooms as necessary
+
];
roomStatus = {
@@ -39,19 +38,15 @@ export class RoomsComponent {
'Room 303': 'available',
'Room 401': 'occupied',
'Room 402': 'available',
- // Add more rooms and statuses as necessary
+
};
onDateChange() {
- console.log('Selected date:', this.selectedDate);
- // Logic to handle room status based on selected date, if needed
}
selectRoom(room: string) {
- // Logic for selecting a room
- console.log(`${room} selected.`);
}
getRoomStatus(room: string) {
- return this.roomStatus[room] || 'available'; // Default to 'available' if not specified
+ return this.roomStatus[room] || 'available';
}
getRoomStatusLabel(room: string) {
diff --git a/angular/src/app/route.provider.ts b/angular/src/app/route.provider.ts
index 8f45a1b..202b2dc 100644
--- a/angular/src/app/route.provider.ts
+++ b/angular/src/app/route.provider.ts
@@ -91,6 +91,14 @@ function configureRoutes(routesService: RoutesService) {
order: 402,
requiredPolicy:'HospitalManagementSystem.Doctor'
},
+ // {
+ // path: '/doctors/shift-management',
+ // name: 'Shift Management',
+ // parentName: 'Doctors',
+ // iconClass: 'fas fa-clock',
+ // order: 403,
+ // requiredPolicy:'HospitalManagementSystem.Doctor'
+ // },
{
path: '',
name: 'Rooms',
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/CreateUpdateShiftManagementDto.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/CreateUpdateShiftManagementDto.cs
new file mode 100644
index 0000000..e5c5412
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/CreateUpdateShiftManagementDto.cs
@@ -0,0 +1,17 @@
+using HospitalManagementSystem.GlobalEnum;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalManagementSystem.Doctors.Dto
+{
+ public class CreateUpdateShiftManagementDto
+ {
+ public Guid DoctorId { get; set; }
+ public Dictionary Shifts { get; set; } = new Dictionary();
+
+ public bool IsActive { get; set; } = true;
+ }
+}
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 72620c0..c41f2d0 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/DoctorDto.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/DoctorDto.cs
@@ -26,9 +26,11 @@ namespace HospitalManagementSystem.Doctors.Dto
public DateTime? JoiningDate { get; set; }
public int? Experience { get; set; }
public decimal? ConsultationFee { get; set; }
- public WorkSchedule? Availability { get; set; }
- public TimeSlot TimeSlot { get; set; }
+ public List Availability { get; set; } = new List();
public decimal? Rating { get; set; }
public string? ClinicLocation { get; set; }
+
+ public List? Shifts { get; set; }
+
}
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/ShiftManagementDto.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/ShiftManagementDto.cs
new file mode 100644
index 0000000..f2fc63e
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Doctors/Dto/ShiftManagementDto.cs
@@ -0,0 +1,18 @@
+using HospitalManagementSystem.GlobalEnum;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
+
+namespace HospitalManagementSystem.Doctors.Dto
+{
+ public class ShiftManagementDto : FullAuditedEntityDto
+ {
+ public Guid DoctorId { get; set; }
+ public Dictionary Shifts { get; set; } = new Dictionary();
+
+ public bool IsActive { get; set; } = true;
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/Doctors/DoctorAppService.cs b/aspnet-core/src/HospitalManagementSystem.Application/Doctors/DoctorAppService.cs
index 0748a14..5938e77 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application/Doctors/DoctorAppService.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application/Doctors/DoctorAppService.cs
@@ -23,6 +23,7 @@ namespace HospitalManagementSystem.Doctors
public class DoctorAppService : ApplicationService
{
private readonly IRepository _doctorRepository;
+
private readonly IWebHostEnvironment _env;
public DoctorAppService(IRepository doctorRepository, IWebHostEnvironment env)
@@ -190,5 +191,8 @@ namespace HospitalManagementSystem.Doctors
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 5ffe610..e56f0c7 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application/Dtos/CreateDoctorDto.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application/Dtos/CreateDoctorDto.cs
@@ -28,8 +28,7 @@ namespace HospitalManagementSystem.Dtos
public DateTime? JoiningDate { get; set; }
public int? Experience { get; set; }
public decimal? ConsultationFee { get; set; }
- public WorkSchedule? Availability { get; set; }
- public TimeSlot TimeSlot { get; set; }
+ public List Availability { get; set; } = new List();
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 4306bb4..03b20b4 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application/MainAppAutoMapperProfile.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application/MainAppAutoMapperProfile.cs
@@ -53,6 +53,13 @@ namespace HospitalManagementSystem
CreateMap();
CreateMap();
#endregion
+ #region shiftManagement
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+
+ #endregion
}
}
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/Shift-Management/ShiftManagementAppService.cs b/aspnet-core/src/HospitalManagementSystem.Application/Shift-Management/ShiftManagementAppService.cs
new file mode 100644
index 0000000..026ea66
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Application/Shift-Management/ShiftManagementAppService.cs
@@ -0,0 +1,100 @@
+using Volo.Abp.Domain.Repositories;
+using HospitalManagementSystem.Doctors;
+using HospitalManagementSystem.Doctors.Dto;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using System.Linq;
+using System.Linq.Dynamic.Core;
+using Microsoft.EntityFrameworkCore;
+namespace HospitalManagementSystem.Shift_Management
+{
+ public class ShiftManagementAppService : ApplicationService
+ {
+ private readonly IRepository _shiftManagementRepository;
+ private readonly IRepository _doctorRepository;
+
+ public ShiftManagementAppService(IRepository shiftManagementRepository,
+ IRepository doctorRepository)
+ {
+ _shiftManagementRepository = shiftManagementRepository;
+ _doctorRepository = doctorRepository;
+ }
+
+ // Fetch all shifts
+ public async Task> GetAllShiftsAsync()
+ {
+ var shifts = await _shiftManagementRepository.GetListAsync();
+ return ObjectMapper.Map, List>(shifts);
+ }
+
+ // Fetch shifts by doctor ID
+ public async Task GetShiftsByDoctorIdAsync(Guid doctorId)
+ {
+ var shifts = await _shiftManagementRepository.GetListAsync(x => x.DoctorId == doctorId);
+
+ var shiftDictionary = shifts.ToDictionary(s => s.ShiftDays, s => s.ShiftTime);
+
+ return new ShiftManagementDto
+ {
+ DoctorId = doctorId,
+ Shifts = shiftDictionary,
+ IsActive = shifts.Any() && shifts.First().IsActive
+ };
+ }
+
+ // Create or update a shift
+ public async Task CreateOrUpdateShiftAsync(CreateUpdateShiftManagementDto input)
+ {
+ {
+ // Get existing shifts for the doctor
+ var existingShifts = await _shiftManagementRepository.GetListAsync(x => x.DoctorId == input.DoctorId);
+
+ // Iterate through each shift in the dictionary
+ foreach (var shiftEntry in input.Shifts)
+ {
+ var shiftDay = shiftEntry.Key;
+ var shiftTime = shiftEntry.Value;
+
+ // Check if a shift already exists for the same doctor and day
+ var existingShift = existingShifts.FirstOrDefault(x => x.ShiftDays == shiftDay);
+
+ if (existingShift != null)
+ {
+ // Update existing shift
+ existingShift.ShiftTime = shiftTime;
+ existingShift.IsActive = input.IsActive;
+ await _shiftManagementRepository.UpdateAsync(existingShift);
+ }
+ else
+ {
+ // Create new shift entry
+ var newShift = new ShiftManagement(
+ GuidGenerator.Create(),
+ input.DoctorId,
+ shiftTime,
+ shiftDay,
+ input.IsActive
+ );
+
+ await _shiftManagementRepository.InsertAsync(newShift);
+ }
+ }
+
+ // Returning a simple DTO response (You can customize it as needed)
+ return new ShiftManagementDto
+ {
+ DoctorId = input.DoctorId,
+ Shifts = input.Shifts,
+ IsActive = input.IsActive
+ };
+ }
+ }
+ // Delete a shift
+ public async Task DeleteShiftAsync(Guid id)
+ {
+ await _shiftManagementRepository.DeleteAsync(id);
+ }
+ }
+
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs
index eaf86e5..774e755 100644
--- a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs
@@ -46,21 +46,6 @@ namespace HospitalManagementSystem.GlobalEnum
Friday = 5,
Saturday = 6,
Sunday = 7,
- MondayToFriday = 8,
- TuesdayToSaturday = 9,
- WednesdayToSunday = 10,
- ThursdayToMonday = 11,
- FridayToTuesday = 12,
- SaturdayToWednesday = 13,
- SundayToThursday = 14,
- MondayToThursday = 15,
- TuesdayToFriday = 16,
- WednesdayToSaturday = 17,
- ThursdayToSunday = 18,
- FridayToMonday = 19,
- SaturdayToTuesday = 20,
- SundayToWednesday = 21
-
}
public enum TimeSlot
{
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/Doctor.cs b/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/Doctor.cs
index 5f020cf..1395ce0 100644
--- a/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/Doctor.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/Doctor.cs
@@ -33,6 +33,8 @@ namespace HospitalManagementSystem.Doctors
public decimal? Rating { get; set; }
public string? ClinicLocation { get; set; }
public virtual ICollection Appointments { get; set; } = new List();
+ public virtual ICollection Shifts { get; set; } = new List();
+
public Doctor()
{
//Appointments = new List();
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/ShiftManagement.cs b/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/ShiftManagement.cs
new file mode 100644
index 0000000..6f42720
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain/Doctors/ShiftManagement.cs
@@ -0,0 +1,30 @@
+using HospitalManagementSystem.GlobalEnum;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace HospitalManagementSystem.Doctors
+{
+ public class ShiftManagement : FullAuditedAggregateRoot
+ {
+ public Guid DoctorId { get; set; }
+ public virtual Doctor Doctor { get; set; } = null!;
+ public TimeSlot ShiftTime { get; set; } // Using Enum for Shift Time
+ public WorkSchedule ShiftDays { get; set; } // Using Enum for Shift Days
+ public bool IsActive { get; set; } = true;
+
+ protected ShiftManagement() { }
+
+ public ShiftManagement(Guid id, Guid doctorId, TimeSlot shiftTime, WorkSchedule shiftDays, bool isActive)
+ : base(id)
+ {
+ DoctorId = doctorId;
+ ShiftTime = shiftTime;
+ ShiftDays = shiftDays;
+ IsActive = isActive;
+ }
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/EntityFrameworkCore/HospitalManagementSystemDbContext.cs b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/EntityFrameworkCore/HospitalManagementSystemDbContext.cs
index dd894e6..80659b4 100644
--- a/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/EntityFrameworkCore/HospitalManagementSystemDbContext.cs
+++ b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/EntityFrameworkCore/HospitalManagementSystemDbContext.cs
@@ -32,6 +32,7 @@ public class HospitalManagementSystemDbContext :
public DbSet Patients { get; set; }
public DbSet EntityDocuments { get; set; }
public DbSet PatientDocuments { get; set; }
+ public DbSet ShiftManagements { get; set; }
#region Entities from the modules
@@ -110,6 +111,11 @@ public class HospitalManagementSystemDbContext :
b.ToTable("PatientDocuments");
b.ConfigureByConvention(); //auto configure for the base class props
});
+ builder.Entity(b =>
+ {
+ b.ToTable("ShiftManagements");
+ b.ConfigureByConvention(); //auto configure for the base class props
+ });
//builder.Entity(b =>
//{
diff --git a/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250217080922_ShiftManagement.Designer.cs b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250217080922_ShiftManagement.Designer.cs
new file mode 100644
index 0000000..35cb06c
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250217080922_ShiftManagement.Designer.cs
@@ -0,0 +1,2648 @@
+//
+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("20250217080922_ShiftManagement")]
+ partial class ShiftManagement
+ {
+ ///
+ 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("datetime2");
+
+ 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.Doctors.ShiftManagement", 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("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("DoctorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsActive")
+ .HasColumnType("bit");
+
+ 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("ShiftDays")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ShiftEndTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ShiftStartTime")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DoctorId");
+
+ b.ToTable("ShiftManagements", (string)null);
+ });
+
+ 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