From: "Atkinson, Gary" <GAtkin...@bwmc.umms.org>
Date: Thu, 2 Feb 2012 08:34:52 -0500
Local: Thurs, Feb 2 2012 8:34 am
Subject: RE: [InterSystems-EnsHlth] replacing hl7 escaped characters
I have open ticket with intersystem. Another co-worker of mine wrote a small function, which seems to work. Thanks, ________________________________ From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of Erman, Laura Made a typo. It should read <assign property='target.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)}' value='source.GetSegmentAt("ORCgrp("_k2_").OBRuniongrp.NTE("_k4_")").Unesca pe(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 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"_)").Unesca pe(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: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of David Blake 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. Dave From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of Atkinson, Gary 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^RADI OLOGY^TECHNOLOGIST^^||511^RAMIREZ^JORGE^^^^^^BWMCSTAR^^^^SER|4141011020^^^4 101^^^^^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-09 19|||||||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, ________________________________ From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of David Blake 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> Dave From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of Atkinson, Gary 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(sourc e.{ORCgrp(k2).OBRuniongrp.NTE(k4):Comment(1)})' action='set'/> Thanks, ________________________________ From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of David Blake 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).familynam e})' action='set'/> Dave From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of Atkinson, Gary 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).Unescap e.{ORCgrp().OBRuniongrp.NTE():Comment()}) ]]> </code> Thanks, ________________________________ From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of David Blake 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 Dave From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of Atkinson, Gary Ah didn't know about that! Still learning :-) Thanks, ________________________________ From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of David Blake 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:PatientNa me.familyname}) Dave From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of Atkinson, Gary 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, ________________________________ From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of David Loveluck 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-healthcare@googlegroups.com [mailto:ensemble-in-healthcare@googlegroups.com] On Behalf Of Noé Andrés Rodríguez González Hi It is possible to call a static function in the DTL that parse the string where you want to remove the escape sequences, but probably you have already think about that. 2012/2/1 Atkinson, Gary <GAtkin...@bwmc.umms.org> 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 gatkin...@bwmc.umms.org <mailto:%3cgatkin...@bwmc.umms.org> 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. -- -- Noé A. Rodríguez Glez. -- -- -- -- -- -- -- -- -- -- -- -- 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. -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||