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
Read Only Archives
Cloverleaf
Tcl Library
Removing blank OBX segments and renumbering
Julie Brandt
I have a message that is sending across multiple blank obx lines. I need to remove those lines then renumber the obx. I currently have the tcl proc that gets all of the obx fields but when I try to add a IF statement it's just not doing what I want. Here is a copy of my message and what I need it to look like.
1(0).1(0).1(53).OBX(0) : >|54|TX|||regular basis using proper specimen collection technique.|<
1(0).1(0).1(54).OBX(0) : >|55|TX||| |<
1(0).1(0).1(55).OBX(0) : >|56|TX|||CODES: Cervical / Endo|<
1(0).1(0).1(56).OBX(0) : >|57|TX||| |<
1(0).1(0).1(57).OBX(0) : >|58|TX|||PROCEDURES: PAP(THINLAY)SC (11/17/14-1043)|<
1(0).1(0).1(58).OBX(0) : >|59|TX||| |<
1(0).1(0).1(59).OBX(0) : >|60|TX||| |<
1(0).1(0).1(60).OBX(0) : >|61|TX||| |<
Here is what I need it to look like
1(0).1(0).1(53).OBX(0) : >|54|TX|||regular basis using proper specimen collection technique.|<
1(0).1(0).1(55).OBX(0) : >|55|TX|||CODES: Cervical / Endo|<
1(0).1(0).1(57).OBX(0) : >|56|TX|||PROCEDURES: PAP(THINLAY)SC (11/17/14-1043)|<
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Julie,
First issue is they are sending a space in the OBX-5 and that is the only field you can reliably check for a segment not to be COPY'd.
The IF cannot check for just one character like that so you will need some Tcl to see if the length of the OBX-5 is one and that is a space.
You could have a proc that gives you the length and then use the IF to check to see if that is eq =1 then inside that IF have another IF to check OBX-5 ne = <-- that is a single space there.
If you need a proc to give you the length email me and I will send you one.
Of course you coulld write a proc to do all of the checking above.
Once you have that logic working you will need to manage your own counter for the outbounnd repetitions so you can keep things in order, the set id (OBX-1) can be calculated from your own counter.
If you don't knoow how to manage your own counter let me know.