First, you should probably use !TOKENS(1) instead of !CMDEND. (It basically tells the macro processor that x should be one token, !CMDEND might be any number of tokens.
Second, your concatenation of the variable names is a bit simplistic, you have to use the !CONCAT function, e.g:
if (HR_manager=1) !CONCAT(!x, !UNQUOTE("_complete")) = !CONCAT(!x,!UNQUOTE("_HR")).
I am not sure if !UNQUOTE is needed, but it should not hurt.
I have not tested this, an always have to fiddle a bit with macros, so no guarantees.