From c02d3deb49af9c7798f052443983c6b6d82cdd95 Mon Sep 17 00:00:00 2001 From: SnehaRH Date: Fri, 27 Feb 2026 16:19:01 +0530 Subject: [PATCH] fix: amm-2192 remove mandatory for prescription --- .../prescription/prescription.component.html | 7 ----- .../workarea/workarea.component.ts | 28 +------------------ 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/prescription/prescription.component.html b/src/app/app-modules/nurse-doctor/case-record/general-case-record/prescription/prescription.component.html index a018ddb..ecd338d 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/prescription/prescription.component.html +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/prescription/prescription.component.html @@ -45,7 +45,6 @@ name="form" [(ngModel)]="currentPrescription.formName" (selectionChange)="getFormValueChanged()" - required > {{ item }} @@ -157,7 +152,6 @@ name="unit" [(ngModel)]="currentPrescription.unit" [disabled]="!currentPrescription.drugID" - required > ( - (caseRecordForm && caseRecordForm.controls - ? caseRecordForm.controls['drugPrescriptionForm'] - : null) - ); - if (drugPrescriptionForm) { - let prescribedDrugs = - drugPrescriptionForm.value && - drugPrescriptionForm.value.prescribedDrugs - ? drugPrescriptionForm.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 prescription presence', err); - } - } - + if (required.length) { this.confirmationService.notify( this.current_language_set.alerts.info.belowFields,