Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I know this thread is very old but, if anyone stumbles upon it I wanted to add a solution.
Rather than appending each segment with a patient identifier from the MSH and PID segments. Anyone trying to do what the original poster is trying to do would just need to create a new column or table in their database with a trigger to create a unique message identifier as that message is ingested. This way each row is linked back to the same unique ID along with any information you've extracted from each segment. This is basic database record key management and is exactly what relational databases are for.