I am working on Lua and I have this kind of code
MapMessage(Process["ks.MSH"][1], MsgIn, mg)
MapEvent(Process["ks.EVN"][1], MsgIn, mg)
MapPatient(Process["ks.PID"][1], MsgIn, mg)
MapVisit(Process["ks.PV1"][1],MsgIn,mg)
In above statements, MapMessage, MapEvent, MapPatient, MapVisit are the functions and ks.MSH, ks.EVN, ks.PID, ks.PV1 are the tables in the database. Now, I want to automate a part of this process using gmatch function provided in lua and I have this so far
for u in string.gmatch(S, "([^,%s]+)"), 1 do
l[k] = u
_G["Map"..l[k]](Process["ks[l[k]]"][1], R[1])
k=k+1
end
but the concatenation part in the third line of above code is not really making it ks.MSH, ks.PID, ks.PV1 e.t.c, so please suggest what needs to be there in place of (Process["ks[l[k]]"][1]to get s.MSH, ks.PID, ks.PV1 e.t.c
_G["Map"..l[k]](Process[ks[l[k]]][1], R[1])S?