Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,6 @@ <h4>
name="form"
[(ngModel)]="tempform"
(selectionChange)="getFormValueChanged()"
required
>
<mat-option
*ngFor="let item of drugFormMaster"
Expand All @@ -751,7 +750,6 @@ <h4>
[(ngModel)]="tempDrugName"
(keyup)="filterMedicine(tempDrugName)"
(blur)="reEnterMedicine()"
required
[matAutocomplete]="autoGroup"
/>
<mat-autocomplete
Expand Down Expand Up @@ -784,7 +782,6 @@ <h4>
name="dose"
[(ngModel)]="currentPrescription.dose"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option
*ngFor="let item of filteredDrugDoseMaster"
Expand All @@ -805,7 +802,6 @@ <h4>
name="frequency"
[(ngModel)]="currentPrescription.frequency"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option
*ngFor="let item of drugFrequencyMaster"
Expand All @@ -829,7 +825,6 @@ <h4>
name="duration"
[(ngModel)]="currentPrescription.duration"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option
*ngFor="let item of drugDurationMaster"
Expand All @@ -850,7 +845,6 @@ <h4>
name="unit"
[(ngModel)]="currentPrescription.unit"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option
*ngFor="let item of drugDurationUnitMaster"
Expand Down Expand Up @@ -878,7 +872,6 @@ <h4>
name="quantity"
[(ngModel)]="currentPrescription.qtyPrescribed"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option
*ngFor="let item of drugDurationMaster | slice: 0 : 5"
Expand Down
85 changes: 40 additions & 45 deletions src/app/app-modules/nurse-doctor/workarea/workarea.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3585,7 +3585,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();
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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 {
Expand All @@ -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',
);
}
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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',
);
}
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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',
);
}
}
Expand All @@ -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',
);
}
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
Loading