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