diff --git a/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.html b/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.html
index b85450f3..2e9a3f7f 100644
--- a/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.html
+++ b/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.html
@@ -725,7 +725,6 @@
name="form"
[(ngModel)]="tempform"
(selectionChange)="getFormValueChanged()"
- required
>
[(ngModel)]="tempDrugName"
(keyup)="filterMedicine(tempDrugName)"
(blur)="reEnterMedicine()"
- required
[matAutocomplete]="autoGroup"
/>
name="dose"
[(ngModel)]="currentPrescription.dose"
[disabled]="!currentPrescription.drugID"
- required
>
name="frequency"
[(ngModel)]="currentPrescription.frequency"
[disabled]="!currentPrescription.drugID"
- required
>
name="duration"
[(ngModel)]="currentPrescription.duration"
[disabled]="!currentPrescription.drugID"
- required
>
name="unit"
[(ngModel)]="currentPrescription.unit"
[disabled]="!currentPrescription.drugID"
- required
>
name="quantity"
[(ngModel)]="currentPrescription.qtyPrescribed"
[disabled]="!currentPrescription.drugID"
- required
>
{
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();
@@ -3724,31 +3725,6 @@ export class WorkareaComponent
}
}
}
- // For quick consult doctor flow, ensure at least one prescription exists
- if (this.attendant === 'doctor') {
- try {
- const prescription =
- form && form.controls ? form.controls['prescription'] : null;
- if (prescription) {
- let prescribedDrugs =
- prescription.value && prescription.value.prescribedDrugs
- ? prescription.value.prescribedDrugs
- : [];
- prescribedDrugs = prescribedDrugs.filter((d: any) => !!d.createdBy);
- if (!prescribedDrugs || prescribedDrugs.length === 0) {
- required.push(
- this.current_language_set?.Prescription?.prescriptionRequired ||
- 'Please add at least one prescription',
- );
- }
- }
- } catch (err) {
- console.warn(
- 'Error validating quick consult prescription presence',
- err,
- );
- }
- }
if (required.length) {
this.confirmationService.notify(
@@ -3846,13 +3822,15 @@ export class WorkareaComponent
labTestOrders.length > 0
) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info
+ ?.datafillSuccessfully ?? 'Data saved successfully',
'success',
);
this.navigateToSpecialistWorklist();
} else {
this.getHealthIDDetails(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info
+ ?.datafillSuccessfully ?? 'Data saved successfully',
);
}
} else {
@@ -3864,13 +3842,15 @@ export class WorkareaComponent
this.schedulerData !== null)
) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info
+ ?.datafillSuccessfully ?? 'Data saved successfully',
'success',
);
this.navigateToDoctorWorklist();
} else {
this.getHealthIDDetails(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info
+ ?.datafillSuccessfully ?? 'Data saved successfully',
);
}
}
@@ -4024,7 +4004,8 @@ export class WorkareaComponent
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();
@@ -4100,7 +4081,8 @@ export class WorkareaComponent
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();
@@ -4133,7 +4115,8 @@ export class WorkareaComponent
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();
@@ -4169,7 +4152,8 @@ export class WorkareaComponent
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();
@@ -4230,13 +4214,15 @@ export class WorkareaComponent
this.schedulerData !== null)
) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info
+ ?.datafillSuccessfully ?? 'Data saved successfully',
'success',
);
this.navigateToDoctorWorklist();
} else {
this.getHealthIDDetails(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info
+ ?.datafillSuccessfully ?? 'Data saved successfully',
);
}
}
@@ -4310,7 +4296,8 @@ export class WorkareaComponent
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();
@@ -4344,7 +4331,8 @@ export class WorkareaComponent
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();
@@ -4387,13 +4375,15 @@ export class WorkareaComponent
this.testsPrescribed.laboratoryList.length > 0
) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToSpecialistWorklist();
} else {
this.getHealthIDDetails(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
);
}
}
@@ -4411,13 +4401,15 @@ export class WorkareaComponent
(this.schedulerData !== undefined && this.schedulerData !== null)
) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToDoctorWorklist();
} else {
this.getHealthIDDetails(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
);
}
}
@@ -5552,7 +5544,8 @@ export class WorkareaComponent
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();
@@ -5585,7 +5578,8 @@ export class WorkareaComponent
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();
@@ -5615,7 +5609,8 @@ export class WorkareaComponent
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
this.confirmationService.alert(
- this.current_language_set.alerts.info.datafillSuccessfully,
+ this.current_language_set?.alerts?.info?.datafillSuccessfully ??
+ 'Data saved successfully',
'success',
);
this.navigateToNurseWorklist();