I don't think you can provide object script code via the UI for security reasons.

What you probably need to do is open you production item in Studio/VSCode.

Then overwrite the OnInit() method with something like

Below code is not validated and will not be 100% correct in regard to function specs etc, this is only used for clarification and example:

Method OnInit(.............) as %Status
{
    set ..IpAddress=$get(^ehrIP)
    set status=#super()
    return status
}

Hi Cathrine,

usually, TrakCare as a web application does not directly integrate with a dictation software. Any dictation software is used to fille the appropriate text field in the TrakCare browser window after parsing the dictation.

For more details and for a in depth look i would suggest you get an iService ticket raised so the specialist/development can have a look at it.

Best Regards
Timo

Hi Carl,

easiest way is to save the authorization to a global, have that global mapped via ECP to your child servers.
On the child servers create a ZAUTHENTICATE routine and implement delegated authentication. essentially you use this routine to check on connection open on the child server if the incoming connection is a valid request based on the auth global mapped from your primary server, then allow or deny.

The better approach here, if you don't want to use SystemDefaults.

Is to add a global mapping for your global config variable ^ehrIP to the %ALL namespace pointing it to a config database. This will point the ^ehrIP global in each namespace to the same storage location.

Then you can access this global via ^ehrIP as usual. I would not use % globals as they are saved in the %SYS namespace and application code/data should not be living in the %SYS namespace.

From a SMS point of view this is major hell.
If you are coding you application currently, then rather then checking a database for settings instead of using global mappings, code your application that it checks a "higher-priority global first" then defaults to the global default mapping.

example core config uses ^ %SYS for instance wide config and ^SYS for local namespace config.

In this scenario you would not even need a %ALL namespace global mapping.

Hi Pravin,

afaik this is not possible.

I would suggest revisiting the design. If you need custom code to be able to extend your production, then include code hooks that will be called if implemented.

e.g.

In your production class include code during processing that checks for classes inheriting froma specific abstract class you also defined and call the respective method. Now any customisation can be done by inheriting from the abstract class and overwriting the respective methods.

couple of options:

1. $order the global checking the list content as others have already mentioned

2. if there is a SQLIndex defined for the field. You can check the index location directly via objectscript, this would save you ordering through possibly billions of lines of data
3. define the SQL column to for Reference to use columnar storage, also single global retrieve to get a $list of rowids.

ahh now your question is getting a bit clearer.

If you look for a better management for your API endpoints might be worth looking into ISC API manager: InterSystems API Manager | InterSystems Components and Tools

Else you can use delegated auth to validate incoming IP addresses, also you can make use of Apache's virtual server config to server different content on different ports using Apache access controls for additional filtering and redirecting, which is essentially what you suggest here. 

Just a bit of thought, from your post i think 57772 is the port of the private webserver previously packaged with IRIS?

If so. don't use it for production workloads, its not configured or designed for that purpose, also due to security concerns the private web server has been deprecated and is no longer included in newer IRIS versions. (ref: Discontinue Apache web server installations (aka Private Web Server (PWS)) (intersystems.com) )

Hope i understood your problem correctly.

This sort of sounds like a "DataMigration" task, loading legacy information into the current IRIS database.

If you know an exact date where the value was available in the current messages, a onetime load based on an extract for legacy messages would be enough i think.

Then amend the messaging code to add the field if its not there, based on the lookup table, this should only happen for legacy messages, not new messages as they would already have the field.