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
Cloverleaf
HL7 Field Mapping...
Tom Rioux
Has anyone attempted to write a script or proc that would take the HL7 field mapping and change each field within an xlate according to the following example:
0(0).PID.00106.[0] to 0(0).PID.#3.[0]
I like using the # better than having the 5 digit numbering scheme. I would like to find an easy way to change the xlate without having to go in and touch every field. I understand that there may me user-defined segments (Z segments) that would not be able to get updated necessarily, but if it could get the bulk of it, that would be great.
Tom
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Tom,
Let us know when you have that written and tested
I suspect that will be a non-trivial task as the position of the field is based on the position in a segment.
So one would need to look at the particular variant and determine where within the message the segment is and where within the segment the field is.
Since the same field can reside in different segments and the same segment can actually reside within different groups within the same message that could be a challenge. Especially challenging might be determining how to navigate the Cloverleaf(R) variant definitions.
I have some ideas - but I think it is just easier to modify the Xlate as I need to. In 5.6 the relative number notation is the default for new Xlates.
Tom Rioux
Hey Jim,
I started working on something yesterday afternoon for a bit. I was attempting to use the the "fldmap" file from the hl7 directory under the root. However, after studying the file and all of the xlates and hl7 variants, I realized that there are too many variables to consider when attempting to do this. I thought of everything you mentioned and then some. I don't think my tcl/scripting skills are accomplished enough to do this justice. It would take a power far, far greater than me (Charlie!
) to get something of this magnitude done.
Tom
Charlie Bursell
Looked like a bit of a challenge so, since I had a couple of hours free yesterday I came up with this.
USAGE:
Tom Rioux
Charlie,
This proc is awesome. Thanks so much. I did make one adjustment to it after downloading it. I kept getting the following error:
Serious Error!! Offset not found in Segments array - ABORTED!!!"
It appears as though that it had something to do with a possibly the field notation (i.e. in this case 90058) not having an offset in one of the variants that is being used. So, what I did was commented that part out and put a continue in there. In those cases where it would have normally aborted, it left the original field notation in place. These are few and far between and can be adjusted manually as needed. Does what I did sound right according to the logic in your script? I tried putting echo's out to make sure I knew what I was seeing come in and go out.
Thanks again...Tom
Charlie Bursell
What you did will keep the script from aborting but what about the undefined field? That was the reason I aborted at that point to let you know you had a malformed variant.
I pull the name of the segment and the field address from the statement.
I then look for that segment first in the defined variant. If the segment is not found there I pull it from the root. I then number the fields from 1 - x
If that field is not defined in the segment using it, it is a problem that should be fixed.
I guess I could issue a warning and simply skip that file.
With that said I would not be surprised if you find troubles I tested it against about 25 - 30 Xlates I had.
Tom Rioux
Charlie,
This particular Xlate I'm testing with has a different inbound and outbound variants. The segment size is larger in the inbound than in the outbound. It is a Z-segment and is pretty much only used to read from inbound. We don't do hardly any mapping to this segment outbound. I'm assuming that since the field exists in the inbound variant and the not in the outbound variant, that is why it is throwing the error.
Would this be considered a malformed variant? Should I go in and update all of the variants that have this type of issue?
Thanks for all your help!!!
Tom
Charlie Bursell
No, the script uses the OB variant for OUT and tilde prefixes. It use the IB variant for all else
Charlie Bursell
Tom:
If you send me the Xlate file and variant in a zip I will test it. Name the zip like zpp or something insteado zip as our lovely IT guys do not allow zips
cbursell@healthvision.com
Charlie Bursell
Tom Rioux pointed out a problem.
Tom Rioux
Charlie,
It appears I may have run into another issue. I'm attempting to go through your code but my head hurts trying to understand it all. I bow to the master.
ANYWAY....what I'm seeing, when I run the script against some xlates, is that it doesn't appear to reaching into nested IF statements or IF statements within iterates.
Can you check that xlate I sent you? If you run the script against and then check a segment like the AL1 segment. When I ran it, it didn't change any of the notations in that segment. Hopefully, I'm not using an older copy. I will download the script again and try it again.
Thanks...Tom
Charlie Bursell
When I get one of those round tuits, I'll look at it
Tom Rioux
I know what you mean. In between working on xlates and getting ready for go-lives, boss has laid some round tuits on my desk that are labeled "documentation". I hate those kind of round tuits but they are a necessary evil. :twisted:
Tom
Max Drown
dokuwiki has made my documentation life soooooooo much easier.
Charlie Bursell
I guess we will keep trying until we get it right
Please remember that I am doing all of this pro bono 0 no pay
The problem was not in parsing it was in the regular expression that extracted the field addresses (addrPat). It did not take into account iterations like (%s1), etc. It was looking for all numbers. Besides the regexp was much more complicated than it should be.
Try the new one
Tom Rioux
I understand about the pro bono and do thank you very much for all of the work you have done on this. I'm sure many others are gonna take advantage of this as well. I will test this out and let you know.
Tell you what Charlie...I'll buy your next round of golf!!
Tom Rioux
THANKS CHARLIE! WORKS LIKE A CHAMP!!!