Hi everybody, I’m hoping someone can help me.
I’m still new to XLT so I’m learning as I’m going.
I’m working on a project where the receiving system is requesting the department be populated in AIL segment field 1. Below is the segment example from the Testing Tool. I have a Copy of AIL3 to AIL1 in my XLT translation which is literally the department ID and room that is being sent from the sending system.
2(0).3(0).0(0).AIL(0) : >|JH CATH1||^JH CATH1<
However, the receiving system needs only the department name so I’d need to format it as shown in the example below.
JH CATH1 = CATH
I know I can trim off the JH and 1 but we will eventually send other departments. For this I created a table for the conversion purposes and have it built as such…
JH CATH1 = CATH
JH CATH2 = CATH
JH CATH3 = CATH
I’m not sure how to build out the translation properly to utilize this function. I’m thinking I’d need to do an Iteration followed by an IF where if JH CATH 1, 2 and 3 then look at the table and do a copy to AIL 1 but I’m not entirely sure and figured I’d ask before going through a lot of trial and error. Could someone please shed some light and assist?
Thank you for your help!