Compare commits
No commits in common. "003bfea1255db09af9df117cb909b887d0da3aa4" and "91bfc622d19a9b7eb130b89c3ecff7a7214e5ca7" have entirely different histories.
003bfea125
...
91bfc622d1
@ -51,7 +51,7 @@
|
|||||||
>
|
>
|
||||||
<i class="pi pi-plus-circle"></i>
|
<i class="pi pi-plus-circle"></i>
|
||||||
</button>
|
</button>
|
||||||
<button pButton class="p-button-rounded p-button-warning ml-2" (click)="exportAppointments()">
|
<button pButton class="p-button-rounded p-button-warning ml-2" (click)="exportPatient()">
|
||||||
<i class="pi pi-download"></i>
|
<i class="pi pi-download"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -132,7 +132,7 @@
|
|||||||
<form #appointmentForm="ngForm" (ngSubmit)="saveAppointment(appointmentForm)">
|
<form #appointmentForm="ngForm" (ngSubmit)="saveAppointment(appointmentForm)">
|
||||||
<div class="p-fluid grid justify-content-center">
|
<div class="p-fluid grid justify-content-center">
|
||||||
<div class="field col-md-5">
|
<div class="field col-md-5">
|
||||||
<label for="fname">First Name <span class="text-danger">*</span></label>
|
<label for="fname">First Name</label>
|
||||||
<span class="p-input-icon-left">
|
<span class="p-input-icon-left">
|
||||||
<i class="pi pi-user"></i>
|
<i class="pi pi-user"></i>
|
||||||
<input pInputText id="fname" name="fname" [(ngModel)]="appointment.firstName" required />
|
<input pInputText id="fname" name="fname" [(ngModel)]="appointment.firstName" required />
|
||||||
@ -141,7 +141,7 @@
|
|||||||
<div class="field col-md-1"></div>
|
<div class="field col-md-1"></div>
|
||||||
|
|
||||||
<div class="field col-md-5">
|
<div class="field col-md-5">
|
||||||
<label for="lname">Last Name <span class="text-danger">*</span></label>
|
<label for="lname">Last Name</label>
|
||||||
<span class="p-input-icon-left">
|
<span class="p-input-icon-left">
|
||||||
<i class="pi pi-user"></i>
|
<i class="pi pi-user"></i>
|
||||||
<input pInputText id="lname" name="lname" [(ngModel)]="appointment.lastName" required />
|
<input pInputText id="lname" name="lname" [(ngModel)]="appointment.lastName" required />
|
||||||
@ -149,7 +149,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field col-md-5">
|
<div class="field col-md-5">
|
||||||
<label>Gender <span class="text-danger">*</span></label>
|
<label>Gender</label>
|
||||||
<div class="flex align-items-center">
|
<div class="flex align-items-center">
|
||||||
<p-radioButton
|
<p-radioButton
|
||||||
name="gender"
|
name="gender"
|
||||||
@ -172,7 +172,7 @@
|
|||||||
<div class="field col-md-1"></div>
|
<div class="field col-md-1"></div>
|
||||||
|
|
||||||
<div class="field col-md-5">
|
<div class="field col-md-5">
|
||||||
<label for="mobile">Mobile No <span class="text-danger">*</span></label>
|
<label for="mobile">Mobile No</label>
|
||||||
<span class="p-input-icon-left">
|
<span class="p-input-icon-left">
|
||||||
<i class="pi pi-phone"></i>
|
<i class="pi pi-phone"></i>
|
||||||
<input pInputText id="mobile" name="mobile" [(ngModel)]="appointment.mobile" required />
|
<input pInputText id="mobile" name="mobile" [(ngModel)]="appointment.mobile" required />
|
||||||
@ -186,7 +186,7 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="field col-md-11">
|
<div class="field col-md-11">
|
||||||
<label for="mobile">Address <span class="text-danger">*</span></label>
|
<label for="mobile">Address</label>
|
||||||
<span class="p-input-icon-left">
|
<span class="p-input-icon-left">
|
||||||
<i class="pi pi-map-marker"></i>
|
<i class="pi pi-map-marker"></i>
|
||||||
<input
|
<input
|
||||||
@ -200,7 +200,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field col-md-5">
|
<div class="field col-md-5">
|
||||||
<label for="email">Email ID <span class="text-danger">*</span></label>
|
<label for="email">Email ID</label>
|
||||||
<span class="p-input-icon-left">
|
<span class="p-input-icon-left">
|
||||||
<i class="pi pi-envelope"></i>
|
<i class="pi pi-envelope"></i>
|
||||||
<input pInputText id="email" name="email" [(ngModel)]="appointment.email" required />
|
<input pInputText id="email" name="email" [(ngModel)]="appointment.email" required />
|
||||||
@ -214,14 +214,13 @@
|
|||||||
<div class="field col-md-1"></div>
|
<div class="field col-md-1"></div>
|
||||||
|
|
||||||
<div class="field col-md-5">
|
<div class="field col-md-5">
|
||||||
<label for="dob">Date of Birth <span class="text-danger">*</span></label>
|
<label for="dob">Date of Birth</label>
|
||||||
<p-calendar
|
<p-calendar
|
||||||
id="dob"
|
id="dob"
|
||||||
required
|
required
|
||||||
name="dob"
|
name="dob"
|
||||||
[(ngModel)]="Dateofbirth"
|
[(ngModel)]="appointment.dob"
|
||||||
[showIcon]="true"
|
[showIcon]="true"
|
||||||
appendTo="body"
|
|
||||||
required
|
required
|
||||||
></p-calendar>
|
></p-calendar>
|
||||||
<small
|
<small
|
||||||
@ -232,7 +231,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field col-md-5">
|
<div class="field col-md-5">
|
||||||
<label for="doctor">Consulting Doctor <span class="text-danger">*</span></label>
|
<label for="doctor">Consulting Doctor</label>
|
||||||
<p-dropdown
|
<p-dropdown
|
||||||
id="doctor"
|
id="doctor"
|
||||||
name="doctor"
|
name="doctor"
|
||||||
@ -247,19 +246,18 @@
|
|||||||
<div class="field col-md-1"></div>
|
<div class="field col-md-1"></div>
|
||||||
|
|
||||||
<div class="field col-md-5">
|
<div class="field col-md-5">
|
||||||
<label for="date">Date of Appointment <span class="text-danger">*</span></label>
|
<label for="date">Date of Appointment</label>
|
||||||
<p-calendar
|
<p-calendar
|
||||||
id="date"
|
id="date"
|
||||||
name="date"
|
name="date"
|
||||||
[(ngModel)]="AppointmentDate"
|
[(ngModel)]="appointment.dateOfAppointment"
|
||||||
[showIcon]="true"
|
[showIcon]="true"
|
||||||
appendTo="body"
|
|
||||||
required
|
required
|
||||||
></p-calendar>
|
></p-calendar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field col-md-5">
|
<div class="field col-md-5">
|
||||||
<label for="time">Time Of Appointment <span class="text-danger">*</span></label>
|
<label for="time">Time Of Appointment</label>
|
||||||
<span class="p-input-icon-left">
|
<span class="p-input-icon-left">
|
||||||
<i class="pi pi-clock"></i>
|
<i class="pi pi-clock"></i>
|
||||||
<input
|
<input
|
||||||
|
@ -20,9 +20,6 @@ export class ViewAppointmentComponent {
|
|||||||
patients: [];
|
patients: [];
|
||||||
appointmentDialog = false;
|
appointmentDialog = false;
|
||||||
genders = Gender;
|
genders = Gender;
|
||||||
Dateofbirth: Date = new Date();
|
|
||||||
AppointmentDate: Date = new Date();
|
|
||||||
|
|
||||||
appointmentStatuses = Object.keys(appointmentStatus)
|
appointmentStatuses = Object.keys(appointmentStatus)
|
||||||
.filter(key => !isNaN(Number(key)))
|
.filter(key => !isNaN(Number(key)))
|
||||||
.map(key => ({
|
.map(key => ({
|
||||||
@ -144,33 +141,10 @@ export class ViewAppointmentComponent {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
exportAppointments() {
|
exportAppointments() {
|
||||||
debugger
|
console.log('Exporting appointment data');
|
||||||
this.AppointmentService.getExportAppointmentRecord().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);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
editAppointment(appointment: any) {
|
editAppointment(appointment: any) {
|
||||||
debugger;
|
debugger;
|
||||||
this.isEditMode = true;
|
this.isEditMode = true;
|
||||||
@ -179,8 +153,8 @@ export class ViewAppointmentComponent {
|
|||||||
this.AppointmentService.getAppointmentById(appointment.id).subscribe(result => {
|
this.AppointmentService.getAppointmentById(appointment.id).subscribe(result => {
|
||||||
debugger;
|
debugger;
|
||||||
this.appointment = result;
|
this.appointment = result;
|
||||||
this.AppointmentDate = new Date(result.dateOfAppointment);
|
this.appointment.dateOfAppointment = new Date(result.dateOfAppointment).toISOString().split('T')[0];;
|
||||||
this.Dateofbirth = new Date(result.dob);
|
this.appointment.dob = new Date(result.dob).toISOString().split('T')[0];;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,8 +181,6 @@ export class ViewAppointmentComponent {
|
|||||||
Object.values(form.controls).forEach(control => control.markAsTouched());
|
Object.values(form.controls).forEach(control => control.markAsTouched());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.appointment.dob = this.Dateofbirth.toDateString();
|
|
||||||
this.appointment.dateOfAppointment = this.AppointmentDate.toDateString();
|
|
||||||
if (this.isEditMode) {
|
if (this.isEditMode) {
|
||||||
this.AppointmentService.updateAppointment(this.appointment).subscribe(
|
this.AppointmentService.updateAppointment(this.appointment).subscribe(
|
||||||
() => {
|
() => {
|
||||||
@ -225,7 +197,7 @@ export class ViewAppointmentComponent {
|
|||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
this.toaster.error(error, 'Error');
|
this.toaster.error(error.error.error.message, 'Error');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -226,7 +226,7 @@
|
|||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="admissionDate"><i class="pi pi-calendar"></i> Admission Date</label>
|
<label for="admissionDate"><i class="pi pi-calendar"></i> Admission Date</label>
|
||||||
<p-calendar appendTo="body" id="admissionDate" name="admissionDate" [(ngModel)]="selectadmissionDate" showIcon
|
<p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectadmissionDate" showIcon
|
||||||
styleClass="small-calendar" required #admissionDate="ngModel"></p-calendar>
|
styleClass="small-calendar" required #admissionDate="ngModel"></p-calendar>
|
||||||
<small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
|
<small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
|
||||||
Admission Date is required
|
Admission Date is required
|
||||||
@ -275,17 +275,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-fluid grid">
|
|
||||||
<div class="col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="status">Status</label>
|
|
||||||
<p-dropdown name="status" id="status" [options]="statuslist" [(ngModel)]="selectedstatus"
|
|
||||||
optionLabel="label" optionValue="value" placeholder="Select status"
|
|
||||||
required></p-dropdown>
|
|
||||||
<small *ngIf="selectedstatus === 0" class="p-error">Status is required</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<button type="submit" pButton class="btn btn-primary"
|
<button type="submit" pButton class="btn btn-primary"
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="admissionDate"><i class="pi pi-calendar"></i> Admission Date</label>
|
<label for="admissionDate"><i class="pi pi-calendar"></i> Admission Date</label>
|
||||||
<p-calendar appendTo="body" id="admissionDate" name="admissionDate" [(ngModel)]="selectdateOfAdmission" showIcon required
|
<p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectdateOfAdmission" showIcon required
|
||||||
#admissionDate="ngModel"></p-calendar>
|
#admissionDate="ngModel"></p-calendar>
|
||||||
<small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
|
<small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
|
||||||
Admission Date is required.
|
Admission Date is required.
|
||||||
@ -153,7 +153,7 @@
|
|||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="nextFollowUp"><i class="pi pi-calendar-plus"></i> Next Follow-Up Date</label>
|
<label for="nextFollowUp"><i class="pi pi-calendar-plus"></i> Next Follow-Up Date</label>
|
||||||
<p-calendar appendTo="body" id="nextFollowUp" name="nextFollowUp" [(ngModel)]="selectnextFollowUp" showIcon required
|
<p-calendar id="nextFollowUp" name="nextFollowUp" [(ngModel)]="selectnextFollowUp" showIcon required
|
||||||
#nextFollowUp="ngModel"></p-calendar>
|
#nextFollowUp="ngModel"></p-calendar>
|
||||||
<small *ngIf="nextFollowUp.invalid && nextFollowUp.touched" class="p-error">
|
<small *ngIf="nextFollowUp.invalid && nextFollowUp.touched" class="p-error">
|
||||||
Next Follow-Up Date is required.
|
Next Follow-Up Date is required.
|
||||||
|
@ -2,7 +2,6 @@ import type { Gender } from '../../global-enum/gender.enum';
|
|||||||
import type { appointmentStatus } from '../../global-enum/appointment-status.enum';
|
import type { appointmentStatus } from '../../global-enum/appointment-status.enum';
|
||||||
import type { visitType } from '../../global-enum/visit-type.enum';
|
import type { visitType } from '../../global-enum/visit-type.enum';
|
||||||
import type { paymentStatus } from '../../global-enum/payment-status.enum';
|
import type { paymentStatus } from '../../global-enum/payment-status.enum';
|
||||||
import type { Doctor } from '../../doctors/models';
|
|
||||||
|
|
||||||
export interface AppointmentDto {
|
export interface AppointmentDto {
|
||||||
id?: string;
|
id?: string;
|
||||||
@ -22,7 +21,6 @@ export interface AppointmentDto {
|
|||||||
appointmentStatus: appointmentStatus;
|
appointmentStatus: appointmentStatus;
|
||||||
visitType: visitType;
|
visitType: visitType;
|
||||||
paymentStatus: paymentStatus;
|
paymentStatus: paymentStatus;
|
||||||
doctor: Doctor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateOrUpdateAppointmentDto {
|
export interface CreateOrUpdateAppointmentDto {
|
||||||
|
@ -2,7 +2,7 @@ import { RestService, Rest } from '@abp/ng.core';
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import type { PagedResultDto } from '../abp/application/services/dto/models';
|
import type { PagedResultDto } from '../abp/application/services/dto/models';
|
||||||
import type { AppointmentDto, CreateOrUpdateAppointmentDto } from '../appoinments/dto/models';
|
import type { AppointmentDto, CreateOrUpdateAppointmentDto } from '../appoinments/dto/models';
|
||||||
import type { FileDownloadDto, PagingSortResultDto } from '../dto/models';
|
import type { PagingSortResultDto } from '../dto/models';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
@ -12,7 +12,7 @@ export class AppointmentService {
|
|||||||
|
|
||||||
|
|
||||||
createAppointment = (input: CreateOrUpdateAppointmentDto, config?: Partial<Rest.Config>) =>
|
createAppointment = (input: CreateOrUpdateAppointmentDto, config?: Partial<Rest.Config>) =>
|
||||||
this.restService.request<any, void>({
|
this.restService.request<any, AppointmentDto>({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/api/app/appointment/appointment',
|
url: '/api/app/appointment/appointment',
|
||||||
body: input,
|
body: input,
|
||||||
@ -54,16 +54,8 @@ export class AppointmentService {
|
|||||||
{ apiName: this.apiName,...config });
|
{ apiName: this.apiName,...config });
|
||||||
|
|
||||||
|
|
||||||
getExportAppointmentRecord = (config?: Partial<Rest.Config>) =>
|
|
||||||
this.restService.request<any, FileDownloadDto>({
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/app/appointment/export-appointment-record',
|
|
||||||
},
|
|
||||||
{ apiName: this.apiName,...config });
|
|
||||||
|
|
||||||
|
|
||||||
updateAppointment = (input: CreateOrUpdateAppointmentDto, config?: Partial<Rest.Config>) =>
|
updateAppointment = (input: CreateOrUpdateAppointmentDto, config?: Partial<Rest.Config>) =>
|
||||||
this.restService.request<any, void>({
|
this.restService.request<any, AppointmentDto>({
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
url: '/api/app/appointment/appointment',
|
url: '/api/app/appointment/appointment',
|
||||||
body: input,
|
body: input,
|
||||||
|
@ -1,2 +1 @@
|
|||||||
export * from './appointment.service';
|
export * from './appointment.service';
|
||||||
export * from './models';
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
import type { FullAuditedEntity } from '../volo/abp/domain/entities/auditing/models';
|
|
||||||
import type { Gender } from '../global-enum/gender.enum';
|
|
||||||
import type { Doctor } from '../doctors/models';
|
|
||||||
import type { appointmentStatus } from '../global-enum/appointment-status.enum';
|
|
||||||
import type { visitType } from '../global-enum/visit-type.enum';
|
|
||||||
import type { paymentStatus } from '../global-enum/payment-status.enum';
|
|
||||||
|
|
||||||
export interface Appointment extends FullAuditedEntity<string> {
|
|
||||||
firstName?: string;
|
|
||||||
lastName?: string;
|
|
||||||
gender: Gender;
|
|
||||||
mobile?: string;
|
|
||||||
address?: string;
|
|
||||||
email?: string;
|
|
||||||
dob?: string;
|
|
||||||
doctor: Doctor;
|
|
||||||
dateOfAppointment?: string;
|
|
||||||
timeOfAppointment?: string;
|
|
||||||
injuryORContion?: string;
|
|
||||||
note?: string;
|
|
||||||
insuranceProvider?: string;
|
|
||||||
appointmentStatus: appointmentStatus;
|
|
||||||
visitType: visitType;
|
|
||||||
paymentStatus: paymentStatus;
|
|
||||||
}
|
|
@ -1,2 +1 @@
|
|||||||
export * from './department.service';
|
export * from './department.service';
|
||||||
export * from './models';
|
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
import type { FullAuditedEntity } from '../volo/abp/domain/entities/auditing/models';
|
|
||||||
|
|
||||||
export interface Department extends FullAuditedEntity<string> {
|
|
||||||
departmentNo?: string;
|
|
||||||
departmentName?: string;
|
|
||||||
departmentDate?: string;
|
|
||||||
departmentHead?: string;
|
|
||||||
status?: string;
|
|
||||||
description?: string;
|
|
||||||
}
|
|
@ -1,2 +1 @@
|
|||||||
export * from './doctor.service';
|
export * from './doctor.service';
|
||||||
export * from './models';
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
import type { FullAuditedEntity } from '../volo/abp/domain/entities/auditing/models';
|
|
||||||
import type { Department } from '../departments/models';
|
|
||||||
import type { Appointment } from '../appointments/models';
|
|
||||||
|
|
||||||
export interface Doctor extends FullAuditedEntity<string> {
|
|
||||||
firstName?: string;
|
|
||||||
lastName?: string;
|
|
||||||
gender?: string;
|
|
||||||
mobile?: string;
|
|
||||||
password?: string;
|
|
||||||
designation?: string;
|
|
||||||
departmentId?: string;
|
|
||||||
department: Department;
|
|
||||||
address?: string;
|
|
||||||
email?: string;
|
|
||||||
dob?: string;
|
|
||||||
education?: string;
|
|
||||||
appointments: Appointment[];
|
|
||||||
}
|
|
@ -1053,8 +1053,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"returnValue": {
|
"returnValue": {
|
||||||
"type": "System.Void",
|
"type": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto",
|
||||||
"typeSimple": "System.Void"
|
"typeSimple": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto"
|
||||||
},
|
},
|
||||||
"allowAnonymous": null,
|
"allowAnonymous": null,
|
||||||
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
||||||
@ -1090,8 +1090,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"returnValue": {
|
"returnValue": {
|
||||||
"type": "System.Void",
|
"type": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto",
|
||||||
"typeSimple": "System.Void"
|
"typeSimple": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto"
|
||||||
},
|
},
|
||||||
"allowAnonymous": null,
|
"allowAnonymous": null,
|
||||||
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
||||||
@ -1132,21 +1132,6 @@
|
|||||||
},
|
},
|
||||||
"allowAnonymous": false,
|
"allowAnonymous": false,
|
||||||
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
||||||
},
|
|
||||||
"GetExportAppointmentRecordAsync": {
|
|
||||||
"uniqueName": "GetExportAppointmentRecordAsync",
|
|
||||||
"name": "GetExportAppointmentRecordAsync",
|
|
||||||
"httpMethod": "GET",
|
|
||||||
"url": "api/app/appointment/export-appointment-record",
|
|
||||||
"supportedVersions": [],
|
|
||||||
"parametersOnMethod": [],
|
|
||||||
"parameters": [],
|
|
||||||
"returnValue": {
|
|
||||||
"type": "HospitalManagementSystem.Dto.FileDownloadDto",
|
|
||||||
"typeSimple": "HospitalManagementSystem.Dto.FileDownloadDto"
|
|
||||||
},
|
|
||||||
"allowAnonymous": null,
|
|
||||||
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -4916,18 +4901,6 @@
|
|||||||
"minimum": null,
|
"minimum": null,
|
||||||
"maximum": null,
|
"maximum": null,
|
||||||
"regex": null
|
"regex": null
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Doctor",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "HospitalManagementSystem.Doctors.Doctor",
|
|
||||||
"typeSimple": "HospitalManagementSystem.Doctors.Doctor",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -5144,453 +5117,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"HospitalManagementSystem.Appointments.Appointment": {
|
|
||||||
"baseType": "Volo.Abp.Domain.Entities.Auditing.FullAuditedEntity<System.Guid>",
|
|
||||||
"isEnum": false,
|
|
||||||
"enumNames": null,
|
|
||||||
"enumValues": null,
|
|
||||||
"genericArguments": null,
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"name": "FirstName",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "LastName",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Gender",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "HospitalManagementSystem.GlobalEnum.Gender",
|
|
||||||
"typeSimple": "HospitalManagementSystem.GlobalEnum.Gender",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Mobile",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Address",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Email",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "DOB",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.DateTime?",
|
|
||||||
"typeSimple": "string?",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Doctor",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "HospitalManagementSystem.Doctors.Doctor",
|
|
||||||
"typeSimple": "HospitalManagementSystem.Doctors.Doctor",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "DateOfAppointment",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.DateTime?",
|
|
||||||
"typeSimple": "string?",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "TimeOfAppointment",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "InjuryORContion",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Note",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "InsuranceProvider",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "AppointmentStatus",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "HospitalManagementSystem.GlobalEnum.appointmentStatus",
|
|
||||||
"typeSimple": "HospitalManagementSystem.GlobalEnum.appointmentStatus",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "VisitType",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "HospitalManagementSystem.GlobalEnum.visitType",
|
|
||||||
"typeSimple": "HospitalManagementSystem.GlobalEnum.visitType",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "PaymentStatus",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "HospitalManagementSystem.GlobalEnum.paymentStatus",
|
|
||||||
"typeSimple": "HospitalManagementSystem.GlobalEnum.paymentStatus",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"HospitalManagementSystem.Departments.Department": {
|
|
||||||
"baseType": "Volo.Abp.Domain.Entities.Auditing.FullAuditedEntity<System.Guid>",
|
|
||||||
"isEnum": false,
|
|
||||||
"enumNames": null,
|
|
||||||
"enumValues": null,
|
|
||||||
"genericArguments": null,
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"name": "DepartmentNo",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "DepartmentName",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "DepartmentDate",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.DateTime?",
|
|
||||||
"typeSimple": "string?",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "DepartmentHead",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Status",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Description",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"HospitalManagementSystem.Doctors.Doctor": {
|
|
||||||
"baseType": "Volo.Abp.Domain.Entities.Auditing.FullAuditedEntity<System.Guid>",
|
|
||||||
"isEnum": false,
|
|
||||||
"enumNames": null,
|
|
||||||
"enumValues": null,
|
|
||||||
"genericArguments": null,
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"name": "FirstName",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "LastName",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Gender",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Mobile",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Password",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Designation",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "DepartmentId",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.Guid?",
|
|
||||||
"typeSimple": "string?",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Department",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "HospitalManagementSystem.Departments.Department",
|
|
||||||
"typeSimple": "HospitalManagementSystem.Departments.Department",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Address",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Email",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"typeSimple": "string",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "DOB",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "System.String",
|
|
||||||
"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,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Appointments",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "[HospitalManagementSystem.Appointments.Appointment]",
|
|
||||||
"typeSimple": "[HospitalManagementSystem.Appointments.Appointment]",
|
|
||||||
"isRequired": false,
|
|
||||||
"minLength": null,
|
|
||||||
"maxLength": null,
|
|
||||||
"minimum": null,
|
|
||||||
"maximum": null,
|
|
||||||
"regex": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"HospitalManagementSystem.Documents.EntityDocument": {
|
"HospitalManagementSystem.Documents.EntityDocument": {
|
||||||
"baseType": "Volo.Abp.Domain.Entities.Auditing.AuditedAggregateRoot<System.Guid>",
|
"baseType": "Volo.Abp.Domain.Entities.Auditing.AuditedAggregateRoot<System.Guid>",
|
||||||
"isEnum": false,
|
"isEnum": false,
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using HospitalManagementSystem.Doctors;
|
using HospitalManagementSystem.GlobalEnum;
|
||||||
using HospitalManagementSystem.GlobalEnum;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -27,7 +26,5 @@ namespace HospitalManagementSystem.Appoinments.Dto
|
|||||||
public appointmentStatus AppointmentStatus { get; set; }
|
public appointmentStatus AppointmentStatus { get; set; }
|
||||||
public visitType VisitType { get; set; }
|
public visitType VisitType { get; set; }
|
||||||
public paymentStatus PaymentStatus { get; set; }
|
public paymentStatus PaymentStatus { get; set; }
|
||||||
public Doctor? Doctor { get; set; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\HospitalManagementSystem.Domain.Shared\HospitalManagementSystem.Domain.Shared.csproj" />
|
<ProjectReference Include="..\HospitalManagementSystem.Domain.Shared\HospitalManagementSystem.Domain.Shared.csproj" />
|
||||||
<ProjectReference Include="..\HospitalManagementSystem.Domain\HospitalManagementSystem.Domain.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -20,9 +20,6 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using System.Linq.Dynamic.Core;
|
using System.Linq.Dynamic.Core;
|
||||||
using Abp.UI;
|
using Abp.UI;
|
||||||
using HospitalManagementSystem.Doctors;
|
using HospitalManagementSystem.Doctors;
|
||||||
using ClosedXML.Excel;
|
|
||||||
using System.IO;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
|
|
||||||
namespace HospitalManagementSystem.Appointments
|
namespace HospitalManagementSystem.Appointments
|
||||||
{
|
{
|
||||||
@ -32,7 +29,6 @@ namespace HospitalManagementSystem.Appointments
|
|||||||
private readonly ICurrentTenant _currentTenant;
|
private readonly ICurrentTenant _currentTenant;
|
||||||
private IRepository<Appointment, Guid> _appointmentsRepository;
|
private IRepository<Appointment, Guid> _appointmentsRepository;
|
||||||
private readonly IRepository<Doctor, Guid> _doctorRepository;
|
private readonly IRepository<Doctor, Guid> _doctorRepository;
|
||||||
private readonly IWebHostEnvironment _env;
|
|
||||||
|
|
||||||
public AppointmentAppService(ICurrentUser currentUser, ICurrentTenant currentTenant, IRepository<Appointment, Guid> appointmentsRepository, IRepository<Doctor, Guid> doctorRepository)
|
public AppointmentAppService(ICurrentUser currentUser, ICurrentTenant currentTenant, IRepository<Appointment, Guid> appointmentsRepository, IRepository<Doctor, Guid> doctorRepository)
|
||||||
{
|
{
|
||||||
@ -66,7 +62,6 @@ namespace HospitalManagementSystem.Appointments
|
|||||||
.Take(input.MaxResultCount)
|
.Take(input.MaxResultCount)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
var appoinmentdto = ObjectMapper.Map<List<Appointment>, List<AppointmentDto>>(pagedQuery);
|
var appoinmentdto = ObjectMapper.Map<List<Appointment>, List<AppointmentDto>>(pagedQuery);
|
||||||
|
|
||||||
return new PagedResultDto<AppointmentDto>(
|
return new PagedResultDto<AppointmentDto>(
|
||||||
totalCount,
|
totalCount,
|
||||||
appoinmentdto
|
appoinmentdto
|
||||||
@ -89,34 +84,26 @@ namespace HospitalManagementSystem.Appointments
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Create Appointment
|
#region Create Appointment
|
||||||
public async Task CreateAppointmentAsync(CreateOrUpdateAppointmentDto input)
|
public async Task<AppointmentDto> CreateAppointmentAsync(CreateOrUpdateAppointmentDto input)
|
||||||
{
|
{
|
||||||
Appointment appointment = new Appointment();
|
var appointment = ObjectMapper.Map<CreateOrUpdateAppointmentDto, Appointment>(input);
|
||||||
|
|
||||||
var newdata = ObjectMapper.Map<CreateOrUpdateAppointmentDto, Appointment>(input);
|
|
||||||
newdata.Doctor = await _doctorRepository.GetAsync(input.DoctorId.Value);
|
|
||||||
appointment = newdata;
|
|
||||||
appointment = await _appointmentsRepository.InsertAsync(appointment);
|
appointment = await _appointmentsRepository.InsertAsync(appointment);
|
||||||
|
|
||||||
|
return ObjectMapper.Map<Appointment, AppointmentDto>(appointment);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Update Appointment
|
#region Update Appointment
|
||||||
public async Task UpdateAppointmentAsync(CreateOrUpdateAppointmentDto input)
|
public async Task<AppointmentDto> UpdateAppointmentAsync(CreateOrUpdateAppointmentDto input)
|
||||||
{
|
{
|
||||||
try
|
//var appointment = await _appointmentsRepository.GetAsync(input.Id);
|
||||||
{
|
Appointment appointment = new Appointment();
|
||||||
//var appointment = await _appointmentsRepository.GetAsync(input.Id);
|
var newdata = ObjectMapper.Map<CreateOrUpdateAppointmentDto, Appointment>(input);
|
||||||
Appointment appointment = new Appointment();
|
newdata.Doctor = await _doctorRepository.GetAsync(input.DoctorId.Value);
|
||||||
var newdata = ObjectMapper.Map<CreateOrUpdateAppointmentDto, Appointment>(input);
|
appointment = newdata;
|
||||||
newdata.Doctor = await _doctorRepository.GetAsync(input.DoctorId.Value);
|
appointment = await _appointmentsRepository.UpdateAsync(appointment);
|
||||||
appointment = newdata;
|
return ObjectMapper.Map<Appointment, AppointmentDto>(appointment);
|
||||||
appointment = await _appointmentsRepository.UpdateAsync(appointment);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
throw new Exception(ex.Message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -127,67 +114,5 @@ namespace HospitalManagementSystem.Appointments
|
|||||||
await _appointmentsRepository.DeleteAsync(id);
|
await _appointmentsRepository.DeleteAsync(id);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Export Appointment Data to Excel
|
|
||||||
public async Task<FileDownloadDto> GetExportAppointmentRecordAsync()
|
|
||||||
{
|
|
||||||
var Appointmentrecord = await _appointmentsRepository.GetQueryableAsync().Result.ToListAsync();
|
|
||||||
|
|
||||||
var folderPath = Path.Combine(_env.WebRootPath, "temp");
|
|
||||||
if (!Directory.Exists(folderPath))
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(folderPath); // Ensure the folder exists
|
|
||||||
}
|
|
||||||
|
|
||||||
var filename = "Appointments_" + 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("Appointment");
|
|
||||||
|
|
||||||
// Add headers
|
|
||||||
worksheet.Cell(1, 1).Value = "Name";
|
|
||||||
worksheet.Cell(1, 2).Value = "Email";
|
|
||||||
worksheet.Cell(1, 3).Value = "Gender";
|
|
||||||
worksheet.Cell(1, 4).Value = "Date";
|
|
||||||
worksheet.Cell(1, 5).Value = "Time";
|
|
||||||
worksheet.Cell(1, 6).Value = "Mobile";
|
|
||||||
worksheet.Cell(1, 7).Value = "Doctor";
|
|
||||||
worksheet.Cell(1, 8).Value = "Injury";
|
|
||||||
worksheet.Cell(1, 9).Value = "Appointment Status";
|
|
||||||
worksheet.Cell(1, 10).Value = "Visit Type";
|
|
||||||
worksheet.Cell(1, 11).Value = "Payment Status";
|
|
||||||
worksheet.Cell(1, 12).Value = "Insurance Provider";
|
|
||||||
worksheet.Cell(1, 13).Value = "Notes";
|
|
||||||
|
|
||||||
for (int i = 0; i < Appointmentrecord.Count; i++)
|
|
||||||
{
|
|
||||||
//worksheet.Cell(i + 2, 1).Value = Appointmentrecord[i].Patients.Name;
|
|
||||||
//worksheet.Cell(i + 2, 2).Value = Appointmentrecord[i].Patients.Gender.ToString();
|
|
||||||
//worksheet.Cell(i + 2, 3).Value = Appointmentrecord[i].DateOfAdmission.ToShortDateString();
|
|
||||||
//worksheet.Cell(i + 2, 4).Value = Appointmentrecord[i].Diagnosis;
|
|
||||||
//worksheet.Cell(i + 2, 5).Value = Appointmentrecord[i].NextFollowUp?.ToShortDateString();
|
|
||||||
//worksheet.Cell(i + 2, 6).Value = Appointmentrecord[i].InsuranceProvider;
|
|
||||||
//worksheet.Cell(i + 2, 7).Value = Appointmentrecord[i].InsuranceProvider;
|
|
||||||
//worksheet.Cell(i + 2, 8).Value = Appointmentrecord[i].InsuranceProvider;
|
|
||||||
//worksheet.Cell(i + 2, 9).Value = Appointmentrecord[i].Status.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
worksheet.Columns().AdjustToContents();
|
|
||||||
workbook.SaveAs(filePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
byte[] fileBytes = await File.ReadAllBytesAsync(filePath);
|
|
||||||
File.Delete(filePath);
|
|
||||||
|
|
||||||
return new FileDownloadDto
|
|
||||||
{
|
|
||||||
FileName = filename,
|
|
||||||
FileContent = Convert.ToBase64String(fileBytes) // Use Base64 encoding for file content
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ namespace HospitalManagementSystem.Patients
|
|||||||
|
|
||||||
#region Create Patient
|
#region Create Patient
|
||||||
[Authorize(HospitalManagementSystemPermissions.Patient.Create)]
|
[Authorize(HospitalManagementSystemPermissions.Patient.Create)]
|
||||||
public async Task CreatePatientRecordAsync(CreateUpdatePatientRecordDto input)
|
public async Task<PatientRecordDto> CreatePatientRecordAsync(CreateUpdatePatientRecordDto input)
|
||||||
{
|
{
|
||||||
var patientEntity = await _patientRepository.GetAsync(input.PatientId); // Get Patient from DB
|
var patientEntity = await _patientRepository.GetAsync(input.PatientId); // Get Patient from DB
|
||||||
var patientRecord = ObjectMapper.Map<CreateUpdatePatientRecordDto, PatientRecord>(input);
|
var patientRecord = ObjectMapper.Map<CreateUpdatePatientRecordDto, PatientRecord>(input);
|
||||||
@ -194,12 +194,14 @@ namespace HospitalManagementSystem.Patients
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
patientRecord = await _patientrecordRepository.InsertAsync(patientRecord);
|
patientRecord = await _patientrecordRepository.InsertAsync(patientRecord);
|
||||||
|
|
||||||
|
return ObjectMapper.Map<PatientRecord, PatientRecordDto>(patientRecord);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Update Patient
|
#region Update Patient
|
||||||
[Authorize(HospitalManagementSystemPermissions.Patient.Edit)]
|
[Authorize(HospitalManagementSystemPermissions.Patient.Edit)]
|
||||||
public async Task UpdatePatientRecordAsync(Guid id, CreateUpdatePatientRecordDto input)
|
public async Task<PatientRecordDto> UpdatePatientRecordAsync(Guid id, CreateUpdatePatientRecordDto input)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -238,6 +240,7 @@ namespace HospitalManagementSystem.Patients
|
|||||||
}
|
}
|
||||||
patientRecord = await _patientrecordRepository.UpdateAsync(patientRecord);
|
patientRecord = await _patientrecordRepository.UpdateAsync(patientRecord);
|
||||||
|
|
||||||
|
return ObjectMapper.Map<PatientRecord, PatientRecordDto>(patientRecord);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -361,7 +364,7 @@ namespace HospitalManagementSystem.Patients
|
|||||||
|
|
||||||
#region Create Patient
|
#region Create Patient
|
||||||
[Authorize(HospitalManagementSystemPermissions.Patient.Create)]
|
[Authorize(HospitalManagementSystemPermissions.Patient.Create)]
|
||||||
public async Task CreatePatientAsync(CreateUpdatePatientDto input)
|
public async Task<PatientDto> CreatePatientAsync(CreateUpdatePatientDto input)
|
||||||
{
|
{
|
||||||
var patient = ObjectMapper.Map<CreateUpdatePatientDto, Patient>(input);
|
var patient = ObjectMapper.Map<CreateUpdatePatientDto, Patient>(input);
|
||||||
|
|
||||||
@ -378,12 +381,14 @@ namespace HospitalManagementSystem.Patients
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return ObjectMapper.Map<Patient, PatientDto>(patient);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Update Patient
|
#region Update Patient
|
||||||
[Authorize(HospitalManagementSystemPermissions.Patient.Edit)]
|
[Authorize(HospitalManagementSystemPermissions.Patient.Edit)]
|
||||||
public async Task UpdatePatientAsync(Guid id, CreateUpdatePatientDto input)
|
public async Task<PatientDto> UpdatePatientAsync(Guid id, CreateUpdatePatientDto input)
|
||||||
{
|
{
|
||||||
var patient = await _patientRepository.GetQueryableAsync().Result.Include(x => x.Images).Where(x => x.Id == id).FirstOrDefaultAsync();
|
var patient = await _patientRepository.GetQueryableAsync().Result.Include(x => x.Images).Where(x => x.Id == id).FirstOrDefaultAsync();
|
||||||
List<EntityDocument> entitydocument = new List<EntityDocument>();
|
List<EntityDocument> entitydocument = new List<EntityDocument>();
|
||||||
@ -402,6 +407,7 @@ namespace HospitalManagementSystem.Patients
|
|||||||
}
|
}
|
||||||
|
|
||||||
patient = await _patientRepository.UpdateAsync(patient);
|
patient = await _patientRepository.UpdateAsync(patient);
|
||||||
|
return ObjectMapper.Map<Patient, PatientDto>(patient);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user