-
-
+
+
+
+
+
+
+
+
0">
+
Uploading... {{ uploadProgress1 }}%
+
+
+
{{labReportUrlpath}}
+
+
+
+
+
+
+
+
0">
+
Uploading... {{ uploadProgress2 }}%
+
+
+
{{medicationUrlpath}}
+
+
+
+
+
+
+
0">
+
Uploading... {{ uploadProgress3 }}%
+
+
+
{{medicationHistoryUrlpath}}
+
+
+
+
+
+
+
+
+
+
+ Diagnosis is required.
+
+
+
+
+
+
+
+
+
+
+ Insurance is required.
+
+
+
+
+
+
diff --git a/angular/src/app/patients/patient-record/patient-record.component.scss b/angular/src/app/patients/patient-record/patient-record.component.scss
index 0bc5d64..049d143 100644
--- a/angular/src/app/patients/patient-record/patient-record.component.scss
+++ b/angular/src/app/patients/patient-record/patient-record.component.scss
@@ -18,7 +18,8 @@
}
.female {
- background-color: purple;
+ background-color: #ff4081 !important;
+ color: white;
}
.pdf-icon {
diff --git a/angular/src/app/patients/patient-record/patient-record.component.ts b/angular/src/app/patients/patient-record/patient-record.component.ts
index b3ee512..6916fc5 100644
--- a/angular/src/app/patients/patient-record/patient-record.component.ts
+++ b/angular/src/app/patients/patient-record/patient-record.component.ts
@@ -41,7 +41,9 @@ export class PatientRecordComponent implements OnInit {
medicationHistoryUrlpath: string;
medicationUrlpath: string;
guid: string = '00000000-0000-0000-0000-000000000000';
- uploadProgress = 0;
+ uploadProgress1 = 0;
+ uploadProgress2 = 0;
+ uploadProgress3 = 0;
constructor(
private patientService: PatientService,
@@ -94,6 +96,9 @@ export class PatientRecordComponent implements OnInit {
this.medicationHistoryUrlpath = '';
this.selectdateOfAdmission = new Date();
this.selectnextFollowUp = new Date();
+ this.uploadProgress1 = 0;
+ this.uploadProgress2 = 0;
+ this.uploadProgress3 = 0;
}
loadPatient(event: any, id: any) {
@@ -198,7 +203,9 @@ export class PatientRecordComponent implements OnInit {
formdata.append('file', input.files[0]);
this.UploadFileData(tag, formdata);
} else {
- this.uploadProgress = 0;
+ this.uploadProgress1 = 0;
+ this.uploadProgress2 = 0;
+ this.uploadProgress3 = 0;
return;
}
}
@@ -260,18 +267,30 @@ export class PatientRecordComponent implements OnInit {
this.http.request(req).subscribe(
event => {
if (event.type === HttpEventType.UploadProgress) {
- this.uploadProgress = Math.round((event.loaded / event.total!) * 100);
- console.log(event.type, this.uploadProgress);
- } else if (event.type === HttpEventType.Response) {
- this.uploadProgress = 100;
+ // this.uploadProgress = Math.round((event.loaded / event.total!) * 100);
switch (tag) {
case 'Lab-Report':
+ this.uploadProgress1 = Math.round((event.loaded / event.total!) * 100);
+ break;
+ case 'Medication':
+ this.uploadProgress2 = Math.round((event.loaded / event.total!) * 100);
+ break;
+ case 'Medication-History':
+ this.uploadProgress3 = Math.round((event.loaded / event.total!) * 100);
+ break;
+ }
+ } else if (event.type === HttpEventType.Response) {
+ switch (tag) {
+ case 'Lab-Report':
+ this.uploadProgress1 = 100;
this.selectedPatient.labReportUrlID = event.body.toString();
break;
case 'Medication':
+ this.uploadProgress2 = 100;
this.selectedPatient.medicationUrlID = event.body.toString();
break;
case 'Medication-History':
+ this.uploadProgress3 = 100;
this.selectedPatient.medicationHistoryUrlID = event.body.toString();
break;
}
@@ -279,7 +298,9 @@ export class PatientRecordComponent implements OnInit {
},
error => {
console.error('Upload failed', error);
- this.uploadProgress = 0;
+ this.uploadProgress1 = 100;
+ this.uploadProgress2 = 100;
+ this.uploadProgress3 = 100;
}
);
}
diff --git a/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs b/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs
index cd53ffa..35acb19 100644
--- a/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs
+++ b/aspnet-core/src/HospitalManagementSystem.Application/Patients/PatientAppService.cs
@@ -54,7 +54,7 @@ namespace HospitalManagementSystem.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()))
+ .WhereIf(!string.IsNullOrEmpty(input.Search), x => x.Patients.Name.ToLower().Contains(input.Search.ToLower()) || x.Patients.Email.Contains(input.Search))
.Where(x => x.Patients.Id == Id);
var totalCount = await filteredQuery.CountAsync();
@@ -270,7 +270,7 @@ namespace HospitalManagementSystem.Patients
if (!string.IsNullOrEmpty(input.Search))
{
query = _patientRepository.GetQueryableAsync().Result
- .Where(x => x.Name.ToLower().Contains(input.Search.ToLower()))
+ .Where(x => x.Name.ToLower().Contains(input.Search.ToLower()) || x.Email.Contains(input.Search))
.OrderBy(input.Sorting ?? (nameof(Patient.Id) + " asc"))
.Skip(input.SkipCount)
.Take(input.MaxResultCount)