Unescaped & or ^ in OBX-5 FT from clinic
Closed this issue · 1 comments
I am receiving Unescaped & or ^ in the OBX-5 when a lab is sending Formatted Text (FT) such as links or html link tags (www.medical-website.com?param1=value1¶m2=value2
)
I know that the clinics should be escaping these characters with \T\ and \S\ but the labs are not doing this.
Is there any way to create a custom parser for OBX-5 that will skip the component and subcomponent delimiter parsing?
(I would prefer to not have to pre-process the file with regex to escape those characters, as that solution seems very fragile)
Or are there any other solutions for this issue?
(I found someone else encounter this issue too: https://stackoverflow.com/questions/8935497/ampersand-character-in-obx-segment-causing-problems-hl7-formatting)
OBX Example
OBX|1|FT|HTML^Display format in HTML^AUSPDI|1|<HTML><P>This report has been forwarded to "DOCTOR, Dr Demo" from "TEST" with the following comments:<br />"TESTING HTML URL"<br /><br /></P><B><A HREF="http://www.healthlink.net">CLICK HERE TO VIEW THE IMAGES (2)</A></B><BR><BR><br><U><STRONG>CHEST X-RAY</STRONG></U><br><br><U><STRONG>HISTORY</STRONG></U><br>Left lateral chest wall pain. Previous breast surgery and axillary lymph<br>node resection. <br><br><U><STRONG>FINDINGS</STRONG></U><br>The prior left sided breast and axillary surgery is noted along with<br>insertion of bilateral breast prostheses. There is also a surgical clip in<br>the left upper quadrant and there may have been a prior splenectomy. <br>Allowing for this, no pulmonary parenchymal mass is seen to suggest a<br>metastatic deposit. There is minor tenting to the dome of the left<br>hemidiaphragm which would be compatible with postinflammatory scarring<br>(possibly related to prior the prior surgery and/or radiotherapy). No<br>pleural fluid is seen. The heart is not enlarged and the hilar complexes<br>have a normal configuration. There is no apparent widening of the superior<br>mediastinum. <br>No advanced bony destructive lesion is detected. <br><br><U><STRONG>COMMENT</STRONG></U><br>No definite evidence of metastatic disease identified but if a skeletal<br>deposit is still clinically suspected then further assessment with an<br>isotope bone scan is suggested. <br><br>Thank you for referring this patient.<br><br><U><STRONG>Mr Radiol Ogist</STRONG></U><br><br><br></HTML>||||||F
Specifically "forwarded to & quot;DOCTOR, Dr Demo & quot; from"
Hi,
I'm not sure if this will work in your case, but if you use NHapiTools you can use the GenericMessageWrapper class to create a custom implementation of a segment. But then again, it is probably going wrong at parser level not at segment level (haven't tested that yet, but since the & is relevant for the message structure).
So I think you should either fix this in pre-parsing or get the sending party to either escape correctly or change the message header to use a different character than '&'.