splitting PV1 fields with mulitple providers

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf splitting PV1 fields with mulitple providers

  • Creator
    Topic
  • #54147
    Robert Denny
    Participant

      We are working on emulating a current interface that Medicity has configured for us.

      in one test example we have sent more than one provider in PV19. And we configure the providers id as

      CORNWAND^CORNWELL^ANDREW^A.^^^^^EPIC^^^^PROVID~GALLAJAM^GALLANT^JAMES^D.^^^^^EPIC^^^^PROVID

      Next we need to strip off all the data from the 3rd carrat on. My logic had worked but I notice that sometimes we have more than one provider as in the above example. Not sure how to figure out if there is more than one and then how to grab the first 3 sub field of each set of provider data.

      Outcome should look like this.

      CORNWAND^CORNWELL^ANDREW~GALLAJAM^GALLANT^JAMES

      My logic was getting CORNWAND^CORNWELL^ANDREW~GALLAJAM^GALLANT^JAMES^D.^^^^^EPIC^^^^PROVID

    Viewing 2 reply threads
    • Author
      Replies
      • #80337
        James Cobane
        Participant

          Robert,

          Since this is a repeating field, you’ll need to ITER through and map only the desired components to the outbound side within your iteration.

          Hope that helps.

          Jim Cobane

          Henry Ford Health

        • #80338
          Robert Denny
          Participant

            Thanks I could probably do that easy enough if I had built an xlate to process the messages. I am looking for any suggestions on doing it with a tcl proc.

            I had it working until I found that it would fail if the field was blank or if it had more than on provider. Now I have to do some modifications to my proc.

          • #80339
            James Cobane
            Participant

              Ah….so you’ll need to split the field on the repetition separator (~ or whatever your MSH:2 specifies as the repetition separator) and loop through the resulting list, using your code on each repetition, then re-join the new updated repetitions and replace the field with your updated one.

              Jim Cobane

              Henry Ford Health

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