How to implement special character stripping in Healthshare DTL Transform
I have an incoming data partner who occasionally passes a non-ASCII character in some free text fields which is causing some downstream systems to be unable to accept the message. Ideally I'm looking for some way to just process the entire message as a data transformation applied in the business rule, as we already have a pre-processor transform to remove the PD1 segment.
{ Set $ZT="Trap",tSC=$$$OK
Set pResponse = pRequest.%ConstructClone()
//Clearing PD1 segment from the message
set ind=""
Set pPD1seg = pResponse.FindSegment("PD1", .ind)
If pPD1seg '="" {
set res=pResponse.RemoveSegmentAt(ind)
}
set pRequest = pResponse
Exit
Quit tSC
Trap
Set $ZT=""
Set tSC = $$$EnsError($$$GeneralError, "Problem handling unwanted PD1 segment")
Goto Exit
}