I have system that can’t parse the hl7 escaped characters. Is there a way to code in the dtl that if (\T\, \E\, etc) are found anywhere in the hl7 message to replace with (&, \ etc)?
Thx,
Gary Atkinson MS, BS MT (ASCP)
Integration Programmer
Information Technology Department
Baltimore Washington Medical Center
University of Maryland Medical System
BWMC Office:410-787-6777
Cell:443-883-5785
This email may contain protected health information about an identifable patient. State and federal law protect the confidentiality of this information. If you are not the intended receipient, you are prohibited from using, disclosing, reproducing, or distributing this information. You should immediately notify the sender by telephone or email, and delete this document.
--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
I want to search the entire message. Here is an example test messageà
1 MSH | ^~\& | · | · | · | · | 20120131182602 | RISTECH | ORM ^ O01 | 772 | P | 2.3 | · | · | AL | · | · | · | · | · | ·
2 PID | 1 | · | 1300654 ^ · ^ · ^ N ^ MR | · | FUJI ^ OP | · | 19850621 | F | · | 1 | 5600 EAST ROAD ^ · ^ BALTIMORE ^ MD ^ 21212 ^ US ^ · ^ · ^ · | · | (410)443-7895 | · | · | 1 | · | · | 212-45-7896 | · | · | · | ·
3 PV1 | · | · | CAFC ^ · ^ · ^ 4101 ^ · ^ · ^ · ^ · ^ · ^ · ^ BWMCDEP | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ·
4 ORC | NW | 31446626 ^ EPC | 7708818 ^ EPC | · | S | · | · ^ · ^ · ^ · ^ · ^ ROUTINE | · | 201201311826 | RISTECH ^ RADIOLOGY ^ TECHNOLOGIST ^ · ^ · | · | 511 ^ RAMIREZ ^ JORGE ^ · ^ · ^ · ^ · ^ · ^ BWMCSTAR ^ · ^ · ^ · ^ SER | 4141011020 ^ · ^ · ^ 4101 ^ · ^ · ^ · ^ · ^ BWMC CAFC | (410)768-0919 | · | · | · | · | · | · | · | · | · | · | · | · | · | · | O | ·
5 OBR | 1 | 31446626 ^ EPC | 7708818 ^ EPC | 1170 ^ CT CHEST \T\ ABDOMEN \T\ PELVIS W/ CONTRAST ^ BWMC RAD ^ · ^ CT CHEST ABD PELVIS W CON | · | 20120131 | · | · | · | · | 44 | · | · | · | · | 511 ^ RAMIREZ ^ JORGE ^ · ^ · ^ · ^ · ^ · ^ BWMCSTAR ^ · ^ · ^ · ^ SER | (410)768-0919 | · | · | · | · | · | · | CT | S | · | · ^ · ^ · ^ · ^ · ^ ROUTINE | · | · | · | · ^ The signs and symptoms with \T\ (amp) \R\ (Tilda) \S\(upper carrot) \E\ (Backslash) /(Forward slash) ' (aposterphe) @ (at) | · | · | · | · | 201201311845 | · | · | · | · | · | · | · | · | ·
6 NTE | 1 | · | The comment with \T\ (amp) \R\ (Tilda) \S\(upper carrot) \E\ (Backslash) /(Forward slash) ' (aposterphe) @ (at)
7 NTE | 2 | · | Pregnant?:_No | · | ·
8 NTE | 3 | · | Signs and Symptoms:_The signs and symptoms with \E\T\E\ (amp) \E\R\E\ (Tilda) \E\S\E\(upper carrot) \E\E\E\ (Backslash) /(Forward slash) ' (aposterphe) @ (at) | · | ·
9 NTE | 4 | · | History/Additional Information:_History with \E\T\E\ (amp) \E\R\E\ (Tilda) \E\S\E\(upper carrot) \E\E\E\ (Backslash) /(Forward slash) ' (aposterphe) @ (at) | · | ·
Thanks,
Gary
The un-escaped characters will then be treated as separators in any later processing, so results are unpredictable if you do anything to the message after this point.
You could just find separators that don’t clash with the data and specify those in the BO. All the escaping will then be taken care of properly.
But if the system can’t handle escaped characters, it may not handle arbitrary separators.
dave
From: ensemble-in...@googlegroups.com [mailto:ensemble-in...@googlegroups.com]
On Behalf Of Noé Andrés Rodríguez González
Sent: Wednesday, February 01, 2012 10:10 AM
To: ensemble-in...@googlegroups.com
Subject: Re: [InterSystems-EnsHlth] replacing hl7 escaped characters
Hi
The receiving system is treating them as text, they don’t understand that \T\ == & etc. Ideally I would want control over which segment and fields I do the replacing.
Thanks,
Gary
Hi Gary
Can you not just use the escape and unescape methods defined in the segment class.
E.g.
source.GetSegmentAt("PID",source.Separators).Unescape(source.{PID:PatientName.familyname})
Dave
My point was that the message only escapes the & because it is the subcomponent separator. If you could specify something else as the subcomponent separator (a setting on the BO config item), the BO would un-escape the & before it went over the wire. But that depends on you finding an alternative to & that is not in your text and the receiving application being able to handle a different subcomponent separator.
dave
Ah didn’t know about that! Still learning J
Thanks,
Gary
Hi Gary
You should probably be aware that if you are planning on unescaping OBX segments that are greater than 32k then you will have problems. Let me know if you do and we can go through it.
Regs
No OBX’s in used. Trying to use Dave suggestion, but I believe my syntax is wrong?
<code>
<![CDATA[
source.GetSegmentAt("ORCgrp().OBRuniongrp.NTE()",source.Separators).Unescape.{ORCgrp().OBRuniongrp.NTE():Comment()})
]]>
</code>
Ah, no need for a code block. The example was mearly the ‘value’. Here’s a more complete example…
<assign property='target.familyname'
value='source.GetSegmentAt("NK1").Unescape(source.{NK1(1):Name(1).familyname})'
action='set'/>
When testing I receive a <INVALID OREF> error. Is my syntax wrong?
<assign property='target.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)}' value='source.GetSegmentAt("ORCgrp(k2).OBRuniongrp.NTE(k4)").Unescape(source.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)})' action='set'/>
Hi Gary
That may be the result of the segment not existing. You should test for it beforehand…
<if condition='source.{<segment>}=""'> // i.e. does not exist or is empty
<true>
// Set value as desired or otherwise
</true>
<false>
<assign …………../>
</false>
Here is the test message I am using, the NTE segment is there.
MSH|^~\&|||||20120131182602|RISTECH|ORM^O01|772|P|2.3|||AL||||||
PID|1||1300654^^^N^MR||FUJI^OP||19850621|F||1|5600 EAST ROAD^^BALTIMORE^MD^21212^US^^^||(410)443-7895|||1|||212-45-7896||||
PV1|||CAFC^^^4101^^^^^^^BWMCDEP||||||||||||||||||||||||||||||||||||||||||||||||
ORC|NW|31446626^EPC|7708818^EPC||S||^^^^^ROUTINE||201201311826|RISTECH^RADIOLOGY^TECHNOLOGIST^^||511^RAMIREZ^JORGE^^^^^^BWMCSTAR^^^^SER|4141011020^^^4101^^^^^BWMC CAFC|(410)768-0919|||||||||||||||O|
OBR|1|31446626^EPC|7708818^EPC|1170^CT CHEST \T\ ABDOMEN \T\ PELVIS W/ CONTRAST^BWMC RAD^^CT CHEST ABD PELVIS W CON||20120131|||||44|||||511^RAMIREZ^JORGE^^^^^^BWMCSTAR^^^^SER|(410)768-0919|||||||CT|S||^^^^^ROUTINE||||^The signs and symptoms with \T\ (amp) \R\ (Tilda) \S\(upper carrot) \E\ (Backslash) /(Forward slash) ' (aposterphe) @ (at) |||||201201311845|||||||||
NTE|1||The comment with \T\ (amp) \R\ (Tilda) \S\(upper carrot) \E\ (Backslash) /(Forward slash) ' (aposterphe) @ (at)
NTE|2||Pregnant?:_No||
NTE|3||Signs and Symptoms:_The signs and symptoms with \E\T\E\ (amp) \E\R\E\ (Tilda) \E\S\E\(upper carrot) \E\E\E\ (Backslash) /(Forward slash) ' (aposterphe) @ (at) ||
NTE|4||History/Additional Information:_History with \E\T\E\ (amp) \E\R\E\ (Tilda) \E\S\E\(upper carrot) \E\E\E\ (Backslash) /(Forward slash) ' (aposterphe) @ (at) ||
Thanks,
Gary
Hi Gary
I have done some testing and it appears that the GetSegmentAt method, when used in DTL, will not accept variable keys. It appears to work only when the key is explicitly set. This is causing the invalid oref error
I would recommend opening a WRC issue for this problem.
Hi Gary,
You may want to tray changing your code as highlighted and see it makes a difference.
<assign property='target.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)}' value='source.GetSegmentAt("ORCgrp(“_k2_”).OBRuniongrp.NTE(“_k4”_)").Unescape(source.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)})' action='set'/>
Thanks,
Laura Erman
Sr. Project Manager - Integration
Health Information Technology
NorthShore University HealthSystem
4901 Searle Parkway, Suite 210
Skokie, IL 60077
Phone: 847.982.5563
Fax: 847.982.5378
Email: ler...@northshore.org
Legal Disclaimer: Information contained in this e-mail, including any files transmitted with it, may contain confidential medical or business information intended only for use by the intended recipient(s). Any unauthorized disclosure, use, copying, distribution or taking of any action based on the contents of this email is strictly prohibited. Review by any individual other than the intended recipient does not waive or surrender the physician-patient privilege or any other legal rights. If you received this e-mail in error, please delete it immediately and notify the sender by return email.
Made a typo. It should read
<assign property='target.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)}' value='source.GetSegmentAt("ORCgrp(“_k2_”).OBRuniongrp.NTE(“_k4_”)").Unescape(source.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)})' action='set'/>
Thanks,
Laura Erman
Sr. Project Manager - Integration
Health Information Technology
NorthShore University HealthSystem
4901 Searle Parkway, Suite 210
Skokie, IL 60077
Phone: 847.982.5563
Fax: 847.982.5378
Email: ler...@northshore.org
From: Erman, Laura
Sent: Thursday, February 02, 2012 7:17 AM
To: ensemble-in...@googlegroups.com
Subject: RE: [InterSystems-EnsHlth] replacing hl7 escaped characters
Hi Gary,
You may want to tray changing your code as highlighted and see it makes a difference.
<assign property='target.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)}' value='source.GetSegmentAt("ORCgrp(“_k2_”).OBRuniongrp.NTE(“_k4”_)").Unescape(source.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)})' action='set'/>
Thanks,
Laura Erman
Sr. Project Manager - Integration
Health Information Technology
NorthShore University HealthSystem
4901 Searle Parkway, Suite 210
Skokie, IL 60077
Phone: 847.982.5563
Fax: 847.982.5378
Email: ler...@northshore.org
Legal Disclaimer: Information contained in this e-mail, including any files transmitted with it, may contain confidential medical or business information intended only for use by the intended recipient(s). Any unauthorized disclosure, use, copying, distribution or taking of any action based on the contents of this email is strictly prohibited. Review by any individual other than the intended recipient does not waive or surrender the physician-patient privilege or any other legal rights. If you received this e-mail in error, please delete it immediately and notify the sender by return email.
I have open ticket with intersystem. Another co-worker of mine wrote a small function, which seems to work.
Thanks,
Gary