Forum Replies Created
-
AuthorReplies
-
September 26, 2007 at 4:41 pm in reply to: Xlate ‘Birds of Feather’ (BOF) meeting @ User Conference #62344
Jim, Thanks so much for this, I know it will help me and I think it will be a great experience.
See you Monday.
Ricci
Michael, I figured it out, but thanks so much for replying.
Ricci
John and Vince, Thanks so much for the advice, this headed me in the right direction. Jim Koslosky also talked me through this on the phone and gave me great advice and direction on this. The code turned out great and works beautifully.
Thanks,
Again,
Ricci
James, These are both HL7 files, I wasn’t aware there was a place to reformat the
date when it runs through the engine if you are using HL7 on both sides.
I know you can do this with FRL’s, but I didn’t know you can do this with HLR? Where is that?
Thanks,
Ricci
Robert, Thanks for your reply. You were correct, that is what the problem was. I have the code figured out thanks to Michael Hertel and it is running well in my test environment.
Ricci
Michael, I am building my batch by letting all the messages run through the engine and then stopping the outbound thread at 11:59 p.m. each night and moving the file to a different location and then restarting the thread.
How would you do this inside the engine?
This gave the following error:
bad option “equal”: must be compare, first, index, last, length, match, range, tolower, toupper, trim, trimleft, trimright, wordend, or wordstart
while executing
“string equal [string range $seg 0 2] HDR”
(“foreach” body line 2)
invoked from within
“foreach seg $segments {
if {![string equal [string range $seg 0 2] HDR] } {
lappend $seg newsegments
}
}”
I am on version 5.3 on Windows 2003. I changed it to the string range and now it is giving th same error on cequal. I tried just changing that to equal, but it still gave me the same error.
I am writing this outiside the Cloverleaf engine because of having to build a batch, and the version of tcl that I am using for that is 8.0.
Any ideas on the cequal or equal?
Michael, When I tried this it raised an error. See below:
invalid command name “crange”
while executing
“crange $seg 0 2”
(“foreach” body line 2)
invoked from within
“foreach seg $segments {
if {![cequal [crange $seg 0 2] HDR]} {
}
}”
Did I do something wrong?
Michael, I finally have this part down and you’re right the first element does show up as an element even though it isn’t in braces.
Now I need to figure out how to remove all the HDR segements except the first one. I have tried diffent things with the
lsearch regexp $segments {^HDR}
but it doesn’t take the -all switch in version 8.0 and that is what I am on.
Do you have any ideas? Or does anyone have any ideas?
Thanks,
Ricci
Michael, You are SO smart, this worked to get the back-slashes out, but it still isn’t seeing the first segment as a “segment” (not wrapping it in braces) and that is the segment that I need to work with, so I need to be able to “get a hold” of that segment through out the file.
Any suggestions on that?
Thanks so much for you assistance so far!
Ricci
Nora, I tried that and it didn’t work either. Basically, I can’t figure out why it is putting in the back-slashes and thinks the first segment is part of the entire segment???
Thanks,
Ricci
Michael, This didn’t work either, it gives the following error:
bad option “map”: must be compare, first, index, last, length, match, range, tolower, toupper, trim, trimleft, trimright, wordend, or wordstart.
But none of this really should matter because when I read up on the “read” command, it says when it reads the file in it converts the file so all text lines are terminated with n. So I should be able to just use the n as the character to “split” my segments on, but it is still giving me the back-slashes and leaving the first segment as part of one big segment. I can’t figure this one out.
Any other ideas?
Thanks,
Ricci
Steve, Thanks for the suggestion. I tried it and it still isn’t working. I am still getting the same result????
Any other suggestions?
Ricci
Robert, This ended up working great. Thanks so much for the help.
Ricci
Thanks so much to both of you (Jim and Charlie). I ended up using your suggestion, Charlie, because when I tried your’s, Jim, it failed if there wasn’t a date in the field, but otherwise it worked great. It is so great to have this as a resource and I appreciate you guys SO much.
Ricci Graham
-
AuthorReplies