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 @@ -45,7 +45,6 @@
name="form"
[(ngModel)]="currentPrescription.formName"
(selectionChange)="getFormValueChanged()"
required
>
<mat-option
*ngFor="let item of drugFormMaster"
Expand All @@ -70,7 +69,6 @@
[(ngModel)]="tempDrugName"
(keyup)="filterMedicine(tempDrugName)"
(blur)="reEnterMedicine()"
required
[matAutocomplete]="autoGroup"
/>
<mat-autocomplete
Expand All @@ -94,7 +92,6 @@
name="dose"
[(ngModel)]="currentPrescription.dose"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option
*ngFor="let item of filteredDrugDoseMaster"
Expand All @@ -116,7 +113,6 @@
name="frequency"
[(ngModel)]="currentPrescription.frequency"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option
*ngFor="let item of drugFrequencyMaster"
Expand All @@ -140,7 +136,6 @@
name="duration"
[(ngModel)]="currentPrescription.duration"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option *ngFor="let item of drugDurationMaster" [value]="item">
{{ item }}
Expand All @@ -157,7 +152,6 @@
name="unit"
[(ngModel)]="currentPrescription.unit"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option
*ngFor="let item of drugDurationUnitMaster"
Expand Down Expand Up @@ -186,7 +180,6 @@
name="quantity"
[(ngModel)]="currentPrescription.qtyPrescribed"
[disabled]="!currentPrescription.drugID"
required
>
<mat-option
*ngFor="let item of drugDurationMaster | slice: 0 : 5"
Expand Down
28 changes: 1 addition & 27 deletions src/app/app-modules/nurse-doctor/workarea/workarea.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2123,33 +2123,7 @@ 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);
}
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we removing this code? this a fix for prescription field

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, The fix is done for the prescription that needs to be reverted. Discussed with Kundan.

if (required.length) {
this.confirmationService.notify(
this.current_language_set.alerts.info.belowFields,
Expand Down