I am trying to apply a multiplication formula for three drugs.
Depending on which of three drugs it is I want to multiply the primary dose (number field) by a factor (different for the three drugs).
The formula when checked has no errors and I get an output but they are all zeros, when I should be getting numbers in the hundreds.
if{x_med_orders.drug_description} in [".INFLIXIMAB (Inflectra)", "INFLIXIMAB (Inflectra)"] then {x_med_order_doses.primary_dose} * 2.0967
else if {x_med_orders.drug_description} in [".INFLIXIMAB (Remicade)", "INFLIXIMAB (Remicade)"] then {x_med_order_doses.primary_dose} * 2.8173
else if {x_med_orders.drug_description} in [".INFLIXIMAB (Remsima)", "INFLIXIMAB (Remsima)"] then {x_med_order_doses.primary_dose} * 1.6362
My second method
I also tried creating a formula that just assigned the three factors to each row of data (2.0967, 2.8173, 1.632) and then tried to multiply this @factor by the dose field {x_med_order_doses.primary_dose}. However, it seems I cannot create a formula that includes the multiplication of another formula I have created.
If I can get my first method to work that would be best. Not sure why I am getting zeros. Maybe I need to change the numbers in my formula in some way so they are treated as numbers?
Thanks
Aucun commentaire:
Enregistrer un commentaire