I am hoping to be able to selectively format certain words in a virtual column that creates a concatenation of a patient’s room number and certain medical flags that may be enabled for that patient. The current expression is:
IFS(
ISBLANK([Flags]),[Room],
ISNOTBLANK([Flags]),CONCATENATE([Room], " - ", [Flags])
)
I discovered the IFS() expression today
and was happy to use it in a simple manner as above to trim the unnecessary hyphen if there were no flags for a patient.
What I am wondering now is if this expression can further be formatted to say something like
If [ Flags] contains HFrEF, HFpEF, or a handful of other heart failure related conditions, add these to the concatenated value but place them in parenthesis.
So, for example, if our fake patient Demi Lovato were in room 8675309 and was flagged for HFrEF, Gout, and Diabetes, the column value would show
8675309 - Diabetes, Gout, (HFrEF)
