how do you use the Unescape in a Transformation?

Would a <code> section work?

How do you pass the source and return something useful to use in the transform?

I got a note comment that has escape sequence in it.

Thank you

If you extended the class make sure that you change the settings on the Business Service to the new class.  Also remember to select the new class when doing the search.  Both I have forgotten many times.

Thank You!!!

Here is what seems to work right now:

Class FCH.HL7.Operation.FileOperation Extends (Ens.BusinessOperation, EnsLib.HL7.Operation.FileOperation) [ Language = cache ]
{ /// From https://community.intersystems.com/post/pointers-creating-operation-file...
/// Nigel Salm, Michel Bruyère, Jeffrey Drumm
Parameter ADAPTER = "EnsLib.File.OutboundAdapter"; Property Adapter As EnsLib.File.OutboundAdapter; Parameter INVOCATION = "Queue"; Method WriteMessage(pRequest As EnsLib.HL7.Message, Output pResponse As EnsLib.HL7.Message) As %Status
{
// Initialise your return status variable and a variable called file
// I use $ZTRAP to trap code errors though TRY/CATCH would be the more modern approach
set tSC=$$$OK,$ZTRAP="Error",file=""
// Create your file name and append to the Adapter Attribute 'FilePath'
// if working with UNIX change the next line of code accordingly
//if $e(..Adapter.FilePath,*)'="\" set ..Adapter.FilePath=..Adapter.FilePath_"\"
if $e(..Adapter.FilePath,*)'="/" set ..Adapter.FilePath=..Adapter.FilePath_"/"
set file=..Adapter.FilePath_"ZLOG_FILE_"_$REPLACE($PIECE(pRequest.GetValueAt("MSH:MessageType"),pRequest.CS,1,2),pRequest.CS,"")_$tr($zdt($h,3),"-: ","")_".txt" if 'tSC quit tSC
$$$LOGINFO("The File Name is="_file)
// You can use the appropriate method in the File Outbound Adapter though I have used the OPEN
// command
open file:("WNS"):0
else  
set tSC=$system.Status.Error(5001,"Cannot create File: "_file) goto End
// Invoke the outputDocument method inherited from the class 'EnsLib.HL7.Operation.FileOperation'
set tSC=..outputDocument(file,pRequest) if 'tSC goto End
End ;
// Close the file if it exists
if file'="" close file
set pResponse=##class(EnsLib.HL7.Message).%New()
// Populate the response HL7 message as you see fit. Either send back an HL7 ACK or NACK would be
// the most appropriate
quit tSC
Error ;
set $ztrap="",tSC=$system.Status.Error($$$GeneralError,"Code Error: "_$ze) goto End
} XData MessageMap
{
<MapItems>
                 <MapItem MessageType="EnsLib.HL7.Message">
                        <Method>WriteMessage</Method>
                </MapItem>
        </MapItems>
} }

result of sending an ORM

ERROR #5001: Cannot create File: /message_archive/inbound_messages/ZLOG_FILE_ORMO0120191003113432.txt
 

Now to work on that error and get the messages in one file.  BUT THANKS

Compiling class User.NewClass21
ERROR #5373: Class 'Ens.StreamResponse', used by 'User.NewClass21:OnD03Alert:FormalSpec', does not exist
  > ERROR #5030: An error occurred while compiling class 'User.NewClass21'
Dropping orphaned procedure: SQLUSER.NEWCLASS21_ENUMERATESETTINGS
Detected 1 errors during compilation in 0.657s.

I am using HealthShare Health Connect 2018.1

Also here is the User.Alert

Class User.Alert Extends Ens.Request
{

/// Analyst Pager number
Property PIN As %String;

/// Alert Message
Property MSSG As %String;

Storage Default
{
<Data name="AlertDefaultData">
<Subscript>"Alert"</Subscript>
<Value name="1">
<Value>PIN</Value>
</Value>
<Value name="2">
<Value>MSSG</Value>
</Value>
</Data>
<DefaultData>AlertDefaultData</DefaultData>
<Type>%Library.CacheStorage</Type>
}

}
 

So from a network capture if I use out of the box operation EnsLib.http.operation the URL is correct

So now I am wondering if I need to get my proxy setup.

Here is the response from the trace:

<?xml version="1.0" ?>
<!-- type: EnsLib.HTTP.GenericMessage id: 55 -->
<HTTPMessage xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Stream>
<![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>Wireless Messaging</title> <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1" /> <link href='/message/stylesheets/OpenSans.css' rel='stylesheet' type='text/css'> <link href="/message/stylesheets/spok_1.css" rel="stylesheet" type="text/css" /> <script language=JavaScript> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } //--> </script> </head> <body leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> <table width=750 border=0 align="center" cellPadding=0 cellSpacing=0> <tbody> <tr> <td align="center" class=text-12>&nbsp;</td> </tr> <tr> <td align="center" class=text-12> Your page has been sent to <span class="TDBOLD"> Cannot process that request. Try Again. @page.metrocall.com</span>. <p>&nbsp;</p> <span class="TDBOLD"><a href="#" onclick="window.open('','_self',''); window.top.close();">Close [X]</a></span><br><br> <span class="TDBOLD"><a href="#" onclick="document.location.href='/message/index.html';">Send Another Page</a></span><br><br> <p class="TDBOLD">Thank you for using Spok.</p></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td> <p align=center><a href="javascript:history.go(-1)">Back</a></p></td> </tr> </tbody> </table> </body> </html> ]]>
</Stream>
<Type>
BG
</Type>
<HTTPHeaders>
<HTTPHeadersItem HTTPHeadersKey="CONTENT-TYPE">
text/html; charset=UTF-8
</HTTPHeadersItem>
<HTTPHeadersItem HTTPHeadersKey="DATE">
Sat, 11 May 2019 13:00:14 GMT
</HTTPHeadersItem>
<HTTPHeadersItem HTTPHeadersKey="SERVER">
Apache
</HTTPHeadersItem>
<HTTPHeadersItem HTTPHeadersKey="StatusLine">
HTTP/1.1 200 OK
</HTTPHeadersItem>
<HTTPHeadersItem HTTPHeadersKey="TRANSFER-ENCODING">
chunked
</HTTPHeadersItem>
</HTTPHeaders>
</HTTPMessage>

What would you think to use on 2014.1.5?  I see the activity monitor doesn't come in until 2016.1

Here is the SQL search that works:

SELECT SUBSTRING(StreamGC,1)
FROM EnsLib_HTTP.GenericMessage
WHERE SUBSTRING(StreamGC,1)['token'

That worked

<response type='FCH.Response.PatientLookupResponse>
<assign property="context.ReturnedIdsvalue="callresponse.PatientLookupResult.Patients.GetAt(1).IDs.GetAt(1).IDaction="set" key="1/>
</response>
 

Now I have to work on the response with multiple Patients.