+
+
+
+
+
+
+
+
+
-
-
diff --git a/angular/src/app/appointment/view-appointment/view-appointment.component.ts b/angular/src/app/appointment/view-appointment/view-appointment.component.ts
index 5ec24af..c5881ff 100644
--- a/angular/src/app/appointment/view-appointment/view-appointment.component.ts
+++ b/angular/src/app/appointment/view-appointment/view-appointment.component.ts
@@ -1,5 +1,7 @@
import { Component } from '@angular/core';
+import { NgForm } from '@angular/forms';
import { DoctorService } from '@proxy/doctors';
+import { Gender } from '@proxy/global-enum';
@Component({
selector: 'app-view-appointment',
@@ -13,12 +15,14 @@ export class ViewAppointmentComponent {
patients: [];
isEditing = false;
appointmentDialog = false;
+ genders = Gender;
+ isEditMode: boolean = false;
appointment = {
firstname: '',
lastname: '',
email: '',
- gender: '',
+ gender: Gender.Male,
date: '',
dob:'',
time: '',
@@ -30,11 +34,13 @@ export class ViewAppointmentComponent {
status: '',
visitType: '',
paymentStatus: '',
+ Address:''
};
appointments = [
{
id: 1,
- name: 'John Doe',
+ firstname: 'John',
+ lastname: 'Doe',
doctor: 'Dr. Smith',
gender: 1,
date: new Date(),
@@ -46,7 +52,8 @@ export class ViewAppointmentComponent {
},
{
id: 2,
- name: 'Jane Smith',
+ firstname: 'Jane',
+ lastname: 'Smith',
doctor: 'Dr. Johnson',
gender: 0,
date: new Date(),
@@ -58,7 +65,8 @@ export class ViewAppointmentComponent {
},
{
id: 3,
- name: 'Mike Johnson',
+ firstname: 'Mike',
+ lastname: 'Johnson',
doctor: 'Dr. Brown',
gender: 1,
date: new Date(),
@@ -69,24 +77,24 @@ export class ViewAppointmentComponent {
visitType: 'Surgery',
},
];
- status = { 1: 'Scheduled', 2: 'Completed', 3: 'Canceled' };
- genders = [
- { label: 'Male', value: 'Male' },
- { label: 'Female', value: 'Female' },
- ];
+ // status = { 1: 'Scheduled', 2: 'Completed', 3: 'Canceled' };
+
+
doctors = [];
doctorOptions = [];
appointmentStatuses = [
{ label: 'Scheduled', value: 'Scheduled' },
{ label: 'Completed', value: 'Completed' },
+ { label: 'Canceled', value: 'Canceled' },
];
visitTypes = [
- { label: 'Consultation', value: 'Consultation' },
+ { label: 'New Patient', value: 'NewPatient' },
{ label: 'Follow-up', value: 'Follow-up' },
];
paymentStatuses = [
{ label: 'Pending', value: 'Pending' },
{ label: 'Paid', value: 'Paid' },
+ { label: 'Unpaid', value: 'Unpaid' },
];
createPermission = true;
@@ -105,7 +113,7 @@ export class ViewAppointmentComponent {
firstname: '',
lastname: '',
email: '',
- gender: '',
+ gender: Gender.Male,
date: '',
dob:'',
time: '',
@@ -117,6 +125,7 @@ export class ViewAppointmentComponent {
status: '',
visitType: '',
paymentStatus: '',
+ Address:''
};
}
@@ -131,10 +140,15 @@ export class ViewAppointmentComponent {
deleteAppointment(id: number) {
console.log('Deleting appointment with ID', id);
}
- saveAppointment() {
- console.log(this.appointment);
- this.appointmentDialog = false;
- }
+ saveAppointment(form: NgForm) {
+ debugger
+ console.log(form.controls);
+ if (form.invalid) {
+ Object.values(form.controls).forEach(control => control.markAsTouched());
+ return;
+ }
+
+ }
closeDialog() {
this.appointmentDialog = false;
@@ -143,9 +157,8 @@ export class ViewAppointmentComponent {
this.DoctorService.get().subscribe(result => {
debugger;
this.doctors = result;
- // Create a formatted array for dropdown
this.doctorOptions = this.doctors.map(doctor => ({
- label: `${doctor.firstName} ${doctor.lastName}`, // Combine first and last name
+ label: `Dr. ${doctor.firstName} ${doctor.lastName}`, // Combine first and last name
value: doctor.id, // Use the ID as the value
}));
});
diff --git a/angular/src/app/appointment/view-appointment/view-appointment.module.ts b/angular/src/app/appointment/view-appointment/view-appointment.module.ts
index 3505ed2..75a9da9 100644
--- a/angular/src/app/appointment/view-appointment/view-appointment.module.ts
+++ b/angular/src/app/appointment/view-appointment/view-appointment.module.ts
@@ -12,6 +12,7 @@ import { DropdownModule } from 'primeng/dropdown';
import { InputTextModule } from 'primeng/inputtext';
import { RadioButtonModule } from 'primeng/radiobutton';
import { DoctorService } from '@proxy/doctors';
+import { InputTextareaModule } from 'primeng/inputtextarea';
@NgModule({
declarations: [ViewAppointmentComponent],
@@ -28,6 +29,7 @@ import { DoctorService } from '@proxy/doctors';
CalendarModule,
DropdownModule,
RadioButtonModule,
+ InputTextareaModule
],
providers:[DoctorService]
diff --git a/angular/src/app/patients/all-patients/all-patients.component.html b/angular/src/app/patients/all-patients/all-patients.component.html
new file mode 100644
index 0000000..64159d6
--- /dev/null
+++ b/angular/src/app/patients/all-patients/all-patients.component.html
@@ -0,0 +1,238 @@
+
+
+
+
+
+
Patient List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Patient ID |
+ Full Name |
+ Gender |
+ Date of Admission |
+ Blood Group |
+ Mobile |
+ Email |
+ Status |
+ Actions |
+
+
+
+
+
+ {{ patient.id }} |
+ {{ patient.name }} |
+
+
+ {{ gender[patient.gender] }}
+
+ |
+ {{ patient.admissionDate | date }} |
+ {{ patient.bloodGroup }} |
+ {{ patient.mobile }} |
+ {{ patient.email }} |
+ {{ status[patient.status] }} |
+
+
+
+
+ |
+
+
+
+
+
+ No Patients found. |
+
+
+
+
Total Records: {{totalRecords}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/angular/src/app/patients/all-patients/all-patients.component.scss b/angular/src/app/patients/all-patients/all-patients.component.scss
new file mode 100644
index 0000000..9b907b1
--- /dev/null
+++ b/angular/src/app/patients/all-patients/all-patients.component.scss
@@ -0,0 +1,28 @@
+.table-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .badge {
+ display: inline-block;
+ padding: 0.2rem 0.6rem;
+ border-radius: 0.5rem;
+ color: white;
+ font-weight: bold;
+ font-size: 0.8rem;
+ }
+
+ .male {
+ background-color: green;
+ }
+
+ .female {
+ background-color: purple;
+ }
+
+ .pdf-icon {
+ color: red;
+ font-size: 1.2rem;
+ }
+
\ No newline at end of file
diff --git a/angular/src/app/patients/all-patients/all-patients.component.ts b/angular/src/app/patients/all-patients/all-patients.component.ts
new file mode 100644
index 0000000..b9cbffb
--- /dev/null
+++ b/angular/src/app/patients/all-patients/all-patients.component.ts
@@ -0,0 +1,275 @@
+import { PermissionService } from '@abp/ng.core';
+import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { NgForm } from '@angular/forms';
+import { Router } from '@angular/router';
+import { PagingSortPatientResultDto } from '@proxy/dto';
+import { Gender, Status } from '@proxy/global-enum';
+import { PatientService } from '@proxy/patients';
+import { PatientDto, CreateUpdatePatientDto } from '@proxy/patients/dto';
+
+@Component({
+ selector: 'app-all-patients',
+ templateUrl: './all-patients.component.html',
+ styleUrl: './all-patients.component.scss',
+ providers: [PatientService, ConfirmationService, ToasterService, PermissionService],
+})
+export class AllPatientsComponent implements OnInit {
+ globalFilter: string = '';
+ patients: PatientDto[];
+ totalRecords: number = 0;
+ loading: boolean = false;
+ patientDialog: boolean = false;
+ selectedPatient: CreateUpdatePatientDto;
+ isEditMode: boolean = false;
+ patientDialogTitle: string = '';
+ params: PagingSortPatientResultDto;
+ status: any;
+ gender: any;
+ statuslist: any;
+ selectedstatus: any = 0;
+ selectedgender: any = 0;
+ selectadmissionDate: Date = new Date();
+ selectdischargeDate: Date = new Date();
+ createpermission: boolean;
+ editpermission: boolean;
+ deletepermission: boolean;
+ error: string = '';
+ imgpath: string = '';
+ guid: string = '00000000-0000-0000-0000-000000000000';
+ options: Partial
= {
+ hideCancelBtn: false,
+ hideYesBtn: false,
+ dismissible: false,
+ cancelText: 'Close',
+ // yesText: 'Confirm',
+ messageLocalizationParams: ['Demo'],
+ titleLocalizationParams: [],
+ // You can customize icon
+ // icon: 'fa fa-exclamation-triangle', // or
+ // iconTemplate : '
'
+ };
+
+ constructor(
+ private patientService: PatientService,
+ private http: HttpClient,
+ private confirmation: ConfirmationService,
+ private toaster: ToasterService,
+ private permissionChecker: PermissionService,
+ private router: Router
+ ) {}
+
+ ngOnInit() {
+ this.createpermission = this.permissionChecker.getGrantedPolicy(
+ 'HospitalManagementSystem.Patient.Create'
+ );
+ this.editpermission = this.permissionChecker.getGrantedPolicy(
+ 'HospitalManagementSystem.Patient.Edit'
+ );
+ this.deletepermission = this.permissionChecker.getGrantedPolicy(
+ 'HospitalManagementSystem.Patient.Delete'
+ );
+ this.status = Status;
+ this.gender = Gender;
+ this.patientService.getStatusDropdown().subscribe(result => {
+ this.statuslist = result;
+ });
+
+ this.resetselectpatient();
+ this.loadPatient({
+ first: 0,
+ rows: 10,
+ sortField: 'id',
+ sortOrder: 1,
+ globalFilter: null,
+ });
+ }
+ resetselectpatient() {
+ this.selectedPatient = {
+ name: '',
+ gender: Gender.Male,
+ mobile: '',
+ email: '',
+ age: 0,
+ treatment: '',
+ doctorAssigned: '',
+ address: '',
+ bloodGroup: '',
+ admissionDate: '',
+ dischargeDate: '',
+ status: Status.InTreatment,
+ };
+ this.imgpath = '';
+ this.selectedgender = 0;
+ this.selectedstatus = 0;
+ }
+
+ loadPatient(event: any) {
+ this.loading = true;
+ let order = event.sortOrder == 1 ? ' asc' : ' desc';
+ event.sortField = event.sortField == undefined ? 'id' : event.sortField;
+ this.params = {
+ skipCount: event.first,
+ maxResultCount: event.rows,
+ sorting: event.sortField + order,
+ search: event.globalFilter == null ? '' : event.globalFilter,
+ };
+
+ this.patientService.getPatientList(this.params).subscribe(data => {
+ this.patients = data.items;
+ this.totalRecords = data.totalCount;
+ this.loading = false;
+ });
+ }
+
+ exportPatient() {
+ this.patientService.getExportPatientData().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);
+ });
+ }
+
+ openNewPatientDialog() {
+ this.patientDialogTitle = 'New Patient';
+ this.resetselectpatient();
+ this.selectedgender = 0;
+ this.selectedstatus = 0;
+ this.patientDialog = true;
+ this.isEditMode = false;
+ }
+
+ addnewrecord(id: any) {
+ this.router.navigate(['/patients/patient-record', id]);
+ }
+
+ profileimageupload(event: Event) {
+ if (this.selectedPatient.name == '') {
+ this.error = 'Please Type a Name';
+ return;
+ }
+ const input = event.target as HTMLInputElement;
+ if (input.files.length > 0) {
+ const tag = 'Image';
+ const formdata = new FormData();
+ formdata.append('file', input.files[0]);
+ this.UploadFileData(tag, formdata);
+ } else {
+ return;
+ }
+ }
+
+ UploadFileData(tag: string, formdata: FormData) {
+ this.patientService.uploadFile(tag, formdata).subscribe(result => {
+ this.selectedPatient.imageID = result;
+ });
+ }
+
+ editPatient(Patient: any) {
+ this.resetselectpatient();
+ this.patientDialogTitle = 'Edit Patient';
+ this.patientService.getPatientById(Patient.id).subscribe(result => {
+ this.selectedPatient = result;
+ this.imgpath = result.imagepath != null ? result.imagepath.split('\\')[3] : '';
+ this.selectadmissionDate = new Date(this.selectedPatient.admissionDate);
+ this.selectedgender = this.selectedPatient.gender;
+ this.selectedstatus = this.selectedPatient.status;
+ });
+ this.patientDialog = true;
+ this.isEditMode = true;
+ }
+
+ deletePatient(id: any) {
+ this.confirmation
+ .warn('Do you really want to delete this patient?', {
+ key: '::AreYouSure',
+ defaultValue: 'Are you sure?',
+ })
+ .subscribe((status: Confirmation.Status) => {
+ // your code here
+ if (status == 'confirm') {
+ this.patientService.deletePatient(id).subscribe(() => {
+ this.toaster.success('Patient deleted successfully', 'Success');
+ this.loadPatient(this.params);
+ });
+ }
+ });
+ }
+
+ savePatient(form: NgForm) {
+ console.log(form.controls);
+ if (form.invalid) {
+ Object.values(form.controls).forEach(control => control.markAsTouched());
+ return;
+ }
+ this.selectedPatient.gender = this.selectedgender;
+ this.selectedPatient.status = this.selectedstatus;
+ this.selectedPatient.admissionDate = this.selectadmissionDate.toDateString();
+ this.selectedPatient.dischargeDate = this.selectdischargeDate.toDateString();
+ this.selectedPatient.imageID = this.selectedPatient.imageID
+ ? this.selectedPatient.imageID.replace('"', '').replace('"', '')
+ : this.guid;
+ console.log(this.selectedPatient);
+
+ if (this.isEditMode) {
+ this.patientService.updatePatient(this.selectedPatient.id, this.selectedPatient).subscribe(
+ () => {
+ this.toaster.success('Patient updated successfully', 'Success');
+ this.patientDialog = false;
+ this.loadPatient({
+ first: 0,
+ rows: 10,
+ sortField: 'id',
+ sortOrder: 1,
+ globalFilter: null,
+ });
+ },
+ error => {
+ console.log(error);
+ this.closeDialog();
+ }
+ );
+ } else {
+ this.patientService.createPatient(this.selectedPatient).subscribe(
+ () => {
+ this.toaster.success('Patient created successfully', 'Success');
+ this.patientDialog = false;
+ this.loadPatient({
+ first: 0,
+ rows: 10,
+ sortField: 'id',
+ sortOrder: 1,
+ globalFilter: null,
+ });
+ },
+ error => {
+ console.log(error);
+ this.closeDialog();
+ }
+ );
+ }
+ }
+
+ closeDialog() {
+ this.patientDialog = false;
+ }
+}
diff --git a/angular/src/app/patients/patient-record/patient-record.component.html b/angular/src/app/patients/patient-record/patient-record.component.html
new file mode 100644
index 0000000..44ff19f
--- /dev/null
+++ b/angular/src/app/patients/patient-record/patient-record.component.html
@@ -0,0 +1,279 @@
+
+
+
+
+
![Patient Image]()
+
+
+
+
+
{{ patientdto?.name }}
+
+
+ Age: {{ patientdto?.age }}
+
+
+ Gender: {{ gender[patientdto?.gender] }}
+
+
+ Mobile: {{ patientdto?.mobile }}
+
+
+ Email: {{ patientdto?.email }}
+
+
+ Blood Group: {{ patientdto?.bloodGroup }}
+
+
+ Doctor: {{ patientdto?.doctorAssigned || 'N/A' }}
+
+
+ Admission: {{ patientdto?.admissionDate | date }}
+
+
+ Discharge: {{ patientdto?.dischargeDate | date }}
+
+
+ Treatment: {{ patientdto?.treatment || 'N/A' }}
+
+
+ Status:
+
+ {{ status[patientdto?.status] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{'::PatientHeader' | abpLocalization}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Patient ID |
+ Full Name |
+ Gender |
+ Date of Admission |
+ Diagnosis |
+ Lab Reports |
+ Medications |
+ Next Follow-Up |
+ Status |
+ Actions |
+
+
+
+
+
+ {{ patientrecord.id }} |
+ {{ patientrecord.patients.name }} |
+
+
+ {{ gender[patientrecord.patients.gender] }}
+
+ |
+ {{ patientrecord.dateOfAdmission | date }} |
+ {{ patientrecord.diagnosis }} |
+ |
+ |
+ {{ patientrecord.nextFollowUp | date }} |
+ {{ status[patientrecord.patients.status] }} |
+
+
+
+ |
+
+
+
+
+ No Patients found. |
+
+
+
+
Total Records: {{totalRecords}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/angular/src/app/patients/patient-record/patient-record.component.scss b/angular/src/app/patients/patient-record/patient-record.component.scss
new file mode 100644
index 0000000..0bc5d64
--- /dev/null
+++ b/angular/src/app/patients/patient-record/patient-record.component.scss
@@ -0,0 +1,81 @@
+.table-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .badge {
+ display: inline-block;
+ padding: 0.2rem 0.6rem;
+ border-radius: 0.5rem;
+ color: white;
+ font-weight: bold;
+ font-size: 0.8rem;
+ }
+
+ .male {
+ background-color: green;
+ }
+
+ .female {
+ background-color: purple;
+ }
+
+ .pdf-icon {
+ color: red;
+ font-size: 1.2rem;
+ }
+
+
+ .patient-container {
+ display: flex;
+ justify-content: center;
+ margin-bottom: 20px;
+ }
+
+ .patient-card {
+ display: flex;
+ align-items: center;
+ width: 100%;
+ max-width: 800px;
+ background: #ffffff;
+ border-radius: 12px;
+ padding: 20px;
+ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
+ border-left: 5px solid #007bff;
+ }
+
+ .patient-image img {
+ width: 100px;
+ height: 100px;
+ border-radius: 50%;
+ object-fit: cover;
+ border: 3px solid #007bff;
+ }
+
+ .patient-info {
+ flex: 1;
+ margin-left: 20px;
+ }
+
+ .patient-name {
+ font-size: 22px;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 8px;
+ }
+
+ .patient-details {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(150px, 1fr));
+ gap: 8px;
+ }
+
+ .info-item {
+ font-size: 14px;
+ background: #f8f9fa;
+ padding: 6px 12px;
+ border-radius: 6px;
+ }
+
+
\ No newline at end of file
diff --git a/angular/src/app/patients/patient-record/patient-record.component.ts b/angular/src/app/patients/patient-record/patient-record.component.ts
new file mode 100644
index 0000000..49358ae
--- /dev/null
+++ b/angular/src/app/patients/patient-record/patient-record.component.ts
@@ -0,0 +1,319 @@
+import { Component, OnInit } from '@angular/core';
+import { NgForm } from '@angular/forms';
+import { PagingSortPatientResultDto } from '@proxy/dto';
+import { Gender, Status } from '@proxy/global-enum';
+import { PatientService } from '@proxy/patients';
+import { CreateUpdatePatientRecordDto, PatientDto, PatientRecordDto } from '@proxy/patients/dto';
+import { PermissionService } from '@abp/ng.core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { environment } from 'src/environments/environment';
+import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
+
+@Component({
+ selector: 'app-patient-record',
+ templateUrl: './patient-record.component.html',
+ styleUrl: './patient-record.component.scss',
+ providers: [PatientService, ConfirmationService, ToasterService, PermissionService],
+})
+export class PatientRecordComponent implements OnInit {
+ globalFilter: string = '';
+ patientrecords: PatientRecordDto[];
+ totalRecords: number = 0;
+ loading: boolean = false;
+ patientDialog: boolean = false;
+ selectedPatient: CreateUpdatePatientRecordDto;
+ patientdto: PatientDto;
+ isEditMode: boolean = false;
+ patientDialogTitle: string = '';
+ params: PagingSortPatientResultDto;
+ status: any;
+ gender: any;
+ statuslist: any;
+ selectdateOfAdmission: Date = new Date();
+ selectnextFollowUp: Date = new Date();
+ createpermission: boolean;
+ editpermission: boolean;
+ deletepermission: boolean;
+ patientId: any;
+ patientImageUrl: string;
+ labReportUrlpath: string;
+ medicationHistoryUrlpath: string;
+ medicationUrlpath: string;
+ guid: string = '00000000-0000-0000-0000-000000000000';
+ options: Partial = {
+ hideCancelBtn: false,
+ hideYesBtn: false,
+ dismissible: false,
+ cancelText: 'Close',
+ yesText: 'Confirm',
+ messageLocalizationParams: ['Demo'],
+ titleLocalizationParams: [],
+ // You can customize icon
+ // icon: 'fa fa-exclamation-triangle', // or
+ // iconTemplate : '
'
+ };
+
+ constructor(
+ private patientService: PatientService,
+ private confirmation: ConfirmationService,
+ private permissionChecker: PermissionService,
+ private toaster: ToasterService,
+ private route: ActivatedRoute,
+ private router: Router
+ ) {}
+
+ ngOnInit() {
+ this.patientId = this.route.snapshot.paramMap.get('id');
+ console.log(this.patientId);
+
+ this.createpermission = this.permissionChecker.getGrantedPolicy(
+ 'HospitalManagementSystem.Patient.Create'
+ );
+ this.editpermission = this.permissionChecker.getGrantedPolicy(
+ 'HospitalManagementSystem.Patient.Edit'
+ );
+ this.deletepermission = this.permissionChecker.getGrantedPolicy(
+ 'HospitalManagementSystem.Patient.Delete'
+ );
+ this.status = Status;
+ this.gender = Gender;
+ this.patientService.getStatusDropdown().subscribe(result => {
+ this.statuslist = result;
+ });
+
+ this.resetselectpatient();
+ }
+
+ resetselectpatient() {
+ this.selectedPatient = {
+ patientId: this.patientId,
+ dateOfAdmission: '',
+ // labReportUrl: '',
+ // medicationUrl: '',
+ // medicationHistoryUrl: '',
+ nextFollowUp: '',
+ diagnosis: '',
+ treatmentPlan: '',
+ doctorNotes: '',
+ insuranceProvider: '',
+ status: Status.InTreatment,
+ };
+ this.labReportUrlpath = '';
+ this.medicationUrlpath = '';
+ this.medicationHistoryUrlpath = '';
+ this.selectdateOfAdmission = new Date();
+ this.selectnextFollowUp = new Date();
+ }
+
+ loadPatient(event: any, id: any) {
+ this.selectedPatient.patientId = this.patientId;
+ this.loading = true;
+ let order = event.sortOrder == 1 ? ' asc' : ' desc';
+ event.sortField = event.sortField == undefined ? 'id' : event.sortField;
+ this.params = {
+ skipCount: event.first,
+ maxResultCount: event.rows,
+ sorting: event.sortField + order,
+ search: event.globalFilter == null ? '' : event.globalFilter,
+ };
+ this.patientService.getPatientById(this.patientId).subscribe(result => {
+ this.patientdto = result;
+ this.patientImageUrl = environment.apis.default.url + result.imagepath;
+ });
+ this.patientService.getPatientRecordList(this.params, id).subscribe(data => {
+ this.patientrecords = data.items;
+ // console.log(data.items);
+ this.totalRecords = data.totalCount;
+ this.loading = false;
+ });
+ }
+
+ backtopatient() {
+ this.router.navigate(['/patients/all-patients']);
+ }
+
+ exportPatient() {
+ this.patientService.getExportPatientRecord().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);
+ });
+ }
+
+ openNewPatientDialog() {
+ this.patientDialogTitle = 'New Patient Record';
+ this.resetselectpatient();
+ this.patientDialog = true;
+ this.isEditMode = false;
+ }
+
+ editPatient(Patient: any) {
+ this.resetselectpatient();
+ this.patientDialogTitle = 'Edit Patient';
+ this.patientService.getPatientRecordById(Patient.id).subscribe(result => {
+ this.selectedPatient = result;
+ this.selectedPatient.patientId = this.patientId;
+ this.selectdateOfAdmission = new Date(this.selectedPatient.dateOfAdmission);
+ this.selectnextFollowUp = new Date(this.selectedPatient.nextFollowUp);
+ this.labReportUrlpath = result.labReportUrl != null ? result.labReportUrl.split('\\')[3] : '';
+ this.medicationUrlpath =
+ result.medicationUrl != null ? result.medicationUrl.split('\\')[3] : '';
+ this.medicationHistoryUrlpath =
+ result.medicationHistoryUrl != null ? result.medicationHistoryUrl.split('\\')[3] : '';
+ console.log(result);
+ });
+ this.patientDialog = true;
+ this.isEditMode = true;
+ }
+
+ deletePatient(id: any) {
+ this.confirmation
+ .warn('Do you really want to delete this record ?', {
+ key: '::AreYouSure',
+ defaultValue: 'Are you sure?',
+ })
+ .subscribe((status: Confirmation.Status) => {
+ // your code here
+ if (status == 'confirm') {
+ this.patientService.deletePatientRecord(id).subscribe(() => {
+ this.loadPatient(this.params, this.patientId);
+ this.toaster.success('Patient deleted successfully', 'Success');
+ });
+ }
+ });
+ }
+
+ handleLabReportUpload(event: Event): void {
+ const input = event.target as HTMLInputElement;
+ if (input && input.files) {
+ const tag = 'Lab-Report';
+ const formdata = new FormData();
+ formdata.append('file', input.files[0]);
+ this.UploadFileData(tag, formdata);
+ }
+ }
+
+ handleMedicationsUpload(event: any): void {
+ const input = event.target as HTMLInputElement;
+ if (input && input.files) {
+ const tag = 'Medication';
+ const formdata = new FormData();
+ formdata.append('file', input.files[0]);
+ this.UploadFileData(tag, formdata);
+ }
+ }
+
+ handleMedicationHistoryUpload(event: any): void {
+ const input = event.target as HTMLInputElement;
+ if (input && input.files) {
+ const tag = 'Medication-History';
+ const formdata = new FormData();
+ formdata.append('file', input.files[0]);
+ this.UploadFileData(tag, formdata);
+ }
+ }
+
+ UploadFileData(tag: string, formdata: FormData) {
+ this.patientService.uploadFile(tag, formdata).subscribe(result => {
+ switch (tag) {
+ case 'Lab-Report':
+ this.selectedPatient.labReportUrlID = result;
+ break;
+ case 'Medication':
+ this.selectedPatient.medicationUrlID = result;
+ break;
+ case 'Medication-History':
+ this.selectedPatient.medicationHistoryUrlID = result;
+ break;
+ }
+ });
+ }
+
+ savePatient(form: NgForm) {
+ // console.log(form);
+ this.selectedPatient.patientId = this.patientId;
+ this.selectedPatient.status = this.patientdto.status;
+ this.selectedPatient.dateOfAdmission = this.selectdateOfAdmission.toDateString();
+ this.selectedPatient.nextFollowUp = this.selectnextFollowUp.toDateString();
+ this.selectedPatient.labReportUrlID = this.selectedPatient.labReportUrlID
+ ? this.selectedPatient.labReportUrlID.replace('"', '').replace('"', '')
+ : this.guid;
+ this.selectedPatient.medicationUrlID = this.selectedPatient.medicationUrlID
+ ? this.selectedPatient.medicationUrlID.replace('"', '').replace('"', '')
+ : this.guid;
+ this.selectedPatient.medicationHistoryUrlID = this.selectedPatient.medicationHistoryUrlID
+ ? this.selectedPatient.medicationHistoryUrlID.replace('"', '').replace('"', '')
+ : this.guid;
+ console.log(this.selectedPatient);
+
+ if (this.isEditMode) {
+ this.patientService
+ .updatePatientRecord(this.selectedPatient.id, this.selectedPatient)
+ .subscribe(
+ result => {
+ this.toaster.success('Patient updated successfully', 'Success');
+ this.patientDialog = false;
+ console.log(result);
+
+ this.loadPatient(
+ {
+ first: 0,
+ rows: 10,
+ sortField: 'id',
+ sortOrder: 1,
+ globalFilter: null,
+ },
+ this.patientId
+ );
+ },
+ error => {
+ console.log(error);
+ this.closeDialog();
+ }
+ );
+ } else {
+ this.patientService.createPatientRecord(this.selectedPatient).subscribe(
+ () => {
+ this.toaster.success('Patient created successfully', 'Success');
+ this.patientDialog = false;
+ this.loadPatient(
+ {
+ first: 0,
+ rows: 10,
+ sortField: 'id',
+ sortOrder: 1,
+ globalFilter: null,
+ },
+ this.patientId
+ );
+ },
+ error => {
+ console.log(error);
+ this.closeDialog();
+ }
+ );
+ }
+ }
+
+ closeDialog() {
+ this.patientDialog = false;
+ }
+}
diff --git a/angular/src/app/patients/patients-routing.module.ts b/angular/src/app/patients/patients-routing.module.ts
new file mode 100644
index 0000000..415584c
--- /dev/null
+++ b/angular/src/app/patients/patients-routing.module.ts
@@ -0,0 +1,26 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { AllPatientsComponent } from './all-patients/all-patients.component';
+import { PatientRecordComponent } from './patient-record/patient-record.component';
+import { authGuard, permissionGuard } from '@abp/ng.core';
+
+const routes: Routes = [
+ {
+ path: '',
+ children: [
+ {
+ path: 'patient-record/:id',
+ component: PatientRecordComponent,
+ // canActivate: [authGuard, permissionGuard],
+ },
+ { path: 'all-patients', component: AllPatientsComponent },
+ // { path: 'create-new/:id', component: FaqCreateComponent },
+ ],
+ },
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule],
+})
+export class PatientsRoutingModule {}
diff --git a/angular/src/app/patients/patients.module.ts b/angular/src/app/patients/patients.module.ts
new file mode 100644
index 0000000..4161e98
--- /dev/null
+++ b/angular/src/app/patients/patients.module.ts
@@ -0,0 +1,37 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { PatientsRoutingModule } from './patients-routing.module';
+import { AllPatientsComponent } from './all-patients/all-patients.component';
+import { PatientRecordComponent } from './patient-record/patient-record.component';
+import { TableModule } from 'primeng/table';
+import { IconFieldModule } from 'primeng/iconfield';
+import { InputIconModule } from 'primeng/inputicon';
+import { FormsModule } from '@angular/forms';
+import { InputTextModule } from 'primeng/inputtext';
+import { PaginatorModule } from 'primeng/paginator';
+import { DialogModule } from 'primeng/dialog';
+import { DropdownModule } from 'primeng/dropdown';
+import { FileUploadModule } from 'primeng/fileupload';
+import { CalendarModule } from 'primeng/calendar';
+import { SharedModule } from '../shared/shared.module';
+
+@NgModule({
+ declarations: [AllPatientsComponent, PatientRecordComponent],
+ imports: [
+ CommonModule,
+ PatientsRoutingModule,
+ TableModule,
+ InputIconModule,
+ IconFieldModule,
+ FormsModule,
+ InputTextModule,
+ PaginatorModule,
+ DialogModule,
+ DropdownModule,
+ FileUploadModule,
+ CalendarModule,
+ SharedModule
+ ],
+})
+export class PatientsModule {}
diff --git a/angular/src/app/proxy/documents/index.ts b/angular/src/app/proxy/documents/index.ts
new file mode 100644
index 0000000..e9644da
--- /dev/null
+++ b/angular/src/app/proxy/documents/index.ts
@@ -0,0 +1 @@
+export * from './models';
diff --git a/angular/src/app/proxy/documents/models.ts b/angular/src/app/proxy/documents/models.ts
new file mode 100644
index 0000000..cc9c431
--- /dev/null
+++ b/angular/src/app/proxy/documents/models.ts
@@ -0,0 +1,11 @@
+import type { AuditedAggregateRoot } from '../volo/abp/domain/entities/auditing/models';
+
+export interface EntityDocument extends AuditedAggregateRoot {
+ originalFileName?: string;
+ generatedFileName?: string;
+ fileSize?: string;
+ filePath?: string;
+ fileType?: string;
+ tagName?: string;
+ uploadDate?: string;
+}
diff --git a/angular/src/app/proxy/dto/index.ts b/angular/src/app/proxy/dto/index.ts
new file mode 100644
index 0000000..e9644da
--- /dev/null
+++ b/angular/src/app/proxy/dto/index.ts
@@ -0,0 +1 @@
+export * from './models';
diff --git a/angular/src/app/proxy/dto/models.ts b/angular/src/app/proxy/dto/models.ts
new file mode 100644
index 0000000..aaaaf4d
--- /dev/null
+++ b/angular/src/app/proxy/dto/models.ts
@@ -0,0 +1,15 @@
+import type { PagedAndSortedResultRequestDto } from '@abp/ng.core';
+
+export interface DropDownItems {
+ label?: string;
+ value: number;
+}
+
+export interface FileDownloadDto {
+ fileName?: string;
+ fileContent?: string;
+}
+
+export interface PagingSortPatientResultDto extends PagedAndSortedResultRequestDto {
+ search?: string;
+}
diff --git a/angular/src/app/proxy/generate-proxy.json b/angular/src/app/proxy/generate-proxy.json
index a78bac9..45d3f24 100644
--- a/angular/src/app/proxy/generate-proxy.json
+++ b/angular/src/app/proxy/generate-proxy.json
@@ -1086,6 +1086,698 @@
"implementFrom": "HospitalManagementSystem.Doctors.DoctorAppService"
}
}
+ },
+ "HospitalManagementSystem.Patients.PatientAppService": {
+ "controllerName": "Patient",
+ "controllerGroupName": "Patient",
+ "isRemoteService": true,
+ "isIntegrationService": false,
+ "apiVersion": null,
+ "type": "HospitalManagementSystem.Patients.PatientAppService",
+ "interfaces": [],
+ "actions": {
+ "GetPatientRecordListAsyncByInputAndId": {
+ "uniqueName": "GetPatientRecordListAsyncByInputAndId",
+ "name": "GetPatientRecordListAsync",
+ "httpMethod": "GET",
+ "url": "api/app/patient/patient-record-list/{Id}",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "input",
+ "typeAsString": "HospitalManagementSystem.Dto.PagingSortPatientResultDto, HospitalManagementSystem.Domain.Shared",
+ "type": "HospitalManagementSystem.Dto.PagingSortPatientResultDto",
+ "typeSimple": "HospitalManagementSystem.Dto.PagingSortPatientResultDto",
+ "isOptional": false,
+ "defaultValue": null
+ },
+ {
+ "name": "Id",
+ "typeAsString": "System.Guid, System.Private.CoreLib",
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "input",
+ "name": "Search",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "Sorting",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "SkipCount",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "MaxResultCount",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "Id",
+ "name": "Id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": [],
+ "bindingSourceId": "Path",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "Volo.Abp.Application.Dtos.PagedResultDto",
+ "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "GetPatientRecordByIdAsyncById": {
+ "uniqueName": "GetPatientRecordByIdAsyncById",
+ "name": "GetPatientRecordByIdAsync",
+ "httpMethod": "GET",
+ "url": "api/app/patient/{id}/patient-record-by-id",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "id",
+ "typeAsString": "System.Guid, System.Private.CoreLib",
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "id",
+ "name": "id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": [],
+ "bindingSourceId": "Path",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Patients.Dto.PatientRecordDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.PatientRecordDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "GetExportPatientRecordAsync": {
+ "uniqueName": "GetExportPatientRecordAsync",
+ "name": "GetExportPatientRecordAsync",
+ "httpMethod": "GET",
+ "url": "api/app/patient/export-patient-record",
+ "supportedVersions": [],
+ "parametersOnMethod": [],
+ "parameters": [],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Dto.FileDownloadDto",
+ "typeSimple": "HospitalManagementSystem.Dto.FileDownloadDto"
+ },
+ "allowAnonymous": null,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "CreatePatientRecordAsyncByInput": {
+ "uniqueName": "CreatePatientRecordAsyncByInput",
+ "name": "CreatePatientRecordAsync",
+ "httpMethod": "POST",
+ "url": "api/app/patient/patient-record",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "input",
+ "typeAsString": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto, HospitalManagementSystem.Application.Contracts",
+ "type": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "input",
+ "name": "input",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "Body",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Patients.Dto.PatientRecordDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.PatientRecordDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "UpdatePatientRecordAsyncByIdAndInput": {
+ "uniqueName": "UpdatePatientRecordAsyncByIdAndInput",
+ "name": "UpdatePatientRecordAsync",
+ "httpMethod": "PUT",
+ "url": "api/app/patient/{id}/patient-record",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "id",
+ "typeAsString": "System.Guid, System.Private.CoreLib",
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null
+ },
+ {
+ "name": "input",
+ "typeAsString": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto, HospitalManagementSystem.Application.Contracts",
+ "type": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "id",
+ "name": "id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": [],
+ "bindingSourceId": "Path",
+ "descriptorName": ""
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "input",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "Body",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Patients.Dto.PatientRecordDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.PatientRecordDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "DeletePatientRecordAsyncById": {
+ "uniqueName": "DeletePatientRecordAsyncById",
+ "name": "DeletePatientRecordAsync",
+ "httpMethod": "DELETE",
+ "url": "api/app/patient/{id}/patient-record",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "id",
+ "typeAsString": "System.Guid, System.Private.CoreLib",
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "id",
+ "name": "id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": [],
+ "bindingSourceId": "Path",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "System.Void",
+ "typeSimple": "System.Void"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "GetPatientListAsyncByInput": {
+ "uniqueName": "GetPatientListAsyncByInput",
+ "name": "GetPatientListAsync",
+ "httpMethod": "GET",
+ "url": "api/app/patient/patient-list",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "input",
+ "typeAsString": "HospitalManagementSystem.Dto.PagingSortPatientResultDto, HospitalManagementSystem.Domain.Shared",
+ "type": "HospitalManagementSystem.Dto.PagingSortPatientResultDto",
+ "typeSimple": "HospitalManagementSystem.Dto.PagingSortPatientResultDto",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "input",
+ "name": "Search",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "Sorting",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "SkipCount",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "MaxResultCount",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": "input"
+ }
+ ],
+ "returnValue": {
+ "type": "Volo.Abp.Application.Dtos.PagedResultDto",
+ "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "GetPatientByIdAsyncById": {
+ "uniqueName": "GetPatientByIdAsyncById",
+ "name": "GetPatientByIdAsync",
+ "httpMethod": "GET",
+ "url": "api/app/patient/{id}/patient-by-id",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "id",
+ "typeAsString": "System.Guid, System.Private.CoreLib",
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "id",
+ "name": "id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": [],
+ "bindingSourceId": "Path",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Patients.Dto.PatientDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.PatientDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "GetExportPatientDataAsync": {
+ "uniqueName": "GetExportPatientDataAsync",
+ "name": "GetExportPatientDataAsync",
+ "httpMethod": "GET",
+ "url": "api/app/patient/export-patient-data",
+ "supportedVersions": [],
+ "parametersOnMethod": [],
+ "parameters": [],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Dto.FileDownloadDto",
+ "typeSimple": "HospitalManagementSystem.Dto.FileDownloadDto"
+ },
+ "allowAnonymous": null,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "CreatePatientAsyncByInput": {
+ "uniqueName": "CreatePatientAsyncByInput",
+ "name": "CreatePatientAsync",
+ "httpMethod": "POST",
+ "url": "api/app/patient/patient",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "input",
+ "typeAsString": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto, HospitalManagementSystem.Application.Contracts",
+ "type": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "input",
+ "name": "input",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "Body",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Patients.Dto.PatientDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.PatientDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "UpdatePatientAsyncByIdAndInput": {
+ "uniqueName": "UpdatePatientAsyncByIdAndInput",
+ "name": "UpdatePatientAsync",
+ "httpMethod": "PUT",
+ "url": "api/app/patient/{id}/patient",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "id",
+ "typeAsString": "System.Guid, System.Private.CoreLib",
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null
+ },
+ {
+ "name": "input",
+ "typeAsString": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto, HospitalManagementSystem.Application.Contracts",
+ "type": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "id",
+ "name": "id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": [],
+ "bindingSourceId": "Path",
+ "descriptorName": ""
+ },
+ {
+ "nameOnMethod": "input",
+ "name": "input",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "Body",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "HospitalManagementSystem.Patients.Dto.PatientDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.PatientDto"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "DeletePatientAsyncById": {
+ "uniqueName": "DeletePatientAsyncById",
+ "name": "DeletePatientAsync",
+ "httpMethod": "DELETE",
+ "url": "api/app/patient/{id}/patient",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "id",
+ "typeAsString": "System.Guid, System.Private.CoreLib",
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "id",
+ "name": "id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": [],
+ "bindingSourceId": "Path",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "System.Void",
+ "typeSimple": "System.Void"
+ },
+ "allowAnonymous": false,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "GetStatusDropdownAsync": {
+ "uniqueName": "GetStatusDropdownAsync",
+ "name": "GetStatusDropdownAsync",
+ "httpMethod": "GET",
+ "url": "api/app/patient/status-dropdown",
+ "supportedVersions": [],
+ "parametersOnMethod": [],
+ "parameters": [],
+ "returnValue": {
+ "type": "System.Collections.Generic.List",
+ "typeSimple": "[HospitalManagementSystem.Dto.DropDownItems]"
+ },
+ "allowAnonymous": null,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "UploadFileAsyncByTagNameAndFile": {
+ "uniqueName": "UploadFileAsyncByTagNameAndFile",
+ "name": "UploadFileAsync",
+ "httpMethod": "POST",
+ "url": "api/app/patient/upload-file",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "TagName",
+ "typeAsString": "System.String, System.Private.CoreLib",
+ "type": "System.String",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null
+ },
+ {
+ "name": "file",
+ "typeAsString": "Volo.Abp.Content.IRemoteStreamContent, Volo.Abp.Core",
+ "type": "Volo.Abp.Content.IRemoteStreamContent",
+ "typeSimple": "Volo.Abp.Content.IRemoteStreamContent",
+ "isOptional": false,
+ "defaultValue": null
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "TagName",
+ "name": "TagName",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": ""
+ },
+ {
+ "nameOnMethod": "file",
+ "name": "file",
+ "jsonName": null,
+ "type": "Volo.Abp.Content.IRemoteStreamContent",
+ "typeSimple": "Volo.Abp.Content.IRemoteStreamContent",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "FormFile",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "System.Guid",
+ "typeSimple": "string"
+ },
+ "allowAnonymous": null,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ },
+ "SaveFileToDocumentByPatientAndUniqueIdsAndIsNew": {
+ "uniqueName": "SaveFileToDocumentByPatientAndUniqueIdsAndIsNew",
+ "name": "SaveFileToDocument",
+ "httpMethod": "POST",
+ "url": "api/app/patient/save-file-to-document",
+ "supportedVersions": [],
+ "parametersOnMethod": [
+ {
+ "name": "patient",
+ "typeAsString": "HospitalManagementSystem.Patients.Patient, HospitalManagementSystem.Domain",
+ "type": "HospitalManagementSystem.Patients.Patient",
+ "typeSimple": "HospitalManagementSystem.Patients.Patient",
+ "isOptional": false,
+ "defaultValue": null
+ },
+ {
+ "name": "uniqueIds",
+ "typeAsString": "System.Collections.Generic.List`1[[System.Guid, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib",
+ "type": "System.Collections.Generic.List",
+ "typeSimple": "[string]",
+ "isOptional": false,
+ "defaultValue": null
+ },
+ {
+ "name": "isNew",
+ "typeAsString": "System.Boolean, System.Private.CoreLib",
+ "type": "System.Boolean",
+ "typeSimple": "boolean",
+ "isOptional": true,
+ "defaultValue": false
+ }
+ ],
+ "parameters": [
+ {
+ "nameOnMethod": "patient",
+ "name": "patient",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.Patients.Patient",
+ "typeSimple": "HospitalManagementSystem.Patients.Patient",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "Body",
+ "descriptorName": ""
+ },
+ {
+ "nameOnMethod": "uniqueIds",
+ "name": "uniqueIds",
+ "jsonName": null,
+ "type": "System.Collections.Generic.List",
+ "typeSimple": "[string]",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "Body",
+ "descriptorName": ""
+ },
+ {
+ "nameOnMethod": "isNew",
+ "name": "isNew",
+ "jsonName": null,
+ "type": "System.Boolean",
+ "typeSimple": "boolean",
+ "isOptional": false,
+ "defaultValue": null,
+ "constraintTypes": null,
+ "bindingSourceId": "ModelBinding",
+ "descriptorName": ""
+ }
+ ],
+ "returnValue": {
+ "type": "System.Collections.Generic.List",
+ "typeSimple": "[HospitalManagementSystem.Documents.EntityDocument]"
+ },
+ "allowAnonymous": null,
+ "implementFrom": "HospitalManagementSystem.Patients.PatientAppService"
+ }
+ }
}
}
},
@@ -3732,6 +4424,186 @@
}
},
"types": {
+ "HospitalManagementSystem.Documents.EntityDocument": {
+ "baseType": "Volo.Abp.Domain.Entities.Auditing.AuditedAggregateRoot",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "OriginalFileName",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "GeneratedFileName",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "FileSize",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "FilePath",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "FileType",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "TagName",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "UploadDate",
+ "jsonName": null,
+ "type": "System.DateTime",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "HospitalManagementSystem.Dto.DropDownItems": {
+ "baseType": null,
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "Label",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Value",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "HospitalManagementSystem.Dto.FileDownloadDto": {
+ "baseType": null,
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "FileName",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "FileContent",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "HospitalManagementSystem.Dto.PagingSortPatientResultDto": {
+ "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "Search",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
"HospitalManagementSystem.Dtos.CreateDepartmentDto": {
"baseType": null,
"isEnum": false,
@@ -4152,6 +5024,873 @@
}
]
},
+ "HospitalManagementSystem.GlobalEnum.Gender": {
+ "baseType": "System.Enum",
+ "isEnum": true,
+ "enumNames": [
+ "Male",
+ "Female"
+ ],
+ "enumValues": [
+ 1,
+ 2
+ ],
+ "genericArguments": null,
+ "properties": null
+ },
+ "HospitalManagementSystem.GlobalEnum.Status": {
+ "baseType": "System.Enum",
+ "isEnum": true,
+ "enumNames": [
+ "Recovered",
+ "Observation",
+ "InTreatment"
+ ],
+ "enumValues": [
+ 1,
+ 2,
+ 3
+ ],
+ "genericArguments": null,
+ "properties": null
+ },
+ "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientDto": {
+ "baseType": null,
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "Id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Name",
+ "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": "Email",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Age",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Treatment",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DoctorAssigned",
+ "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": "BloodGroup",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "AdmissionDate",
+ "jsonName": null,
+ "type": "System.DateTime",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DischargeDate",
+ "jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Status",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.GlobalEnum.Status",
+ "typeSimple": "HospitalManagementSystem.GlobalEnum.Status",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "ImageID",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "HospitalManagementSystem.Patients.Dto.CreateUpdatePatientRecordDto": {
+ "baseType": null,
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "Id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "PatientId",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DateOfAdmission",
+ "jsonName": null,
+ "type": "System.DateTime",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "LabReportUrlID",
+ "jsonName": null,
+ "type": "System.Guid?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "MedicationUrlID",
+ "jsonName": null,
+ "type": "System.Guid?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "MedicationHistoryUrlID",
+ "jsonName": null,
+ "type": "System.Guid?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "NextFollowUp",
+ "jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Diagnosis",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "TreatmentPlan",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DoctorNotes",
+ "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": "Status",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.GlobalEnum.Status",
+ "typeSimple": "HospitalManagementSystem.GlobalEnum.Status",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "HospitalManagementSystem.Patients.Dto.PatientDto": {
+ "baseType": null,
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "Id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Name",
+ "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": "Email",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Age",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Treatment",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DoctorAssigned",
+ "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": "BloodGroup",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "AdmissionDate",
+ "jsonName": null,
+ "type": "System.DateTime",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DischargeDate",
+ "jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Status",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.GlobalEnum.Status",
+ "typeSimple": "HospitalManagementSystem.GlobalEnum.Status",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Imagepath",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "HospitalManagementSystem.Patients.Dto.PatientRecordDto": {
+ "baseType": null,
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "Id",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "PatientId",
+ "jsonName": null,
+ "type": "System.Guid",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Patients",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.Patients.Dto.PatientDto",
+ "typeSimple": "HospitalManagementSystem.Patients.Dto.PatientDto",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DateOfAdmission",
+ "jsonName": null,
+ "type": "System.DateTime",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Diagnosis",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "TreatmentPlan",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DoctorNotes",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "LabReportUrl",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "MedicationUrl",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "MedicationHistoryUrl",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "NextFollowUp",
+ "jsonName": null,
+ "type": "System.DateTime?",
+ "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": "Status",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.GlobalEnum.Status",
+ "typeSimple": "HospitalManagementSystem.GlobalEnum.Status",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "HospitalManagementSystem.Patients.Patient": {
+ "baseType": "Volo.Abp.Domain.Entities.Auditing.AuditedAggregateRoot",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "Name",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": true,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Gender",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.GlobalEnum.Gender",
+ "typeSimple": "HospitalManagementSystem.GlobalEnum.Gender",
+ "isRequired": true,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Mobile",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": true,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Email",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": true,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Age",
+ "jsonName": null,
+ "type": "System.Int32",
+ "typeSimple": "number",
+ "isRequired": true,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Treatment",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DoctorAssigned",
+ "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": true,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "BloodGroup",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": true,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "AdmissionDate",
+ "jsonName": null,
+ "type": "System.DateTime",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "DischargeDate",
+ "jsonName": null,
+ "type": "System.DateTime?",
+ "typeSimple": "string?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Status",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.GlobalEnum.Status",
+ "typeSimple": "HospitalManagementSystem.GlobalEnum.Status",
+ "isRequired": true,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "Images",
+ "jsonName": null,
+ "type": "HospitalManagementSystem.Documents.EntityDocument",
+ "typeSimple": "HospitalManagementSystem.Documents.EntityDocument",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
"Volo.Abp.Account.ChangePasswordInput": {
"baseType": null,
"isEnum": false,
@@ -6910,6 +8649,121 @@
}
]
},
+ "Volo.Abp.Content.IRemoteStreamContent": {
+ "baseType": null,
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": null,
+ "properties": [
+ {
+ "name": "FileName",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "ContentType",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "ContentLength",
+ "jsonName": null,
+ "type": "System.Int64?",
+ "typeSimple": "number?",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "Volo.Abp.Domain.Entities.AggregateRoot": {
+ "baseType": "Volo.Abp.Domain.Entities.BasicAggregateRoot",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": [
+ "TKey"
+ ],
+ "properties": [
+ {
+ "name": "ExtraProperties",
+ "jsonName": null,
+ "type": "{System.String:System.Object}",
+ "typeSimple": "{string:object}",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ },
+ {
+ "name": "ConcurrencyStamp",
+ "jsonName": null,
+ "type": "System.String",
+ "typeSimple": "string",
+ "isRequired": false,
+ "minLength": null,
+ "maxLength": null,
+ "minimum": null,
+ "maximum": null,
+ "regex": null
+ }
+ ]
+ },
+ "Volo.Abp.Domain.Entities.Auditing.AuditedAggregateRoot": {
+ "baseType": "Volo.Abp.Domain.Entities.Auditing.CreationAuditedAggregateRoot",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": [
+ "TKey"
+ ],
+ "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.Domain.Entities.Auditing.AuditedEntity": {
"baseType": "Volo.Abp.Domain.Entities.Auditing.CreationAuditedEntity",
"isEnum": false,
@@ -6945,6 +8799,41 @@
}
]
},
+ "Volo.Abp.Domain.Entities.Auditing.CreationAuditedAggregateRoot": {
+ "baseType": "Volo.Abp.Domain.Entities.AggregateRoot",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": [
+ "TKey"
+ ],
+ "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.Domain.Entities.Auditing.CreationAuditedEntity": {
"baseType": "Volo.Abp.Domain.Entities.Entity",
"isEnum": false,
@@ -7027,6 +8916,16 @@
}
]
},
+ "Volo.Abp.Domain.Entities.BasicAggregateRoot": {
+ "baseType": "Volo.Abp.Domain.Entities.Entity",
+ "isEnum": false,
+ "enumNames": null,
+ "enumValues": null,
+ "genericArguments": [
+ "TKey"
+ ],
+ "properties": []
+ },
"Volo.Abp.Domain.Entities.Entity": {
"baseType": null,
"isEnum": false,
diff --git a/angular/src/app/proxy/global-enum/gender.enum.ts b/angular/src/app/proxy/global-enum/gender.enum.ts
new file mode 100644
index 0000000..f723b8f
--- /dev/null
+++ b/angular/src/app/proxy/global-enum/gender.enum.ts
@@ -0,0 +1,8 @@
+import { mapEnumToOptions } from '@abp/ng.core';
+
+export enum Gender {
+ Male = 1,
+ Female = 2,
+}
+
+export const genderOptions = mapEnumToOptions(Gender);
diff --git a/angular/src/app/proxy/global-enum/index.ts b/angular/src/app/proxy/global-enum/index.ts
new file mode 100644
index 0000000..9c7d39a
--- /dev/null
+++ b/angular/src/app/proxy/global-enum/index.ts
@@ -0,0 +1,2 @@
+export * from './gender.enum';
+export * from './status.enum';
diff --git a/angular/src/app/proxy/global-enum/status.enum.ts b/angular/src/app/proxy/global-enum/status.enum.ts
new file mode 100644
index 0000000..9f6bdb6
--- /dev/null
+++ b/angular/src/app/proxy/global-enum/status.enum.ts
@@ -0,0 +1,9 @@
+import { mapEnumToOptions } from '@abp/ng.core';
+
+export enum Status {
+ Recovered = 1,
+ Observation = 2,
+ InTreatment = 3,
+}
+
+export const statusOptions = mapEnumToOptions(Status);
diff --git a/angular/src/app/proxy/index.ts b/angular/src/app/proxy/index.ts
index a881a96..ea1a4ef 100644
--- a/angular/src/app/proxy/index.ts
+++ b/angular/src/app/proxy/index.ts
@@ -1,6 +1,10 @@
import * as Appointments from './appointments';
import * as Departments from './departments';
import * as Doctors from './doctors';
+import * as Documents from './documents';
+import * as Dto from './dto';
import * as Dtos from './dtos';
+import * as GlobalEnum from './global-enum';
+import * as Patients from './patients';
import * as Volo from './volo';
-export { Appointments, Departments, Doctors, Dtos, Volo };
+export { Appointments, Departments, Doctors, Documents, Dto, Dtos, GlobalEnum, Patients, Volo };
diff --git a/angular/src/app/proxy/patients/dto/index.ts b/angular/src/app/proxy/patients/dto/index.ts
new file mode 100644
index 0000000..e9644da
--- /dev/null
+++ b/angular/src/app/proxy/patients/dto/index.ts
@@ -0,0 +1 @@
+export * from './models';
diff --git a/angular/src/app/proxy/patients/dto/models.ts b/angular/src/app/proxy/patients/dto/models.ts
new file mode 100644
index 0000000..1ce7102
--- /dev/null
+++ b/angular/src/app/proxy/patients/dto/models.ts
@@ -0,0 +1,67 @@
+import type { Gender } from '../../global-enum/gender.enum';
+import type { Status } from '../../global-enum/status.enum';
+
+export interface CreateUpdatePatientDto {
+ id?: string;
+ name?: string;
+ gender: Gender;
+ mobile?: string;
+ email?: string;
+ age: number;
+ treatment?: string;
+ doctorAssigned?: string;
+ address?: string;
+ bloodGroup?: string;
+ admissionDate?: string;
+ dischargeDate?: string;
+ status: Status;
+ imageID?: string;
+}
+
+export interface CreateUpdatePatientRecordDto {
+ id?: string;
+ patientId?: string;
+ dateOfAdmission?: string;
+ labReportUrlID?: string;
+ medicationUrlID?: string;
+ medicationHistoryUrlID?: string;
+ nextFollowUp?: string;
+ diagnosis?: string;
+ treatmentPlan?: string;
+ doctorNotes?: string;
+ insuranceProvider?: string;
+ status: Status;
+}
+
+export interface PatientDto {
+ id?: string;
+ name?: string;
+ gender: Gender;
+ mobile?: string;
+ email?: string;
+ age: number;
+ treatment?: string;
+ doctorAssigned?: string;
+ address?: string;
+ bloodGroup?: string;
+ admissionDate?: string;
+ dischargeDate?: string;
+ status: Status;
+ imagepath?: string;
+}
+
+export interface PatientRecordDto {
+ id?: string;
+ patientId?: string;
+ patients: PatientDto;
+ dateOfAdmission?: string;
+ diagnosis?: string;
+ treatmentPlan?: string;
+ doctorNotes?: string;
+ labReportUrl?: string;
+ medicationUrl?: string;
+ medicationHistoryUrl?: string;
+ nextFollowUp?: string;
+ insuranceProvider?: string;
+ status: Status;
+}
diff --git a/angular/src/app/proxy/patients/index.ts b/angular/src/app/proxy/patients/index.ts
new file mode 100644
index 0000000..db5afa5
--- /dev/null
+++ b/angular/src/app/proxy/patients/index.ts
@@ -0,0 +1,4 @@
+import * as Dto from './dto';
+export * from './models';
+export * from './patient.service';
+export { Dto };
diff --git a/angular/src/app/proxy/patients/models.ts b/angular/src/app/proxy/patients/models.ts
new file mode 100644
index 0000000..608e659
--- /dev/null
+++ b/angular/src/app/proxy/patients/models.ts
@@ -0,0 +1,20 @@
+import type { AuditedAggregateRoot } from '../volo/abp/domain/entities/auditing/models';
+import type { Gender } from '../global-enum/gender.enum';
+import type { Status } from '../global-enum/status.enum';
+import type { EntityDocument } from '../documents/models';
+
+export interface Patient extends AuditedAggregateRoot {
+ name: string;
+ gender: Gender;
+ mobile: string;
+ email: string;
+ age: number;
+ treatment?: string;
+ doctorAssigned?: string;
+ address: string;
+ bloodGroup: string;
+ admissionDate?: string;
+ dischargeDate?: string;
+ status: Status;
+ images: EntityDocument;
+}
diff --git a/angular/src/app/proxy/patients/patient.service.ts b/angular/src/app/proxy/patients/patient.service.ts
new file mode 100644
index 0000000..76b2462
--- /dev/null
+++ b/angular/src/app/proxy/patients/patient.service.ts
@@ -0,0 +1,147 @@
+import type { CreateUpdatePatientDto, CreateUpdatePatientRecordDto, PatientDto, PatientRecordDto } from './dto/models';
+import type { Patient } from './models';
+import { RestService, Rest } from '@abp/ng.core';
+import type { PagedResultDto } from '@abp/ng.core';
+import { Injectable } from '@angular/core';
+import type { EntityDocument } from '../documents/models';
+import type { DropDownItems, FileDownloadDto, PagingSortPatientResultDto } from '../dto/models';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class PatientService {
+ apiName = 'Default';
+
+
+ createPatient = (input: CreateUpdatePatientDto, config?: Partial) =>
+ this.restService.request({
+ method: 'POST',
+ url: '/api/app/patient/patient',
+ body: input,
+ },
+ { apiName: this.apiName,...config });
+
+
+ createPatientRecord = (input: CreateUpdatePatientRecordDto, config?: Partial) =>
+ this.restService.request({
+ method: 'POST',
+ url: '/api/app/patient/patient-record',
+ body: input,
+ },
+ { apiName: this.apiName,...config });
+
+
+ deletePatient = (id: string, config?: Partial) =>
+ this.restService.request({
+ method: 'DELETE',
+ url: `/api/app/patient/${id}/patient`,
+ },
+ { apiName: this.apiName,...config });
+
+
+ deletePatientRecord = (id: string, config?: Partial) =>
+ this.restService.request({
+ method: 'DELETE',
+ url: `/api/app/patient/${id}/patient-record`,
+ },
+ { apiName: this.apiName,...config });
+
+
+ getExportPatientData = (config?: Partial) =>
+ this.restService.request({
+ method: 'GET',
+ url: '/api/app/patient/export-patient-data',
+ },
+ { apiName: this.apiName,...config });
+
+
+ getExportPatientRecord = (config?: Partial) =>
+ this.restService.request({
+ method: 'GET',
+ url: '/api/app/patient/export-patient-record',
+ },
+ { apiName: this.apiName,...config });
+
+
+ getPatientById = (id: string, config?: Partial) =>
+ this.restService.request({
+ method: 'GET',
+ url: `/api/app/patient/${id}/patient-by-id`,
+ },
+ { apiName: this.apiName,...config });
+
+
+ getPatientList = (input: PagingSortPatientResultDto, config?: Partial) =>
+ this.restService.request>({
+ method: 'GET',
+ url: '/api/app/patient/patient-list',
+ params: { search: input.search, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
+ },
+ { apiName: this.apiName,...config });
+
+
+ getPatientRecordById = (id: string, config?: Partial) =>
+ this.restService.request({
+ method: 'GET',
+ url: `/api/app/patient/${id}/patient-record-by-id`,
+ },
+ { apiName: this.apiName,...config });
+
+
+ getPatientRecordList = (input: PagingSortPatientResultDto, Id: string, config?: Partial) =>
+ this.restService.request>({
+ method: 'GET',
+ url: `/api/app/patient/patient-record-list/${Id}`,
+ params: { search: input.search, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
+ },
+ { apiName: this.apiName,...config });
+
+
+ getStatusDropdown = (config?: Partial) =>
+ this.restService.request({
+ method: 'GET',
+ url: '/api/app/patient/status-dropdown',
+ },
+ { apiName: this.apiName,...config });
+
+
+ saveFileToDocumentByPatientAndUniqueIdsAndIsNew = (patient: Patient, uniqueIds: string[], isNew?: boolean, config?: Partial) =>
+ this.restService.request({
+ method: 'POST',
+ url: '/api/app/patient/save-file-to-document',
+ params: { isNew },
+ body: uniqueIds,
+ },
+ { apiName: this.apiName,...config });
+
+
+ updatePatient = (id: string, input: CreateUpdatePatientDto, config?: Partial) =>
+ this.restService.request({
+ method: 'PUT',
+ url: `/api/app/patient/${id}/patient`,
+ body: input,
+ },
+ { apiName: this.apiName,...config });
+
+
+ updatePatientRecord = (id: string, input: CreateUpdatePatientRecordDto, config?: Partial) =>
+ this.restService.request({
+ method: 'PUT',
+ url: `/api/app/patient/${id}/patient-record`,
+ body: input,
+ },
+ { apiName: this.apiName,...config });
+
+
+ uploadFile = (TagName: string, file: FormData, config?: Partial) =>
+ this.restService.request({
+ method: 'POST',
+ responseType: 'text',
+ url: '/api/app/patient/upload-file',
+ params: { tagName: TagName },
+ body: file,
+ },
+ { apiName: this.apiName,...config });
+
+ constructor(private restService: RestService) {}
+}
diff --git a/angular/src/app/proxy/volo/abp/domain/entities/auditing/models.ts b/angular/src/app/proxy/volo/abp/domain/entities/auditing/models.ts
index 1a69f31..546c4aa 100644
--- a/angular/src/app/proxy/volo/abp/domain/entities/auditing/models.ts
+++ b/angular/src/app/proxy/volo/abp/domain/entities/auditing/models.ts
@@ -1,4 +1,4 @@
-import type { Entity } from '../models';
+import type { AggregateRoot, Entity } from '../models';
export interface AuditedEntity extends CreationAuditedEntity {
lastModificationTime?: string;
@@ -15,3 +15,13 @@ export interface FullAuditedEntity extends AuditedEntity {
deleterId?: string;
deletionTime?: string;
}
+
+export interface AuditedAggregateRoot extends CreationAuditedAggregateRoot {
+ lastModificationTime?: string;
+ lastModifierId?: string;
+}
+
+export interface CreationAuditedAggregateRoot extends AggregateRoot {
+ creationTime?: string;
+ creatorId?: string;
+}
diff --git a/angular/src/app/proxy/volo/abp/domain/entities/models.ts b/angular/src/app/proxy/volo/abp/domain/entities/models.ts
index bd62616..7b23f8b 100644
--- a/angular/src/app/proxy/volo/abp/domain/entities/models.ts
+++ b/angular/src/app/proxy/volo/abp/domain/entities/models.ts
@@ -1,3 +1,11 @@
export interface Entity {
}
+
+export interface AggregateRoot extends BasicAggregateRoot {
+ extraProperties: Record;
+ concurrencyStamp?: string;
+}
+
+export interface BasicAggregateRoot extends Entity {
+}
diff --git a/angular/src/app/route.provider.ts b/angular/src/app/route.provider.ts
index 2728508..7a54ae8 100644
--- a/angular/src/app/route.provider.ts
+++ b/angular/src/app/route.provider.ts
@@ -49,7 +49,31 @@ function configureRoutes(routesService: RoutesService) {
parentName: 'Appointments',
iconClass: 'fas fa-clock',
order: 105,
- }
+ },
+ {
+ path: '/patients',
+ name: 'Patients',
+ iconClass: 'fas fa-notes-medical',
+ order: 201,
+ layout: eLayoutType.application,
+ requiredPolicy:'HospitalManagementSystem.Patient'
+ },
+ {
+ path: '/patients/all-patients',
+ name: 'All Patients',
+ parentName: 'Patients',
+ iconClass: 'fas fa-clock',
+ order: 202,
+ requiredPolicy:'HospitalManagementSystem.Patient'
+ },
+ // {
+ // path: '/patients/patient-record',
+ // name: 'Patient Record',
+ // parentName: 'Patients',
+ // iconClass: 'fas fa-clock',
+ // order: 203,
+ // requiredPolicy:'HospitalManagementSystem.Patient'
+ // },
]);
};
}
diff --git a/angular/src/assets/default-profile.png b/angular/src/assets/default-profile.png
new file mode 100644
index 0000000..98f065f
Binary files /dev/null and b/angular/src/assets/default-profile.png differ
diff --git a/aspnet-core/HospitalManagementSystem.sln b/aspnet-core/HospitalManagementSystem.sln
index 272cfa3..9266697 100644
--- a/aspnet-core/HospitalManagementSystem.sln
+++ b/aspnet-core/HospitalManagementSystem.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.29020.237
+# Visual Studio Version 17
+VisualStudioVersion = 17.9.34902.65
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HospitalManagementSystem.Domain", "src\HospitalManagementSystem.Domain\HospitalManagementSystem.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
EndProject
@@ -35,16 +35,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HospitalManagementSystem.Db
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HospitalManagementSystem.HttpApi.Host", "src\HospitalManagementSystem.HttpApi.Host\HospitalManagementSystem.HttpApi.Host.csproj", "{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalManagementSystem.Blazor.Client", "src\HospitalManagementSystem.Blazor.Client\HospitalManagementSystem.Blazor.Client.csproj", "{188A64AD-A1A7-4F95-85D1-C935594611B7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalManagementSystem.Blazor.WebApp", "src\HospitalManagementSystem.Blazor.WebApp\HospitalManagementSystem.Blazor.WebApp.csproj", "{14882ABF-1EEF-430C-8E72-812B3EE810C4}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalManagementSystem.Blazor.WebApp.Client", "src\HospitalManagementSystem.Blazor.WebApp.Client\HospitalManagementSystem.Blazor.WebApp.Client.csproj", "{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalManagementSystem.Blazor.WebApp.Tiered", "src\HospitalManagementSystem.Blazor.WebApp.Tiered\HospitalManagementSystem.Blazor.WebApp.Tiered.csproj", "{8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalManagementSystem.Blazor.WebApp.Tiered.Client", "src\HospitalManagementSystem.Blazor.WebApp.Tiered.Client\HospitalManagementSystem.Blazor.WebApp.Tiered.Client.csproj", "{834C6A10-7562-427C-8771-B0588C35873D}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -107,26 +97,6 @@ Global
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.Build.0 = Release|Any CPU
- {188A64AD-A1A7-4F95-85D1-C935594611B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {188A64AD-A1A7-4F95-85D1-C935594611B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {188A64AD-A1A7-4F95-85D1-C935594611B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {188A64AD-A1A7-4F95-85D1-C935594611B7}.Release|Any CPU.Build.0 = Release|Any CPU
- {14882ABF-1EEF-430C-8E72-812B3EE810C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {14882ABF-1EEF-430C-8E72-812B3EE810C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {14882ABF-1EEF-430C-8E72-812B3EE810C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {14882ABF-1EEF-430C-8E72-812B3EE810C4}.Release|Any CPU.Build.0 = Release|Any CPU
- {648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Release|Any CPU.Build.0 = Release|Any CPU
- {8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}.Release|Any CPU.Build.0 = Release|Any CPU
- {834C6A10-7562-427C-8771-B0588C35873D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {834C6A10-7562-427C-8771-B0588C35873D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {834C6A10-7562-427C-8771-B0588C35873D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {834C6A10-7562-427C-8771-B0588C35873D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -146,11 +116,6 @@ Global
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
- {188A64AD-A1A7-4F95-85D1-C935594611B7} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
- {14882ABF-1EEF-430C-8E72-812B3EE810C4} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
- {648460F4-3ECC-4751-9D87-EE25D0B8B2BF} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
- {8A3E5E20-F162-4321-8AD5-23DD7B2B0E74} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
- {834C6A10-7562-427C-8771-B0588C35873D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/HospitalManagementSystem.Application.Contracts.csproj b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/HospitalManagementSystem.Application.Contracts.csproj
index 270675b..421e6d0 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/HospitalManagementSystem.Application.Contracts.csproj
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/HospitalManagementSystem.Application.Contracts.csproj
@@ -13,6 +13,7 @@
+
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/CreateUpdatePatientDto.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/CreateUpdatePatientDto.cs
new file mode 100644
index 0000000..e2eb693
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/CreateUpdatePatientDto.cs
@@ -0,0 +1,28 @@
+using HospitalManagementSystem.GlobalEnum;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalManagementSystem.Patients.Dto
+{
+ public class CreateUpdatePatientDto
+ {
+ public Guid Id { get; set; }
+ public string Name { get; set; }
+ public Gender Gender { get; set; }
+ public string Mobile { get; set; }
+ public string Email { get; set; }
+ public int Age { get; set; }
+ public string Treatment { get; set; }
+ public string DoctorAssigned { get; set; }
+ public string Address { get; set; }
+ public string BloodGroup { get; set; }
+ public DateTime AdmissionDate { get; set; }
+ public DateTime? DischargeDate { get; set; }
+ public Status Status { get; set; }
+ public Guid ImageID { get; set; }
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/CreateUpdatePatientRecordDto.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/CreateUpdatePatientRecordDto.cs
new file mode 100644
index 0000000..6820645
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/CreateUpdatePatientRecordDto.cs
@@ -0,0 +1,40 @@
+using HospitalManagementSystem.GlobalEnum;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalManagementSystem.Patients.Dto
+{
+ public class CreateUpdatePatientRecordDto
+ {
+ public Guid Id { get; set; }
+
+ public Guid PatientId { get; set; }
+
+ public DateTime DateOfAdmission { get; set; }
+
+ public Guid? LabReportUrlID { get; set; }
+
+ public Guid? MedicationUrlID { get; set; }
+
+ public Guid? MedicationHistoryUrlID { get; set; }
+
+ public DateTime? NextFollowUp { get; set; }
+
+ public string Diagnosis { get; set; }
+
+ public string TreatmentPlan { get; set; }
+
+ public string DoctorNotes { get; set; }
+
+ public string InsuranceProvider { get; set; }
+
+ public Status Status { get; set; }
+ }
+
+
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/PatientDto.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/PatientDto.cs
new file mode 100644
index 0000000..ec56607
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/PatientDto.cs
@@ -0,0 +1,27 @@
+using HospitalManagementSystem.GlobalEnum;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalManagementSystem.Patients.Dto
+{
+ public class PatientDto
+ {
+ public Guid Id { get; set; }
+ public string Name { get; set; }
+ public Gender Gender { get; set; }
+ public string Mobile { get; set; }
+ public string Email { get; set; }
+ public int Age { get; set; }
+ public string Treatment { get; set; }
+ public string DoctorAssigned { get; set; }
+ public string Address { get; set; }
+ public string BloodGroup { get; set; }
+ public DateTime AdmissionDate { get; set; }
+ public DateTime? DischargeDate { get; set; }
+ public Status Status { get; set; }
+ public string? Imagepath { get; set; }
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/PatientRecordDto.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/PatientRecordDto.cs
new file mode 100644
index 0000000..f1c5c57
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Patients/Dto/PatientRecordDto.cs
@@ -0,0 +1,42 @@
+using HospitalManagementSystem.GlobalEnum;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using static HospitalManagementSystem.Permissions.HospitalManagementSystemPermissions;
+using HospitalManagementSystem.Patients;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace HospitalManagementSystem.Patients.Dto
+{
+ public class PatientRecordDto
+ {
+ public Guid Id { get; set; }
+
+ public Guid PatientId { get; set; }
+
+ public PatientDto Patients { get; set; }
+
+ public DateTime DateOfAdmission { get; set; }
+
+ public string Diagnosis { get; set; }
+
+ public string TreatmentPlan { get; set; }
+
+ public string DoctorNotes { get; set; }
+
+ public string LabReportUrl { get; set; }
+
+ public string MedicationUrl { get; set; }
+
+ public string MedicationHistoryUrl { get; set; }
+
+ public DateTime? NextFollowUp { get; set; }
+
+ public string InsuranceProvider { get; set; }
+
+ public Status Status { get; set; }
+ }
+
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissionDefinitionProvider.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissionDefinitionProvider.cs
index 911d1e7..e8d17f2 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissionDefinitionProvider.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissionDefinitionProvider.cs
@@ -8,7 +8,12 @@ public class HospitalManagementSystemPermissionDefinitionProvider : PermissionDe
{
public override void Define(IPermissionDefinitionContext context)
{
- var myGroup = context.AddGroup(HospitalManagementSystemPermissions.GroupName);
+ var HostipalManagementGroup = context.AddGroup(HospitalManagementSystemPermissions.GroupName);
+
+ var PatientPermission = HostipalManagementGroup.AddPermission(HospitalManagementSystemPermissions.Patient.Default);
+ PatientPermission.AddChild(HospitalManagementSystemPermissions.Patient.Create);
+ PatientPermission.AddChild(HospitalManagementSystemPermissions.Patient.Edit);
+ PatientPermission.AddChild(HospitalManagementSystemPermissions.Patient.Delete);
//Define your own permissions here. Example:
//myGroup.AddPermission(HospitalManagementSystemPermissions.MyPermission1, L("Permission:MyPermission1"));
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissions.cs b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissions.cs
index df4a1f6..ce83cf0 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissions.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application.Contracts/Permissions/HospitalManagementSystemPermissions.cs
@@ -6,4 +6,11 @@ public static class HospitalManagementSystemPermissions
//Add your own permission names. Example:
//public const string MyPermission1 = GroupName + ".MyPermission1";
+ public static class Patient
+ {
+ public const string Default = GroupName + ".Patient";
+ public const string Create = Default + ".Create";
+ public const string Edit = Default + ".Edit";
+ public const string Delete = Default + ".Delete";
+ }
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/HospitalManagementSystem.Application.csproj b/aspnet-core/src/HospitalManagementSystem.Application/HospitalManagementSystem.Application.csproj
index 3cf9671..97d0e51 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application/HospitalManagementSystem.Application.csproj
+++ b/aspnet-core/src/HospitalManagementSystem.Application/HospitalManagementSystem.Application.csproj
@@ -1,4 +1,4 @@
-
+
@@ -11,9 +11,13 @@
+
+
+
+
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/PatientAutoMapperProfile.cs b/aspnet-core/src/HospitalManagementSystem.Application/PatientAutoMapperProfile.cs
new file mode 100644
index 0000000..b10b5c0
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Application/PatientAutoMapperProfile.cs
@@ -0,0 +1,31 @@
+using AutoMapper;
+using HospitalManagementSystem.Patients;
+using HospitalManagementSystem.Patients.Dto;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalManagementSystem
+{
+ public class PatientAutoMapperProfile : Profile
+ {
+ public PatientAutoMapperProfile()
+ {
+ // Entity to DTO mappings
+ CreateMap();
+ CreateMap();
+
+ // DTO to Entity mappings
+ CreateMap();
+
+ // Entity to DTO mappings
+ CreateMap();
+ CreateMap();
+
+ // DTO to Entity mappings
+ CreateMap();
+ }
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs b/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs
new file mode 100644
index 0000000..cd53ffa
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs
@@ -0,0 +1,663 @@
+using ClosedXML.Excel;
+using HospitalManagementSystem.Documents;
+using HospitalManagementSystem.Dto;
+using HospitalManagementSystem.GlobalEnum;
+using HospitalManagementSystem.Patients.Dto;
+using HospitalManagementSystem.Permissions;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Linq.Dynamic.Core;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Content;
+using Volo.Abp.Domain.Repositories;
+using static HospitalManagementSystem.Permissions.HospitalManagementSystemPermissions;
+
+
+namespace HospitalManagementSystem.Patients
+{
+ public class PatientAppService : ApplicationService
+ {
+ private IRepository _patientrecordRepository;
+ private IRepository _patientRepository;
+ private IRepository _entityDocumentRepository;
+ private IRepository _patientDocumentRepository;
+ private readonly IWebHostEnvironment _env;
+ List uniqueid = new List();
+
+ public PatientAppService(IRepository patientrecordRepository, IRepository patientRepository, IWebHostEnvironment env, IRepository entityDocumentRepository, IRepository patientDocumentRepository)
+ {
+ _patientrecordRepository = patientrecordRepository;
+ _patientRepository = patientRepository;
+ _env = env;
+ _entityDocumentRepository = entityDocumentRepository;
+ _patientDocumentRepository = patientDocumentRepository;
+ }
+
+ #region PatientRecord
+
+ #region Get Patient List with Paging and Searching
+ [Authorize(HospitalManagementSystemPermissions.Patient.Default)]
+ public async Task> GetPatientRecordListAsync(PagingSortPatientResultDto input, Guid Id)
+ {
+ var queryable = await _patientrecordRepository.GetQueryableAsync();
+
+ var filteredQuery = queryable
+ .Include(x => x.Patients)
+ .Include(x => x.LabReportUrl)
+ .Include(x => x.MedicationUrl)
+ .Include(x => x.MedicationHistoryUrl)
+ .WhereIf(!string.IsNullOrEmpty(input.Search), x => x.Patients.Name.ToLower().Contains(input.Search.ToLower()))
+ .Where(x => x.Patients.Id == Id);
+
+ var totalCount = await filteredQuery.CountAsync();
+
+ filteredQuery = !string.IsNullOrEmpty(input.Sorting)
+ ? filteredQuery.OrderBy(input.Sorting)
+ : filteredQuery.OrderBy(x => x.Id);
+
+ var pagedQuery = await filteredQuery
+ .Skip(input.SkipCount)
+ .Take(input.MaxResultCount)
+ .ToListAsync();
+ var patientrecorddto = ObjectMapper.Map, List>(pagedQuery);
+ foreach (var pr in patientrecorddto)
+ {
+ pr.LabReportUrl = filteredQuery.Where(x => x.Id == pr.Id).Select(x => x.LabReportUrl.FilePath).FirstOrDefault();
+ pr.MedicationUrl = filteredQuery.Where(x => x.Id == pr.Id).Select(x => x.MedicationUrl.FilePath).FirstOrDefault();
+ pr.MedicationHistoryUrl = filteredQuery.Where(x => x.Id == pr.Id).Select(x => x.MedicationHistoryUrl.FilePath).FirstOrDefault();
+ }
+ return new PagedResultDto(
+ totalCount,
+ patientrecorddto
+ );
+
+ }
+ #endregion
+
+ #region Get Single Patient by Id
+ [Authorize(HospitalManagementSystemPermissions.Patient.Default)]
+ public async Task GetPatientRecordByIdAsync(Guid id)
+ {
+ var patient = await _patientrecordRepository.GetQueryableAsync().Result
+ .Include(x => x.LabReportUrl)
+ .Include(x => x.MedicationUrl)
+ .Include(x => x.MedicationHistoryUrl)
+ .Where(x => x.Id == id).FirstOrDefaultAsync();
+ var patientdto = ObjectMapper.Map(patient);
+
+ patientdto.LabReportUrl = patient.LabReportUrl != null ? patient.LabReportUrl.FilePath : null;
+ patientdto.MedicationUrl = patient.MedicationUrl != null ? patient.MedicationUrl.FilePath : null;
+ patientdto.MedicationHistoryUrl = patient.MedicationHistoryUrl != null ? patient.MedicationHistoryUrl.FilePath : null;
+ return patientdto;
+ }
+ #endregion
+
+ #region Export Patient Data to Excel
+ public async Task GetExportPatientRecordAsync()
+ {
+ var patientrecord = await _patientrecordRepository.GetQueryableAsync().Result.Include(x => x.Patients).ToListAsync();
+
+ var folderPath = Path.Combine(_env.WebRootPath, "temp");
+ if (!Directory.Exists(folderPath))
+ {
+ Directory.CreateDirectory(folderPath); // Ensure the folder exists
+ }
+
+ var filename = "Patients_" + 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("Patients");
+
+ // Add headers
+ worksheet.Cell(1, 1).Value = "Full Name";
+ worksheet.Cell(1, 2).Value = "Gender";
+ worksheet.Cell(1, 3).Value = "Date of Admission";
+ worksheet.Cell(1, 4).Value = "Diagnosis";
+ worksheet.Cell(1, 5).Value = "Next Follow-Up";
+ worksheet.Cell(1, 6).Value = "InsuranceProvider";
+ worksheet.Cell(1, 7).Value = "InsuranceProvider";
+ worksheet.Cell(1, 8).Value = "InsuranceProvider";
+ worksheet.Cell(1, 9).Value = "Status";
+
+ for (int i = 0; i < patientrecord.Count; i++)
+ {
+ worksheet.Cell(i + 2, 1).Value = patientrecord[i].Patients.Name;
+ worksheet.Cell(i + 2, 2).Value = patientrecord[i].Patients.Gender.ToString();
+ worksheet.Cell(i + 2, 3).Value = patientrecord[i].DateOfAdmission.ToShortDateString();
+ worksheet.Cell(i + 2, 4).Value = patientrecord[i].Diagnosis;
+ worksheet.Cell(i + 2, 5).Value = patientrecord[i].NextFollowUp?.ToShortDateString();
+ worksheet.Cell(i + 2, 6).Value = patientrecord[i].InsuranceProvider;
+ worksheet.Cell(i + 2, 7).Value = patientrecord[i].InsuranceProvider;
+ worksheet.Cell(i + 2, 8).Value = patientrecord[i].InsuranceProvider;
+ worksheet.Cell(i + 2, 9).Value = patientrecord[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
+
+ #region Create Patient
+ [Authorize(HospitalManagementSystemPermissions.Patient.Create)]
+ public async Task CreatePatientRecordAsync(CreateUpdatePatientRecordDto input)
+ {
+ var patientEntity = await _patientRepository.GetAsync(input.PatientId); // Get Patient from DB
+ var patientRecord = ObjectMapper.Map(input);
+ patientRecord.Patients = patientEntity;
+ List entitydocument = new List();
+
+ if (input.LabReportUrlID != Guid.Empty)
+ uniqueid.Add(input.LabReportUrlID.Value);
+ if (input.MedicationUrlID != Guid.Empty)
+ uniqueid.Add(input.MedicationUrlID.Value);
+ if (input.MedicationHistoryUrlID != Guid.Empty)
+ uniqueid.Add(input.MedicationHistoryUrlID.Value);
+ if (uniqueid.Count > 0)
+ {
+ entitydocument = await SaveFileToDocument(patientEntity, uniqueid);
+ foreach (var entity in entitydocument)
+ {
+ switch (entity.TagName)
+ {
+ case "Lab-Report":
+ patientRecord.LabReportUrl = entity;
+ break;
+ case "Medication":
+ patientRecord.MedicationUrl = entity;
+ break;
+ case "Medication-History":
+ patientRecord.MedicationHistoryUrl = entity;
+ break;
+ }
+ }
+ }
+ patientRecord = await _patientrecordRepository.InsertAsync(patientRecord);
+
+ return ObjectMapper.Map(patientRecord);
+ }
+ #endregion
+
+ #region Update Patient
+ [Authorize(HospitalManagementSystemPermissions.Patient.Edit)]
+ public async Task UpdatePatientRecordAsync(Guid id, CreateUpdatePatientRecordDto input)
+ {
+ try
+ {
+ var patientRecord = await _patientrecordRepository.GetQueryableAsync().Result.Include(x => x.Patients).Where(x => x.Id == id).FirstOrDefaultAsync();
+ List entitydocument = new List();
+ if (patientRecord.Patients.Id != input.PatientId) // If PatientId is updated, fetch new Patient
+ {
+ var newPatient = await _patientRepository.GetAsync(input.PatientId);
+ patientRecord.Patients = newPatient;
+ }
+ ObjectMapper.Map(input, patientRecord);
+ if (input.LabReportUrlID != Guid.Empty)
+ uniqueid.Add(input.LabReportUrlID.Value);
+ if (input.MedicationUrlID != Guid.Empty)
+ uniqueid.Add(input.MedicationUrlID.Value);
+ if (input.MedicationHistoryUrlID != Guid.Empty)
+ uniqueid.Add(input.MedicationHistoryUrlID.Value);
+ if (uniqueid.Count > 0)
+ {
+ entitydocument = await SaveFileToDocument(patientRecord.Patients, uniqueid);
+ foreach (var entity in entitydocument)
+ {
+ switch (entity.TagName)
+ {
+ case "Lab-Report":
+ patientRecord.LabReportUrl = entity;
+ break;
+ case "Medication":
+ patientRecord.MedicationUrl = entity;
+ break;
+ case "Medication-History":
+ patientRecord.MedicationHistoryUrl = entity;
+ break;
+ }
+ }
+ }
+ patientRecord = await _patientrecordRepository.UpdateAsync(patientRecord);
+
+ return ObjectMapper.Map(patientRecord);
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
+
+ }
+ #endregion
+
+ #region Delete Patient
+ [Authorize(HospitalManagementSystemPermissions.Patient.Delete)]
+ public async Task DeletePatientRecordAsync(Guid id)
+ {
+ await _patientrecordRepository.DeleteAsync(id);
+ }
+ #endregion
+ #endregion
+
+ #region Patient
+
+ #region Get Patient List with Paging and Searching
+ [Authorize(HospitalManagementSystemPermissions.Patient.Default)]
+ public async Task> GetPatientListAsync(PagingSortPatientResultDto input)
+ {
+ List query;
+
+ if (!string.IsNullOrEmpty(input.Search))
+ {
+ query = _patientRepository.GetQueryableAsync().Result
+ .Where(x => x.Name.ToLower().Contains(input.Search.ToLower()))
+ .OrderBy(input.Sorting ?? (nameof(Patient.Id) + " asc"))
+ .Skip(input.SkipCount)
+ .Take(input.MaxResultCount)
+ .ToList();
+ }
+ else
+ {
+ query = await _patientRepository.GetPagedListAsync(
+ input.SkipCount,
+ input.MaxResultCount,
+ input.Sorting ?? nameof(Patient.Name)
+ );
+ }
+
+ var totalCount = await _patientRepository.CountAsync();
+ return new PagedResultDto(
+ totalCount,
+ ObjectMapper.Map, List>(query)
+ );
+ }
+ #endregion
+
+ #region Get Single Patient by Id
+ [Authorize(HospitalManagementSystemPermissions.Patient.Default)]
+ public async Task GetPatientByIdAsync(Guid id)
+ {
+ var patient = await _patientRepository.GetQueryableAsync().Result.Include(x => x.Images).Where(x => x.Id == id).FirstOrDefaultAsync();
+ var patientdto = ObjectMapper.Map(patient);
+ patientdto.Imagepath = patient.Images != null ? patient.Images.FilePath : null;
+ return patientdto;
+ }
+ #endregion
+
+ #region Export Patient Data to Excel
+ public async Task GetExportPatientDataAsync()
+ {
+ var patients = await _patientRepository.GetListAsync();
+
+ var folderPath = Path.Combine(_env.WebRootPath, "temp");
+ if (!Directory.Exists(folderPath))
+ {
+ Directory.CreateDirectory(folderPath);
+ }
+
+ var filename = "Patients_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".xlsx";
+ var filePath = Path.Combine(folderPath, filename);
+
+ using (var workbook = new XLWorkbook())
+ {
+ var worksheet = workbook.Worksheets.Add("Patients");
+
+ // Add headers
+ worksheet.Cell(1, 1).Value = "Name";
+ worksheet.Cell(1, 2).Value = "Gender";
+ worksheet.Cell(1, 3).Value = "Age";
+ worksheet.Cell(1, 4).Value = "BloodGroup";
+ worksheet.Cell(1, 5).Value = "Treatment";
+ worksheet.Cell(1, 6).Value = "Doctor Assigned";
+ worksheet.Cell(1, 7).Value = "Admission Date";
+ worksheet.Cell(1, 8).Value = "Discharge Date";
+ worksheet.Cell(1, 9).Value = "Status";
+
+ // Add data rows
+ for (int i = 0; i < patients.Count; i++)
+ {
+ worksheet.Cell(i + 2, 1).Value = patients[i].Name;
+ worksheet.Cell(i + 2, 2).Value = patients[i].Gender.ToString();
+ worksheet.Cell(i + 2, 3).Value = patients[i].Age;
+ worksheet.Cell(i + 2, 4).Value = patients[i].BloodGroup;
+ worksheet.Cell(i + 2, 5).Value = patients[i].Treatment;
+ worksheet.Cell(i + 2, 6).Value = patients[i].DoctorAssigned;
+ worksheet.Cell(i + 2, 7).Value = patients[i].AdmissionDate.ToShortDateString();
+ worksheet.Cell(i + 2, 8).Value = patients[i].DischargeDate?.ToShortDateString();
+ worksheet.Cell(i + 2, 9).Value = patients[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)
+ };
+ }
+ #endregion
+
+ #region Create Patient
+ [Authorize(HospitalManagementSystemPermissions.Patient.Create)]
+ public async Task CreatePatientAsync(CreateUpdatePatientDto input)
+ {
+ var patient = ObjectMapper.Map(input);
+
+ patient = await _patientRepository.InsertAsync(patient);
+ if (input.ImageID != Guid.Empty)
+ {
+ uniqueid.Add(input.ImageID);
+ var entitydocument = await SaveFileToDocument(patient, uniqueid, true);
+ foreach (var entity in entitydocument)
+ {
+ if (entity.TagName == "Image")
+ {
+ patient.Images = entity;
+ }
+ }
+ }
+
+ return ObjectMapper.Map(patient);
+ }
+ #endregion
+
+ #region Update Patient
+ [Authorize(HospitalManagementSystemPermissions.Patient.Edit)]
+ public async Task UpdatePatientAsync(Guid id, CreateUpdatePatientDto input)
+ {
+ var patient = await _patientRepository.GetQueryableAsync().Result.Include(x => x.Images).Where(x => x.Id == id).FirstOrDefaultAsync();
+ List entitydocument = new List();
+ ObjectMapper.Map(input, patient);
+ if (input.ImageID != Guid.Empty)
+ {
+ uniqueid.Add(input.ImageID);
+ entitydocument = await SaveFileToDocument(patient, uniqueid);
+ foreach (var entity in entitydocument)
+ {
+ if (entity.TagName == "Image")
+ {
+ patient.Images = entity;
+ }
+ }
+ }
+
+ patient = await _patientRepository.UpdateAsync(patient);
+ return ObjectMapper.Map(patient);
+ }
+ #endregion
+
+ #region Delete Patient
+ [Authorize(HospitalManagementSystemPermissions.Patient.Delete)]
+ public async Task DeletePatientAsync(Guid id)
+ {
+ await _patientRepository.DeleteAsync(id);
+ }
+ #endregion
+
+ #endregion
+
+ #region Get Status Dropdown
+ public async Task> GetStatusDropdownAsync()
+ {
+ List statuslist = new List();
+
+ statuslist = Enum.GetValues(typeof(Status))
+ .Cast()
+ .Select(e => new DropDownItems
+ {
+ Label = e.ToString(),
+ Value = (int)e
+ })
+ .ToList();
+ statuslist.Add(new DropDownItems
+ {
+ Label = "Select a Status",
+ Value = 0
+ });
+ statuslist = statuslist.OrderBy(x => x.Value).ToList();
+
+ return await Task.FromResult(statuslist);
+ }
+ #endregion
+
+ #region UploadFile
+ public async Task UploadFileAsync(string TagName, IRemoteStreamContent file)
+ {
+ if (file == null)
+ {
+ throw new Exception("File cannot be null");
+ }
+ string patientFolder = Path.Combine(_env.WebRootPath, "temp");
+ Guid uniqueId = Guid.NewGuid();
+ if (!Directory.Exists(patientFolder))
+ {
+ Directory.CreateDirectory(patientFolder);
+ }
+
+ string fileExtension = Path.GetExtension(file.FileName);
+ string fileName = $"{uniqueId}({TagName}){fileExtension}";
+ string filePath = Path.Combine(patientFolder, fileName);
+
+ using (var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write))
+ {
+ await file.GetStream().CopyToAsync(fileStream);
+ }
+
+ var metadata = new
+ {
+ OriginalFileName = file.FileName,
+ FileName = fileName,
+ FileSize = new FileInfo(filePath).Length.ToString(),
+ FilePath = filePath,
+ UploadDate = DateTime.UtcNow,
+ FileType = fileExtension,
+ TagName = TagName,
+ };
+
+ string jsonFileName = $"{uniqueId}({TagName}).json";
+ string jsonFilePath = Path.Combine(patientFolder, jsonFileName);
+ await File.WriteAllTextAsync(jsonFilePath, JsonSerializer.Serialize(metadata, new JsonSerializerOptions { WriteIndented = true }));
+
+ return uniqueId;
+ }
+ #endregion
+
+ #region SaveFileToDocument
+ //public async Task> SaveFileToDocument(Patient Patients, Guid ImageId, bool IsNew = false)
+ //{
+ // try
+ // {
+ // //string patientFolder = Path.Combine(_env.WebRootPath, "uploads", PatientId.ToString());
+ // string patientFolder = Path.Combine(_env.WebRootPath, "uploads", $"{Patients.Id}({Patients.Name})");
+ // string ImageFolder = Path.Combine(_env.WebRootPath, "uploads", $"{ImageId}({Patients.Name})");
+ // List? jsonFiles;
+
+ // if (IsNew)
+ // {
+ // jsonFiles = Directory.EnumerateFiles(ImageFolder, "*.json").Where(x => Path.GetFileName(x).StartsWith(ImageId.ToString())).ToList();
+ // }
+ // else
+ // {
+ // jsonFiles = Directory.EnumerateFiles(patientFolder, "*.json").Where(x => Path.GetFileName(x).StartsWith(Patients.Id.ToString())).ToList();
+ // }
+
+ // List savedDocuments = new List();
+
+ // // Iterate over all matching JSON files and save data to the database
+ // foreach (var jsonFilePath in jsonFiles)
+ // {
+ // string jsonContent = await File.ReadAllTextAsync(jsonFilePath);
+ // var metadata = JsonSerializer.Deserialize(jsonContent);
+
+ // var document = new EntityDocument
+ // {
+ // OriginalFileName = metadata.GetProperty("OriginalFileName").GetString(),
+ // GeneratedFileName = metadata.GetProperty("FileName").GetString(),
+ // FileSize = metadata.GetProperty("FileSize").GetString(),
+ // FilePath = metadata.GetProperty("FilePath").GetString(),
+ // FileType = metadata.GetProperty("FileType").GetString(),
+ // TagName = metadata.GetProperty("TagName").GetString(),
+ // UploadDate = metadata.GetProperty("UploadDate").GetDateTime() // Use GetDateTime()
+ // };
+
+ // // Save document record to the database
+ // await _entityDocumentRepository.InsertAsync(document);
+ // savedDocuments.Add(document);
+ // var patientidexist = await _patientDocumentRepository.GetQueryableAsync().Result.Include(x => x.Patients).Include(x => x.EntityDocuments)
+ // .Where(x => x.Patients.Id == Patients.Id && x.TagName == document.TagName).FirstOrDefaultAsync();
+ // var patientDocument = new PatientDocument
+ // {
+ // Patients = Patients,
+ // EntityDocuments = document,
+ // TagName = metadata.GetProperty("TagName").GetString()
+ // };
+ // if (patientidexist != null)
+ // {
+ // await _patientDocumentRepository.UpdateAsync(patientDocument);
+ // }
+ // else
+ // {
+ // await _patientDocumentRepository.InsertAsync(patientDocument);
+ // }
+ // File.Delete(jsonFilePath);
+ // }
+ // return savedDocuments;
+ // }
+ // catch (Exception ex)
+ // {
+ // throw new Exception(ex.Message);
+ // }
+ //}
+ public async Task> SaveFileToDocument(Patient patient, List uniqueIds, bool isNew = false)
+ {
+ try
+ {
+ string tempFolder = Path.Combine(_env.WebRootPath, "temp");
+ string patientFolder = Path.Combine(_env.WebRootPath, "uploads", $"{patient.Id}({patient.Name})");
+
+ if (!Directory.Exists(patientFolder))
+ {
+ Directory.CreateDirectory(patientFolder);
+ }
+
+ List savedDocuments = new List();
+
+ foreach (var uniqueId in uniqueIds)
+ {
+ // Fetch all matching JSON metadata files for the current uniqueId
+ foreach (var jsonFilePath in Directory.EnumerateFiles(tempFolder, $"{uniqueId}(*).json"))
+ {
+ string jsonContent = await File.ReadAllTextAsync(jsonFilePath);
+ var metadata = JsonSerializer.Deserialize(jsonContent);
+
+ string originalFileName = metadata.GetProperty("OriginalFileName").GetString();
+ string generatedFileName = metadata.GetProperty("FileName").GetString();
+ string fileSize = metadata.GetProperty("FileSize").GetString();
+ string filePath = metadata.GetProperty("FilePath").GetString();
+ string fileType = metadata.GetProperty("FileType").GetString();
+ string tagName = metadata.GetProperty("TagName").GetString();
+ DateTime uploadDate = metadata.GetProperty("UploadDate").GetDateTime();
+
+ // Move the file from temp folder to patient folder
+ string newFilePath = Path.Combine(patientFolder, generatedFileName);
+ if (File.Exists(filePath))
+ {
+ File.Move(filePath, newFilePath, true);
+ }
+ newFilePath = newFilePath.Split("wwwroot")[1];
+ var document = new EntityDocument
+ {
+ OriginalFileName = originalFileName,
+ GeneratedFileName = generatedFileName,
+ FileSize = fileSize,
+ FilePath = newFilePath,
+ FileType = fileType,
+ TagName = tagName,
+ UploadDate = uploadDate
+ };
+ savedDocuments.Add(document);
+
+ // Delete JSON file after processing
+ File.Delete(jsonFilePath);
+ }
+ }
+
+ // Batch insert entity documents
+ if (savedDocuments.Any())
+ {
+ await _entityDocumentRepository.InsertManyAsync(savedDocuments);
+ }
+
+ // Fetch existing patient documents in one query
+ var existingPatientDocs = await _patientDocumentRepository.GetQueryableAsync()
+ .Result.Where(x => x.Patients.Id == patient.Id)
+ .ToListAsync();
+
+ List patientDocuments = new List();
+
+ foreach (var document in savedDocuments)
+ {
+ var existingDoc = existingPatientDocs.FirstOrDefault(x => x.TagName == document.TagName);
+
+ var patientDocument = new PatientDocument
+ {
+ Patients = patient,
+ EntityDocuments = document,
+ TagName = document.TagName
+ };
+
+ if (existingDoc != null)
+ {
+ existingDoc.EntityDocuments = document; // Update reference
+ await _patientDocumentRepository.UpdateAsync(existingDoc);
+ }
+ else
+ {
+ patientDocuments.Add(patientDocument);
+ }
+ }
+
+ // Batch insert new patient documents
+ if (patientDocuments.Any())
+ {
+ await _patientDocumentRepository.InsertManyAsync(patientDocuments);
+ }
+ uniqueid.Clear();
+ return savedDocuments;
+ }
+ catch (Exception ex)
+ {
+ uniqueid.Clear();
+ throw new Exception($"Error saving files for patient {patient.Id}: {ex.Message}", ex);
+ }
+ }
+
+
+ #endregion
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/DropDownItems.cs b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/DropDownItems.cs
new file mode 100644
index 0000000..038baa2
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/DropDownItems.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalManagementSystem.Dto
+{
+ public class DropDownItems
+ {
+ public string Label { get; set; }
+ public int Value { get; set; }
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/FileDownloadDto.cs b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/FileDownloadDto.cs
new file mode 100644
index 0000000..f7f6524
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/FileDownloadDto.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalManagementSystem.Dto
+{
+ public class FileDownloadDto
+ {
+ public string FileName { get; set; }
+
+ public string FileContent { get; set; }
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/PagingSortProductResultDto.cs b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/PagingSortProductResultDto.cs
new file mode 100644
index 0000000..99c5f05
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/PagingSortProductResultDto.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
+
+namespace HospitalManagementSystem.Dto
+{
+ public class PagingSortPatientResultDto : PagedAndSortedResultRequestDto
+ {
+ public string? Search { get; set; }
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/QueryableExtensions.cs b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/QueryableExtensions.cs
new file mode 100644
index 0000000..b25fd16
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/QueryableExtensions.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalManagementSystem.Dto
+{
+ using System.Linq.Dynamic.Core;
+
+ public static class QueryableExtensions
+ {
+ public static IEnumerable OrderByDynamic(this IEnumerable source, string orderBy)
+ {
+ return source.AsQueryable().OrderBy(orderBy);
+ }
+ }
+
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/UploadFileDto.cs b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/UploadFileDto.cs
new file mode 100644
index 0000000..059ec2d
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Dto/UploadFileDto.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Content;
+
+namespace HospitalManagementSystem.Dto
+{
+ public class UploadFileDto
+ {
+ public Guid PatientId { get; set; } // Patient GUID ID
+ public string PatientName { get; set; } // Patient Name
+ public string TagName { get; set; } // Tag name for the file
+ public IRemoteStreamContent File { get; set; } // File content
+ }
+
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs
new file mode 100644
index 0000000..e78851a
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Enum/GlobalEnum.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalManagementSystem.GlobalEnum
+{
+ public enum Gender
+ {
+ Male = 1,
+ Female = 2
+ }
+
+ public enum Status
+ {
+ Recovered = 1,
+ Observation = 2,
+ InTreatment = 3
+ }
+ public enum appointmentStatus
+ {
+ Scheduled = 1,
+ Completed = 2,
+ Canceled = 3
+ }
+ public enum visitType
+ {
+ NewPatient = 1,
+ Followup = 2,
+ }
+ public enum paymentStatus
+ {
+ Paid = 1,
+ Pending = 2,
+ Unpaid = 3,
+ }
+
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/HospitalManagementSystem.Domain.Shared.csproj b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/HospitalManagementSystem.Domain.Shared.csproj
index fbfc39d..1c58cb6 100644
--- a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/HospitalManagementSystem.Domain.Shared.csproj
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/HospitalManagementSystem.Domain.Shared.csproj
@@ -10,6 +10,7 @@
+
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Localization/HospitalManagementSystem/en.json b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Localization/HospitalManagementSystem/en.json
index 54fde05..4a4f184 100644
--- a/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Localization/HospitalManagementSystem/en.json
+++ b/aspnet-core/src/HospitalManagementSystem.Domain.Shared/Localization/HospitalManagementSystem/en.json
@@ -4,6 +4,7 @@
"AppName": "HospitalManagementSystem",
"Menu:Home": "Home",
"Welcome": "Welcome",
- "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
+ "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io.",
+ "PatientHeader": "Patient Records"
}
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain/Documents/EntityDocument.cs b/aspnet-core/src/HospitalManagementSystem.Domain/Documents/EntityDocument.cs
new file mode 100644
index 0000000..c5ac170
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain/Documents/EntityDocument.cs
@@ -0,0 +1,21 @@
+using HospitalManagementSystem.Patients;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace HospitalManagementSystem.Documents
+{
+ public class EntityDocument : AuditedAggregateRoot
+ {
+ public string OriginalFileName { get; set; }
+ public string GeneratedFileName { get; set; }
+ public string FileSize { get; set; }
+ public string FilePath { get; set; }
+ public string FileType { get; set; }
+ public string TagName { get; set; }
+ public DateTime UploadDate { get; set; }
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain/Documents/PatientDocument.cs b/aspnet-core/src/HospitalManagementSystem.Domain/Documents/PatientDocument.cs
new file mode 100644
index 0000000..ec61794
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain/Documents/PatientDocument.cs
@@ -0,0 +1,21 @@
+using HospitalManagementSystem.Patients;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace HospitalManagementSystem.Documents
+{
+ public class PatientDocument : AuditedAggregateRoot
+ {
+ [Required]
+ public Patient Patients { get; set; }
+ [Required]
+ public EntityDocument EntityDocuments { get; set; }
+ [Required]
+ public string TagName { get; set; }
+ }
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain/HospitalManagementSystem.Domain.csproj b/aspnet-core/src/HospitalManagementSystem.Domain/HospitalManagementSystem.Domain.csproj
index 45c0c81..2d936cd 100644
--- a/aspnet-core/src/HospitalManagementSystem.Domain/HospitalManagementSystem.Domain.csproj
+++ b/aspnet-core/src/HospitalManagementSystem.Domain/HospitalManagementSystem.Domain.csproj
@@ -13,6 +13,7 @@
+
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain/Patients/Patient.cs b/aspnet-core/src/HospitalManagementSystem.Domain/Patients/Patient.cs
new file mode 100644
index 0000000..39f9f04
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain/Patients/Patient.cs
@@ -0,0 +1,38 @@
+using HospitalManagementSystem.Documents;
+using HospitalManagementSystem.GlobalEnum;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace HospitalManagementSystem.Patients
+{
+ public class Patient : AuditedAggregateRoot
+ {
+ [Required]
+ public string Name { get; set; }
+ [Required]
+ public Gender Gender { get; set; }
+ [Required]
+ public string Mobile { get; set; }
+ [Required]
+ public string Email { get; set; }
+ [Required]
+ public int Age { get; set; }
+ public string Treatment { get; set; }
+ public string DoctorAssigned { get; set; }
+ [Required]
+ public string Address { get; set; }
+ [Required]
+ public string BloodGroup { get; set; }
+ public DateTime AdmissionDate { get; set; }
+ public DateTime? DischargeDate { get; set; }
+ [Required]
+ public Status Status { get; set; }
+ public EntityDocument? Images { get; set; }
+ }
+}
+
diff --git a/aspnet-core/src/HospitalManagementSystem.Domain/Patients/PatientRecord.cs b/aspnet-core/src/HospitalManagementSystem.Domain/Patients/PatientRecord.cs
new file mode 100644
index 0000000..7ecf45e
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.Domain/Patients/PatientRecord.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Volo.Abp.Domain.Entities.Auditing;
+using System.Threading.Tasks;
+using System.ComponentModel.DataAnnotations;
+using HospitalManagementSystem.GlobalEnum;
+using System.ComponentModel.DataAnnotations.Schema;
+using HospitalManagementSystem.Documents;
+
+namespace HospitalManagementSystem.Patients
+{
+ public class PatientRecord : AuditedAggregateRoot
+ {
+ //[Required]
+ //public string FullName { get; set; }
+
+ //[Required]
+ //public string Mobile { get; set; }
+
+ //[Required]
+ //public Gender Gender { get; set; }
+ public virtual Patient Patients { get; set; }
+
+ [Required]
+ public DateTime DateOfAdmission { get; set; }
+
+ public string Diagnosis { get; set; }
+
+ public string TreatmentPlan { get; set; }
+
+ public string DoctorNotes { get; set; }
+
+ public virtual EntityDocument? LabReportUrl { get; set; }
+
+ public virtual EntityDocument? MedicationUrl { get; set; }
+
+ public virtual EntityDocument? MedicationHistoryUrl { get; set; }
+
+ public DateTime? NextFollowUp { get; set; }
+
+ public string InsuranceProvider { get; set; }
+
+ [Required]
+ public Status Status { get; set; }
+ }
+
+}
diff --git a/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/EntityFrameworkCore/HospitalManagementSystemDbContext.cs b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/EntityFrameworkCore/HospitalManagementSystemDbContext.cs
index 2ef4370..dd894e6 100644
--- a/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/EntityFrameworkCore/HospitalManagementSystemDbContext.cs
+++ b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/EntityFrameworkCore/HospitalManagementSystemDbContext.cs
@@ -1,12 +1,13 @@
-using HospitalManagementSystem.Appointments;
+using HospitalManagementSystem.Documents;
+using HospitalManagementSystem.Patients;using HospitalManagementSystem.Appointments;
using HospitalManagementSystem.Departments;
-using HospitalManagementSystem.Doctors;
-using Microsoft.EntityFrameworkCore;
+using HospitalManagementSystem.Doctors;using Microsoft.EntityFrameworkCore;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.Identity.EntityFrameworkCore;
@@ -27,6 +28,10 @@ public class HospitalManagementSystemDbContext :
ITenantManagementDbContext
{
/* Add DbSet properties for your Aggregate Roots / Entities here. */
+ public DbSet PatientRecords { get; set; }
+ public DbSet Patients { get; set; }
+ public DbSet EntityDocuments { get; set; }
+ public DbSet PatientDocuments { get; set; }
#region Entities from the modules
@@ -82,6 +87,29 @@ public class HospitalManagementSystemDbContext :
builder.ConfigureTenantManagement();
/* Configure your own tables/entities inside here */
+ builder.Entity(b =>
+ {
+ b.ToTable("PatientRecords");
+ b.ConfigureByConvention();//auto configure for the base class props
+ });
+
+ builder.Entity(b =>
+ {
+ b.ToTable("Patient");
+ b.ConfigureByConvention(); //auto configure for the base class props
+ });
+
+ builder.Entity(b =>
+ {
+ b.ToTable("EntityDocuments");
+ b.ConfigureByConvention(); //auto configure for the base class props
+ });
+
+ builder.Entity(b =>
+ {
+ b.ToTable("PatientDocuments");
+ b.ConfigureByConvention(); //auto configure for the base class props
+ });
//builder.Entity(b =>
//{
diff --git a/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250129072320_added_patientinpatientrecord.Designer.cs b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250129072320_added_patientinpatientrecord.Designer.cs
new file mode 100644
index 0000000..4641ba7
--- /dev/null
+++ b/aspnet-core/src/HospitalManagementSystem.EntityFrameworkCore/Migrations/20250129072320_added_patientinpatientrecord.Designer.cs
@@ -0,0 +1,2123 @@
+//
+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("20250129072320_added_patientinpatientrecord")]
+ partial class added_patientinpatientrecord
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("HospitalManagementSystem.Patients.Patient", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Address")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AdmissionDate")
+ .HasColumnType("datetime2");
+
+ 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("DischargeDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DoctorAssigned")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Gender")
+ .HasColumnType("int");
+
+ 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("Status")
+ .HasColumnType("int");
+
+ b.Property("Treatment")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ 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")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DoctorNotes")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("InsuranceProvider")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LabReportUrl")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MedicationHistoryUrl")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MedicationUrl")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("NextFollowUp")
+ .HasColumnType("datetime2");
+
+ b.Property("PatientsId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Status")
+ .HasColumnType("int");
+
+ b.Property("TreatmentPlan")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PatientsId");
+
+ b.ToTable("PatientRecords", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ApplicationName")
+ .HasMaxLength(96)
+ .HasColumnType("nvarchar(96)")
+ .HasColumnName("ApplicationName");
+
+ b.Property("BrowserInfo")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)")
+ .HasColumnName("BrowserInfo");
+
+ b.Property("ClientId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ClientId");
+
+ b.Property("ClientIpAddress")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ClientIpAddress");
+
+ b.Property("ClientName")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("ClientName");
+
+ b.Property("Comments")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("Comments");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CorrelationId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("CorrelationId");
+
+ b.Property("Exceptions")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExecutionDuration")
+ .HasColumnType("int")
+ .HasColumnName("ExecutionDuration");
+
+ b.Property("ExecutionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("HttpMethod")
+ .HasMaxLength(16)
+ .HasColumnType("nvarchar(16)")
+ .HasColumnName("HttpMethod");
+
+ b.Property("HttpStatusCode")
+ .HasColumnType("int")
+ .HasColumnName("HttpStatusCode");
+
+ b.Property("ImpersonatorTenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("ImpersonatorTenantId");
+
+ b.Property("ImpersonatorTenantName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ImpersonatorTenantName");
+
+ b.Property("ImpersonatorUserId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("ImpersonatorUserId");
+
+ b.Property("ImpersonatorUserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("ImpersonatorUserName");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TenantName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("TenantName");
+
+ b.Property("Url")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("Url");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("UserId");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("UserName");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "ExecutionTime");
+
+ b.HasIndex("TenantId", "UserId", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogs", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditLogId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("AuditLogId");
+
+ b.Property("ExecutionDuration")
+ .HasColumnType("int")
+ .HasColumnName("ExecutionDuration");
+
+ b.Property("ExecutionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("ExecutionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("MethodName")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("MethodName");
+
+ b.Property("Parameters")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)")
+ .HasColumnName("Parameters");
+
+ b.Property("ServiceName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("ServiceName");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogActions", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditLogId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("AuditLogId");
+
+ b.Property("ChangeTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("ChangeTime");
+
+ b.Property("ChangeType")
+ .HasColumnType("tinyint")
+ .HasColumnName("ChangeType");
+
+ b.Property("EntityId")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("EntityId");
+
+ b.Property("EntityTenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EntityTypeFullName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("EntityTypeFullName");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
+
+ b.ToTable("AbpEntityChanges", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EntityChangeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("NewValue")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)")
+ .HasColumnName("NewValue");
+
+ b.Property("OriginalValue")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)")
+ .HasColumnName("OriginalValue");
+
+ b.Property("PropertyName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("PropertyName");
+
+ b.Property("PropertyTypeFullName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("PropertyTypeFullName");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EntityChangeId");
+
+ b.ToTable("AbpEntityPropertyChanges", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsAbandoned")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("JobArgs")
+ .IsRequired()
+ .HasMaxLength(1048576)
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("JobName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("LastTryTime")
+ .HasColumnType("datetime2");
+
+ b.Property("NextTryTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Priority")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint")
+ .HasDefaultValue((byte)15);
+
+ b.Property("TryCount")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("smallint")
+ .HasDefaultValue((short)0);
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsAbandoned", "NextTryTime");
+
+ b.ToTable("AbpBackgroundJobs", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property