Noob here. I have a nested for loop that uses two lists that selects specific diagnostic codes from multiple diagnosis columns. It works, but I was wondering if there's a better way to code it.
ColumnList = {"DIAGNOSIS_1", "DIAGNOSIS_2", "DIAGNOSIS_3"};
ValueList = {"E871","O480","J449"};*/
For( i = 1, i <= N Items( ColumnList ), i++,
ColumnItem = ColumnList[i];
Eval(
Eval Expr(
As Constant( col = As Name( Expr( ColumnItem ) ) );
For( j = 1, j <= N Items( ValueList ), j++,
ValueItem = ValueList[j];
all_ip << select where( As Column( col ) == ValueItem, Current Selection( "extend" ) );
);
)
);
);