I am working on a CRF with recap for a master project however I have run into a problem with some programming.
Im trying to set up an equation for some intervalls, the following example is for body temperature (in Celsius). I am trying to integrate a scoring model into one of my instruments. If the temperatur is 36-38.4 it is supposed to give 0 points, if it is between 32-33.9 it will give 2 points etc. My problem is that both a very low numer and a very high number gives 4 points and I can't figure out how to program the equation.
This is how redcap uses conditional logic: if (CONDITION, value if condition is TRUE, value if condition is FALSE).
This is a equation that works for example:
if([cpis_temp] > 35.9,if([cpis_temp] > 38.4,if([cpis_temp] >=39, 2, 1),0),2)
Now I want to make another but with more intervalls but i can't get the equation to work, these are the intervalls:
0 if: 36-38.4
1 if: 34-35.9 or 38.5-38.9
2 if: 32-33.9
3 if: 30-31.9 or 39-40.9
4 if: <=29.9 or >=41
This is what I have managed to formulate so far:
if([cpis_temp]>1,if([cpis_temp]>20,if([cpis_temp]>=30,if([cpis_temp]>=32,if([cpis_temp]>=34,if([cpis_temp]>=36,if([cpis_temp]=>38.5,if([cpis_temp]>=39,if([cpis_temp]>=41,4,0),3),1),0),1),2),3),4),0)
Grateful for some input and help!
--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/8e8e20b1-87d6-4de1-bfa8-62811c43b78dn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/CAO_h17xNrDSm7CoOX%2B0ikZWoZkzYPvTX_j1NLdfwLNug5gYjOA%40mail.gmail.com.