Monday, October 6, 2008

Postfix, Infix and Prefix

I recently started working with ORU messages that send observation data (lab, pathology etc).
I pulled some messages off our feed and ran them through my template schema only to have them fail.
It took me a bit but I realized that unlike the ADT feed segments weren't terminated by a "|" but rather would flow right into the next segment.

So instead of

|||2.3|EVN

I got

|||2.3EVN

I was baffled. I worked on it for awhile and finally sent off a quick message to my contact at our integration vendor Summit.
I got a response back pretty quick telling me to check the Child Order settings and change them infix.

This worked beautifully.

I'm the kind of guy that likes to understand why things work, so I did some research into Infix, Postfix and Prefix.

As far as I understand it (and feel free to post a comment if you think I'm wrong)....

--using | as the delimiter

Postfix refers to where the delimiter appears after the data.

Field|Field|{next record}

Infix refers to where the delimiter appears inbetween the data

Field|Field{next record}

Prefix refers to where the delimiter appears before the data

|Field|Field{next record}


There you have it, the results of at least 45 minutes of research!

No comments: