infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
Need to swap the PID3 field to MDM file
benrpa
Hello everyone,
I receive an MDM format from a publisher with two values in the PID 3 field.
When there are two values in this field, I need to retrieve the value 2 in position 1.
Is there a script or manipulation that allows this?
example transform 1 to 2:
message type 1:
PID|||22222222^^^&1.2.34.8&ISO^INS~100456789^^^^PI||aa^bb^bb aa^^^^L~bb^aa^^^^^D||1966|F|||^^^^^^B^^75||||||||||||||||||||||V
message type 2:
PID|||100456789^^^^PI||aa^bb^bb aa^^^^L~bb^aa^^^^^D||1966|F|||^^^^^^B^^75||||||||||||||||||||||V
I also have a problem with the formalism not being respected.
There is an OBR line between PV1 and TXA. For this publisher, however, OBR is in the MDM format, which is as follows:
MSH
EVN
PID
[ PV1 ]
[ OBR ]
[ TXA ]
[ OBX ]
Is there a way to retrieve the standard format?
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
For the PID-3 issue, there is a subcomponent expressed (the & is the standard HL/7 subcomponent separator). Assuming those are there because there really are subcomponents and not erroneously placed text, one would use subcomponent notation to get at those items. It appears the subcomponents are to the 4th component so your copy would look something like this: ...PID#3.(0).[5][0] and PID#3.(0).[5].[1].
However, PID-3.6 is usually Mother's Maiden Name and so I am not sure those are not ampersands erroneously entered into the text rather than subcomponents. If that is the case, the source system should have escaped them like this: \T\ (assuming \ is what is specified in MSH-2 escape character - \ is the standard).
As for the message structure, I am not sure I fully understand your question but if you want the standard structure for a ive HL/7 2 version Message/Event Type, use the HL/7 Configurator. That defaults to the standard message structure.
Jim Kosloskey
Sorry, I mis-read the message. It is PID-3.5 but if you want the subcomponents the method remains the same.
I see in the first message there are repeating fields (missed that - eyes getting old). Is that what you want to know how to get to?
If so, I see 2 choices:
use the field repetition position in the address Path like this: ...PID#3.(0) and PID#3.(1).
Use the ITERATE Action to work through the repetitions.
I do not think there is a need for Tcl here.
Charlie Bursell
What you really seem to want is the second iteration of the PID.3 field, not the second value.
Is it always this way? If so, simply copy the second iteration of PID.3 to PID.3.
If not you need some method to ascertain if there is a second iteration. What do you do then?
Jason Russell
I would iterate and key off your assigning authority or assigning facility (PID 3.4 or 3.5), then run a simple if statement to grab the correct ID. That way it doesn't matter if there is a change in their system, you will always get the ID you want. Essentially:
Iterate on basis of field PID-3
if PID 3.5 eq =PI
pathcopy PID 3 (iteration %f) to outbound PID 3
We do this frequently, and I can pull the code for you in our system if you need a direct view.