Question Julian Matthews · Sep 17, 2021

Use of environment info to control HL7 transformations

Hey everyone.

I was curious if anyone had any success/tips with regards to using a global or a system parameter/property to control the behavior of a transform or process/operation.

Is there a parameter I can currently reference from the system that can be used for an if/else, or am I best off creating a simple Global and setting it according to the environment I am in?

Product version: HealthShare 2019.1

Comments

Sean Connelly · Sep 17, 2021

It depends what you really need.

SYSTEM MODE

There are existing global flags that are available through various classes. For instance SystemMode() will provide system wide constants for Live, Test and Dev...

https://docs.intersystems.com/healthconnectlatest/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.Version

The SystemMode() is admin configured via the Memory and Startup screen on the management portal.

LOOKUP TABLES

For some global settings, particularly business related, it would be good practice to use lookup tables and not a global...

https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=ENSLIB&PRIVATE=1&CLASSNAME=Ens.Util.LookupTable

UTIL FUNCTIONS
Also, if you are not aware of them yet, you should take a look at creating your own Ens util functions which are automatically inherited into routers and DTL's and provide a good place to stash various levels of global and business value / logic...

https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=ENSLIB&PRIVATE=1&CLASSNAME=Ens.Util.FunctionSet

https://docs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=EBUS_utility_functions

0
Julian Matthews  Sep 17, 2021 to Sean Connelly

Hey Sean.

I had considered using the values from Memory and Startup, but was unsure of the exact class to call it, so thank you.

I think my approach will be to use a util function which then returns a value based on SystemMode (I say based on, as I would want the same behavior even when failed over in a mirrored setting)

0