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.

If you using IRIS prebuilt HL7 Business Service components, like EnsLib.HL7.Service.TCPService, it is not possible.

There is no place where you can call Transform() method.

If you have implemented your own BS, then you have full control.

Having said that, I ask again, what's the problem of implementing a simple HL7 Routing Business Process with a simple rule and transformation between BS and BO??
It can be done in few mouse clicks...

Within setter and getter method you need to use Instance Variable to set/get the actual property value:

Property NewProperty1 As %String;
Method NewProperty1Get() As %String [ ServerOnly = 1 ]
{
    Quit i%NewProperty1
}

Method NewProperty1Set(Arg As %String) As %Status [ ServerOnly = 1 ]
{
    Set i%NewProperty1=123
    Quit $$$OK
}

To implement it in datatype class try using a method generator.

Maybe if you explain what you are trying to achieve there can be a different solution.