Do you have a corporate mail server that supports SMTP relay? You would need to get the details from the administrator of the mail system. Some require TLS, some don't. Some require credentials, others don't. 

You can use GMail, in which case you would need a configuration of something like this:

Mail server? smtp.gmail.com 
Mail server port? 587
Mail server SSLConfiguration? <SSLConfigName> <-- You would need to create this in Security | SSL/TLS Configurations
Mail server UseSTARTTLS? 1 
 

You will also need to supply your Gmail email address for the username, and an app password (created in your Google Account Security settings) for the Set Authentication option.

Your best bet would be to discuss your email delivery requirements with the mail server administrator of your organization; they should be able to provide you with the required values. If this is for a private/personal installation of Caché or IRIS, GMail is probably the easiest to configure and best documented.

If you create a class that extends Ens.Rule.FunctionSet, you can have a method that's selectable from the expression editor in either a DTL or a Routing Rule ...

Class User.Util.MetaData Extends Ens.Rule.FunctionSet
{
/// Retrieves the UserValue associated with key <var>pKey</var> from the message object supplied as
/// <var>pMsg</var> (normally <strong>source</strong> in a DTL or <strong>Document</strong> in
/// a Routing Rule) as a %String. Returns an empty string if the key is undefined.
ClassMethod UserValueGet(pMsg As EnsLib.HL7.Message, pKey As %String) As %String
{
    If pMsg.UserValues.IsDefined(pKey)
    {
        Return pMsg.UserValues.GetAt(pKey)
    }
    Return ""
}
}

I haven't found support for this yet. I have a need for this as well and am considering writing an adapter to support get/put operations using smbclient. If there's a better/quicker way to accomplish this, I'd be very excited to learn about it laugh

We had toyed with the idea of mounting all of the shares as cifs filesystems on the RHEL 8.5 hosts, but there are quite a few ... Dynamically establishing a connection and then performing the required operation is preferred.

The simplest solution is to make sure the ADT transform/send rule is called before the ORM transform/send rule in the routing rule, set the router's pool size to 1, and enable the "Force Sync Send" option in the router. What happens to the ORM message when the ADT message is NAKed, though, may be problematic.

If you want more granular control over this processing, invoke the transformations and subsequent calls to the operation via a BPL instead of a router. You will be able to evaluate the ACK/NAK response from the called Business Operation responsible for sending the ADT message and take appropriate measures for processing/suspending the ORM message.

Oops, instead of hr.SetParam() try hr.InsertFormData("name","value").

This works for me:

USER>set req=##class(%Net.HttpRequest).%New()
USER>set req.Server = "blah.org"
USER>do req.SetParam("name","value")
USER>do req.Post("method",1,0) // 2nd param is output to current device; 3rd is no reset


POST /method?name=value HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; InterSystems IRIS;)
Host: blah.org
Accept-Encoding: gzip
Content-Length: 0

A <code> section would work, but if you're going to use this regularly within your DTLs, it might make sense to create a custom method that would be available through the Function drop-down list in the DTL Editor. For Example:

Class User.Test.FunctionSet Extends Ens.Util.FunctionSet
{
/// Unescapes the field value provided in <var>pPath</var> and returns it as a String.
ClassMethod UnEscapeHL7(pPath As %String, pSeps As %String = "|^~\&", pEsc As %String = "\") As %String
{
    Return ##class(EnsLib.HL7.Segment).UnescapeEx(pPath, pSeps, pEsc)
}
}

Call it like this (replacing the field in my example with the field containing your note comment):

I've updated the method to optionally accept separators and the escape character as arguments; you would use source.Separators and source.ESC to override the default values with the ones supplied in the source message.

I don't have a request of type EnsLib.EDI.XML.Document handy to test, but I do know that setting the Source property of the request (for an HL7 message, at least) to the desired filename will enable you to use the %f formatting token to obtain the Source contents as the filename. This should theoretically allow you to use the unmodified EnsLib.EDI.XML.Operation.FileOperation class ...

If the length of the encoded PDF is less than MAXSTRING (roughly 3.6MB) it will be populated in the message as type %String. Otherwise it's a %Stream.GobalCharacter, and working with them using property paths in many of the IRIS functions will cause problems. GetFieldStreamRaw() guarantees you have a stream to work with.

Things may work out fine with your current code, but I've always taken the precaution of making sure I'm working with a stream when there's a chance the field content may be large.

You can change the message DocType, but you can't change the message content:

HICG > s msg=##class(EnsLib.HL7.Message).%OpenId(7463)
HICG > w msg.IsMutable
0
HICG > w msg.DocType
2.3.1:ORU_R01
HICG > s msg.DocType="2.5.1:ADT_A01"
HICG > d msg.%Save()
HICG > w msg.DocType
2.5.1:ADT_A01
HICG >

Unfortunately there's no easy way to "reset" the source document type in the DTL editor dynamically. You could, however, dynamically set the document type in either a BPL or COS business process and then invoke the appropriate DTL for translation.

The class query MemberStatusList in SYS.Mirror (found in the %SYS namespace) will give you a list of mirror members and some useful status information:

%SYS>d ##class(%ResultSet).RunQuery("SYS.Mirror","MemberStatusList")

Member Name:Current Role:Current Status:Journal Transfer Latency:Dejournal Latency:Journal Transfer Latency:Dejournal Latency:Display Type:Display Status:
MDCHCNDBSL1.HICGRP.COM/STAGE:Primary:Active:N/A:N/A:N/A:N/A:Failover:Primary:
MDCHCNDBSL2.HICGRP.COM/STAGE:Backup:Active:Active:Caught up:Active:Caught up:Failover:Backup:
CDCHCNDRSL.HICGRP.COM/STAGE:Async:Async:Caught up:Caught up:Caught up:Caught up:Disaster Recovery:Connected:

Are the values in AIS:3.1 sequential integers ranging from 1 to the number of AIS segments? If yes, it's very easy.

If not ... just a little harder. You'd populate a subscripted variable using the values in AIS:3.1 as the index and the segment repetition number as the array element value. Then $ORDER() through it get the source segment repetition number and assign that segment to the target in AIS:3.1 order. For example:

The variable tAISArr will be subscripted by the values in AIS:3.1. So now we just $ORDER() through tAISArr in a code action:

 set tIdx = 1
 set tKey = $ORDER(tAISArr(""))
 while (tKey '= "")
 {
      // Grab the segment identified by the value of the array subscript
      set AISSeg = source.GetValueAt("RGSgrp(1).AISgrp("_tAISArr(tKey)_").AIS")
      // stuff it into the target segment at the current position of the value of the loop counter tIdx
      do target.SetValueAt(AISSeg,"RGSgrp(1).AISgrp("_tIdx_").AIS")
      // Don't forget to renumber the Set ID
      do target.SetValueAt(tIdx,"RGSgrp(1).AISgrp("_tIdx_").AIS:1")
      set tIdx = tIdx + 1
      set tKey = $ORDER(tAISArr(tKey))
 }

Sample Input:

Sample Output:

I don't have access to Ensemble 2013.1, unfortunately.

I'm not seeing anything that looks like a Serial adapter/service in the most recent versions of Ensemble/HealthConnect, though. Is the inbound service a custom class? (EDIT: Subject mentions TCP, but reply still mostly applies).

You should be able to extend the class, replacing the $C(13) character with $C(13,10) in the the OnProcessInput() callback method before sending the message to the routing process.