I have data coming out in a MFN message, (PRA-6 repeating field) that does not have a predictable order in the repetitions. It is for provider IDs for various institutions (medicare, medicaid, etc….)
For instance:
…|0101033952^SL^VA^20121031~BM0429515^DEA^US^20120131~C62467^UPIN^^~197545V54^Medicare UPIN^^~7374101^Medicaid UPIN^^~1932195914^NPI Number^^~^SAFEWEB^^20090630~^SAFETY^^20501031~300178^Priv Plus Number^^|…
The first sub component is an ID number and the second subcomponent is a descriptive term (or”ID Type”). (the 3rd and 4th subcomponents are not relevent to this particular xlate)
The xlate I need to write calls for locating the “Medicare” ID number and moving it to be the sole value in a ZPH-4 field. I have constructed the variant to include this ZPH segment.
How do I construct an xlate to check to see which repetition (unpredictable) has “medicare” for it’s second subcomponent so therefore copy the first sub-component (the actual ID number) of that particular repetition iteration to the ZPH-6 ???
Can this be done in an xlate?
I’m not so good at tcl scripting yet –
Thanks,
Tom Arrowsmith
(703) 779-5474