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 @@ -70,7 +70,6 @@
getFormValueChanged();
trackFieldInteraction('Medicine Form Selection')
"
required
>
<mat-option
*ngFor="let item of drugFormMaster"
Expand Down Expand Up @@ -98,7 +97,6 @@
(keyup)="filterMedicine(tempDrugName)"
(blur)="reEnterMedicine()"
(focus)="trackFieldInteraction('Medicine Name Input')"
required
[matAutocomplete]="autoGroup"
/>
<mat-autocomplete
Expand Down Expand Up @@ -129,7 +127,6 @@
[(ngModel)]="currentPrescription.dose"
[disabled]="!currentPrescription.drugID"
(selectionChange)="trackFieldInteraction('Dosage Selection')"
required
>
<mat-option
*ngFor="let item of filteredDrugDoseMaster"
Expand All @@ -152,7 +149,6 @@
[(ngModel)]="currentPrescription.frequency"
[disabled]="!currentPrescription.drugID"
(selectionChange)="trackFieldInteraction('Frequency Selection')"
required
>
<mat-option
*ngFor="let item of drugFrequencyMaster"
Expand Down Expand Up @@ -225,7 +221,6 @@
[(ngModel)]="currentPrescription.qtyPrescribed"
[disabled]="!currentPrescription.drugID"
(selectionChange)="trackFieldInteraction('Quantity Selection')"
required
>
<mat-option
*ngFor="let item of drugDurationMaster | slice: 0 : 5"
Expand Down
26 changes: 0 additions & 26 deletions src/app/app-modules/nurse-doctor/workarea/workarea.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2930,32 +2930,6 @@ export class WorkareaComponent
}
}
}
// Ensure doctor has added at least one prescription
if (this.attendant === 'doctor') {
try {
const drugPrescriptionForm = <FormGroup>(
(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(
Expand Down