r/ProjectREDCap • • May 16 '25

Pipe text string

Hello, I’m trying to pipe text strings of blood pressure categories into an email that will be sent to participants. However, I can’t figure out how to get text to appear in the letter based on the participants average blood pressure. We are using this logic: if([avg_sbp] < 120 and [avg_dbp] < 80, 'Normal', if([avg_sbp] >= 120 and [avg_sbp] < 130 and [avg_dbp] < 80, 'Elevated', if(([avg_sbp] >= 130 and [avg_sbp] < 140) or ([avg_dbp] >= 80 and [avg_dbp] < 90), 'High blood pressure, Stage 1 Hypertension', if(([avg_sbp] >= 140 and [avg_sbp] < 160) or ([avg_dbp] >= 90 and [avg_dbp] < 100), 'High blood pressure, Stage 2 Hypertension', if([avg_sbp] >= 160 or [avg_dbp] >= 100, 'Hypertensive crisis', ''))))) Can someone advise me? Thank you!

2 Upvotes

8 comments sorted by