Forum Replies Created
-
AuthorReplies
-
That’s it, Chris… Thanks so much!
Thank you too, Jim, for your response. I tried Chris’ suggestion first and it worked…..
Tom
oops, forgot to paste in the message:
MESSAGE 1
MSH|^~&|ESMT|FH|rcvapp|FH|20120120143635||ORU^R01|20120120143635356|P|2.2||
PID|||1100002||HIM^TEST^K||19990831|F||||||||||000001377E^^^L<
I tried pasting
Thanks!
That did it…..
I am pointing at a sub-component field (STF11.1) and wish to confine it to 26 characters. I have the entire field in the variant set to 106 characters – but did not know of any way to restrict a sub-component to a particular value.
In this case, the sending system, MSOW, can send up to 50 characters in this sub-field (not likely, however) and the downstream can only take 26….
Working for now, with your suggested change……
Max,
I get the following error when trying to use this code within an xlate:
Tcl callout error
erroCode: NONE
errorInfo:
wrong # args: should be “string range string first last”
while executing
“string range [lindex $xlateInVals 0 25]”
Thanks, Jim. Worked great!
Tom
Thanks, Jim. I got your email and will take a look!
Tom
Yes, it is MSOW….
Any elaboration would be welcome!
Tom
Thanks, that gives me a great solution for this issue.
I must say, though, that I would still like to learn more about iteration and properly establishing the basis – as I know I will eventually need to make more use of that.
Thanks for your solution!
Yes, I knew of that solution – however some of the data in the OBX segments I may want to move to another location (thus preserving it) – I guess I can still do this i9f the destination variant no longer has the OBX segments…. Is that correct?
Thanks!
I also have 5.4.1 and was unable to use ct I am assuming it is not part of 5.4
any thoughts?
Tom
I have acheived the desired result by concatenating the OBR-4.3 and OBR-4.1 together to get a unique identifier for the orders, placing the result in the MSH-14, then using a table that identifies which of these resulting values should be recognized as ECG orders and if so, place the value EKG in the MSH-13.
Then I have a more simple tcl kill script that kills any messages that do not have the value EKG in the MSH 13.
So the pressures off….
However, looking at the various solutions that people offered – I want to clarify that the alternative route I was looking to go down was how to kill based on the ECG or EKG values being somewhere embedded in a longer string. It seems that the folks that give the procedures names here have no idea of a naming convention – and the only thing I could of hung my hat on is the fact that somewhere in the procedure name the characters ECG or EKG where there.
So I need the language to do that in a tcl script – but as this was a production issue I decided to pursue the solution I knew would work (Now I have a table to maintain, though!)
So now that the dust has settled, I would love to pursue the other method of identifying characters within a string – so that next time I can have a more elegant solution.
Still open to comments… I am very thankful for the suggestions and help offered here! This forum has often provided me with workable solutions and has help me to progress with my skills.
Thanks!
Tom
I would love to see an example. Thanks!
Thanks Tom, Actually, my predecessor who mentored me a year ago when I took this job left me with the impression that the only alternative for killing messages was a tcl script.
This is the second time I’ve heard that messages can be suppressed form within an xlate.
Can you tell me what the pro’s and con’s are of each way – I’d like to learn if using an xlate and suppressing is a methodology I should be taking advantage of.
I would be very interested to see your example – and also interested in how you write it out to a log file.
Please feel free to call me directly if that is easier …
Anyone else who has thoughts on “xlate-suppress” vs “tcl kill”, please chip in!
Tom – (703) 779-5474
-
AuthorReplies