Question Martin Browne · Apr 24

Special character appearing in downstream system but not seen in HL7 message.

Hi,

We're having an issue with some messages being sent to a downstream system from Healthshare.  Part of the free text in the NTE segment is displaying with special characters on the system front-end but is not present in the HL7 message that we send to them.  We are guessing that this is a result of some of the text being copied and pasted from something like MS Word. The '?' on their system is just representing an invalid character. 

Is anyone aware of a way to prevent this occurring? We are sending the messages using the 'cp1252' encoding.

Sent from us to system

What displays on the system front end

Thanks, 

Martin

Product version: IRIS 2022.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 7 for x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:13:58 EDT [HealthConnect:3.5.0] [HealthConnect:3.5.0]

Comments

Eduard Lebedyuk · Apr 24

It's probably not a whitespace, but some other character, use zzdump to check out which character you're getting, after that you can use $translate or $zstrip to remove/replace this character.

0
Eduard Lebedyuk  Apr 25 to Eduard Lebedyuk

Here's a sample zzdump custom function for DTL:

Class Utils.Functions Extends Ens.Util.FunctionSet
{

/// w ##class(Utils.Functions).ZZDUMP("abc")ClassMethodZZDUMP(var) As%String
{
	set id = $random(100000000000000000)
	while$d(^ISC.AsyncQueue(id)) {
		set id = $random(100000000000000000)
	}
	set str = ""try {	
		$$$TOE(sc, ##class(%Api.Atelier.v1).MonitorBeginCapture(id))
		if '$data(var) {
			write"<UNDEFINED>"
		} else {
			if '$isobject(var) {
				zzdump var
			} else {
				if var.%IsA(##class(%DynamicAbstractObject).%ClassName(1)) {
					zzdump var.%ToJSON()
				} elseif var.%IsA(##class(%Stream.Object).%ClassName(1)) {
					do var.Rewind()
					zzdump var.Read()
				} elseif var.%IsA(##class(EnsLib.HL7.Message).%ClassName(1)) {
					zzdump var.OutputToString()
				} else {
					// zzdump will output OREF string.zw var 
				}
			}
		}
		$$$TOE(sc, ##class(%Api.Atelier.v1).MonitorEndCapture(id))
	
		for i=1:1:^ISC.AsyncQueue(id,"cout","i") {
			set str = str _ ^ISC.AsyncQueue(id,"cout",i) _ $$$NL
		}
	} catch ex {
		do##class(%Api.Atelier.v1).MonitorEndCapture(id)
	}
	kill^ISC.AsyncQueue(id)
	quit str
}

}
0