I'm not sure I understand your question, probably not.

If you need to transform a message and then apply/evaluate rules, then create two HL7 Routing Business Processes, each with a Routing Rule associated.

The first BP and associated rule transform the message and send it to the second BP where you can apply rules to the transformed message.

But....probably I did not understand the question! 😊

You already answered your question....in the question! 😊

From %SYS namespace, use the List class query in the Config.Namespaces class:

%SYS>Set ResultSet=##class(Config.Namespaces).ListFunc()
 
%SYS>Do ResultSet.%Display()
Namespace       Globals Routines        System Globals  System Routines LibraryTemp Storage
%ALL    %DEFAULTDB      %DEFAULTDB      IRISSYS IRISSYS IRISLIB IRISTEMP
%SYS    IRISSYS IRISSYS IRISSYS IRISSYS IRISLIB IRISTEMP
USER    USER    USER    IRISSYS IRISSYS IRISLIB IRISTEMP
 
5 Rows(s) Affected
%SYS>

 Or, if you prefer:

%SYS>Set statement=##class(%SQL.Statement).%New()
 
%SYS>Set status=statement.%PrepareClassQuery("Config.Namespaces","List")
 
%SYS>Set resultset=statement.%Execute()
 
%SYS>While resultset.%Next() {  Write resultset.%Get("Namespace"),$c(9),resultset.%Get("Globals"),$c(9),resultset.%Get("Routines"),!}
%ALL    %DEFAULTDB      %DEFAULTDB
%SYS    IRISSYS IRISSYS
USER    USER    USER
 
%SYS>

A Business Process can only be invoked/called from a Business Service within an Interoperability Production.

You can invoke/call a Business service from your code/application with:

Set sc = ##class(Ens.Director).CreateBusinessService("BusinessServiceName", .BService)
If $$$ISERR(sc) ; handle error here
Set sc = BService.ProcessInput(BSRequest,.BSResponse)

Maybe (likely!) I misunderstood your question.

What do you mean with "But some other namespaces on the same server could be mapped to a different namespace or even mapped to itself." ?

A namespace cannot be mapped to another namespace.

A namespace definition consists of default database for globals, default database for "routines" (all code) and optionally global/package/routine mappings to different databases. (Plus some default system mapping)

You mention you need to connect to Ensemble but your product version says IRIS. I assume you need to connect to IRIS.

In Windows you can install IRIS ODBC drivers and in Control Panel create a DSN to connect to a IRIS Namespace. Then in SSMS follow the instructions to connect to an external database using an ODBC DSN (I have no experience on this).
Make sure you use the correct 32 or 64 bits driver and DSN definitions (in Windows you can define 32 or 64 bits DSN), I'm not sure if Microsoft SQL Server Management Studio (SSMS) is 32 or 64 bits application, find that out first.

Another option is to use IRIS JDBC drivers, make sure you install the correct Java JRE for the JDBC drivers you are using.

Since this is windows, maybe ODBC is more convenient.

I'm not sure what "HL7 Reference Guide" exactly means for you, however, within "health enabled products" (IRIS for Health, Healthhare Connect, Healthshare UCR etc.) there are "HL7 Schemas" for all HL7 v2 variants up to 2.8.2.

Can be accessed from Management Portal Interoperability -> Interoperate -> HL7 v2.x -> HL7 v2.x Schema Structures.

There, for each version you can browse in detail the HL7 message structure, segments, field, subfields etc down to code tables associated to coded entries/fields.

If you don't have IRIS for Health, you can download IRIS for Health community edition that is free for non commercial/production use (check license for details).

Well Julius, in general I would agree with you under that circumstances, BUT, in this particular case, the code he has implemented correspond exactly to the "Defining a Computed Property" documentation sample.

This is not a case of using %Library.PropertyHelper in random code, it's a case of using it according to documentation.

Granted that he is trying to use a variable instead of a string constant and (for good reasons IMO) does not work due of implementation constraints.

I agree that understanding the actual requirements and what needs to be implemented (the real problem), a viable solution can be suggested.

This is interesting.

It is evident that when the class is compiled IRIS parse the <PropertyName>Computation() method(s) to find out what properties are actually used/referenced/passed to the cols.getfield() method(s), then it use this information to set the "fields" multidimensional property of %Library.PropertyHelper class before calling the <PropertyName>Computation() method.
This way only the used properties are set in the "fields" multidimensional property of %Library.PropertyHelper class.
This optimization improves performance in case of a class with many properties, possibly "complex" properties (calculated, references etc.) and I believe this is why has been implemented.

The "parser" is...simple, very simple.

To prove this assumption I wrote a little sample:

Class Community.Computation Extends %Persistent
{

Property FirstName As %String;
Property LastName As %String;
Property FullName As %String [ SqlComputed ];
ClassMethod FullNameComputation(cols As %Library.PropertyHelper) As %String
{
    ; cols.getfield("FirstName")
    ; cols.getfield("LastName")
    return ..FullNameComputationSub(cols,"FirstName","LastName")
}

ClassMethod FullNameComputationSub(cols As %Library.PropertyHelper, p1 As %String, p2 As %String) As %String
{
    return cols.getfield(p1)_" "_cols.getfield(p2)
}

/// do ##class(Community.Computation).test()
ClassMethod test()
{
    set obj=..%New()
    set obj.FirstName="Enrico"
    set obj.LastName="Parisi"
    write obj.FullName,!
}

}

If I run test() I get:
 

do ##class(Community.Computation).test()
Enrico Parisi

If I remove the commented line "; cols.getfield("FirstName")" and run test() again:

do ##class(Community.Computation).test()
 Parisi

If you look at your error:

"set cols.fields("ropert")={ropert}'"

That's the parser that found "cols.getfield(property)" and assuming a string was passed removed the first and last characters (assuming were double quotes), so it got "ropert".

Bottom line, cols.fields() can only be used passing a string constant with a property name.