@james_jayaraj/test-npm 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3715,6 +3715,7 @@ class RxComponent {
|
|
|
3715
3715
|
try {
|
|
3716
3716
|
this.commonServices.selectedFormulation = med;
|
|
3717
3717
|
this.commonServices.clearMedicalPrescriptionDataOnchangeofMedicine(med);
|
|
3718
|
+
this.changedetect.detectChanges();
|
|
3718
3719
|
if (!this.commonServices.isMedicineRestrict) {
|
|
3719
3720
|
this.commonServices.isS8WarningNext = true;
|
|
3720
3721
|
this.restrictions = med.Restrictions && med.Restrictions.length != 0 ? med.Restrictions[0] : null;
|
|
@@ -6395,14 +6396,18 @@ class RxComponent {
|
|
|
6395
6396
|
}
|
|
6396
6397
|
}
|
|
6397
6398
|
isCurrentMedicineInFavourites() {
|
|
6398
|
-
|
|
6399
|
+
let favouritesList = this.showFavouriteMed ? this.commonServices.favouriteMedicineList : this.commonServices.originalFavouriteMedicineList;
|
|
6400
|
+
if (!this.commonServices.selectedFormulation || !favouritesList || favouritesList.length === 0) {
|
|
6399
6401
|
return false;
|
|
6400
6402
|
}
|
|
6401
|
-
|
|
6403
|
+
if (this.showFavouriteMed) {
|
|
6404
|
+
return true;
|
|
6405
|
+
}
|
|
6406
|
+
return favouritesList.some((favMed) => favMed.productId.toString() === this.commonServices.selectedFormulation.productId.toString() &&
|
|
6402
6407
|
(!this.commonServices.IsNullOrEmpty(favMed.pbsCode) ? favMed.pbsCode : "") === (!this.commonServices.IsNullOrEmpty(this.commonServices.selectedFormulation?.pbsCode) ? this.commonServices.selectedFormulation.pbsCode : "") &&
|
|
6403
|
-
favMed.productName === this.commonServices.selectedFormulation.productName && favMed.quantity === this.commonServices.quantityVal && favMed.repeats === this.commonServices.repeatsVal &&
|
|
6404
|
-
favMed.dose === this.commonServices.doseSearchValue && favMed.frequency === this.commonServices.freqSearchValue && favMed.food === this.commonServices.foodSearchValue &&
|
|
6405
|
-
favMed.instruction === this.commonServices.InstructionSearchValue && favMed.route === this.commonServices.routeSearchValue);
|
|
6408
|
+
favMed.productName === this.commonServices.selectedFormulation.productName && favMed.quantity?.toString() === this.commonServices.quantityVal?.toString() && favMed.repeats?.toString() === this.commonServices.repeatsVal?.toString() &&
|
|
6409
|
+
favMed.dose?.toString() === this.commonServices.doseSearchValue?.toString() && favMed.frequency?.toString() === this.commonServices.freqSearchValue?.toString() && favMed.food?.toString() === this.commonServices.foodSearchValue?.toString() &&
|
|
6410
|
+
favMed.instruction?.toString() === this.commonServices.InstructionSearchValue?.toString() && favMed.route?.toString() === this.commonServices.routeSearchValue?.toString());
|
|
6406
6411
|
}
|
|
6407
6412
|
isPbsTypeMatch(itemPbsType, pbsTypeFilter) {
|
|
6408
6413
|
if (!pbsTypeFilter?.trim())
|