From 6302b013606eeb129ffa31388f9d5bd399f0c9d4 Mon Sep 17 00:00:00 2001 From: kavitha-sundararajan <90255023+kavitha-sundararajan@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:03:58 +0530 Subject: [PATCH] Kavitha|fix allergy color and non-coded dosage rule issue (#1013) --- micro-frontends/src/styles/common.scss | 2 +- .../consultation/controllers/addTreatmentController.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/micro-frontends/src/styles/common.scss b/micro-frontends/src/styles/common.scss index 49d47ea606..e8d1960316 100644 --- a/micro-frontends/src/styles/common.scss +++ b/micro-frontends/src/styles/common.scss @@ -47,5 +47,5 @@ text-transform: capitalize; } .red-text{ - color: #DA1E28; + color: red; } diff --git a/ui/app/clinical/consultation/controllers/addTreatmentController.js b/ui/app/clinical/consultation/controllers/addTreatmentController.js index ee5406ef96..e9058718a3 100644 --- a/ui/app/clinical/consultation/controllers/addTreatmentController.js +++ b/ui/app/clinical/consultation/controllers/addTreatmentController.js @@ -359,7 +359,8 @@ angular.module('bahmni.clinical') $scope.calculateDose = function (treatment) { if (treatment.dosingRule != null || treatment.dosingRule != undefined) { var visitUuid = treatmentConfig.orderSet.calculateDoseOnlyOnCurrentVisitValues ? $scope.activeVisit.uuid : undefined; - var calculatedDose = orderSetService.getCalculatedDose($scope.patient.uuid, treatment.drug.name, treatment.uniformDosingType.dose, "mg", '', treatment.dosingRule, visitUuid); + var drugName = treatment.drug ? treatment.drug.name : treatment.drugNonCoded; + var calculatedDose = orderSetService.getCalculatedDose($scope.patient.uuid, drugName, treatment.uniformDosingType.dose, "mg", '', treatment.dosingRule, visitUuid); calculatedDose.then(function (calculatedDosage) { treatment.uniformDosingType.dose = calculatedDosage.dose; treatment.calculateQuantityAndUnit();