xlate help

  • Creator
    Topic
  • #52216
    Tom Arrowsmith
    Participant

      Hi,

      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

    Viewing 2 reply threads
    • Author
      Replies
      • #73446
        Jim Kosloskey
        Participant

          Tom,

          That is a field repetition.

          ITERATE through the field (may need to be a nested ITERATE depending on the variant and usage).

          Then inside the field ITERATE use an IF Action to check to see if the appropriate component in that iteration contains the text you want. Then if the IF is true, COPY the component(s) you want for that repetition to wherever you want.

          One question to ask is what should you do if you do not find the text in any of the repetitions.

          I don’t see any need for Tcl.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #73447
          Michael Lacriola
          Participant

            What Jim said. BTW, is this an MSOW interface? Looks awfully familiar . If is MSOW, wait till you get to the adress and phone number piece…

          • #73448
            Tom Arrowsmith
            Participant

              Yes, it is MSOW….

              Any elaboration would be welcome!

              Tom

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.