Global Variable Repeated Rolled Back to Vrior Value

I have created a local identifier and have have successfully set this as emr.primaryIdentifierType However I find that from time to time the Global Variable is reset to a prior value. This seems to occur following a system restart. There is very little (only testing activity taking place on the server, but I am not taking any special steps to close the system other that stopping Tomcat et al or a straight reboot in the evnt of a power failure.

Can someone explain when and why the global variables would be reset?

The reference application hardcodes certain configuration, and automatically resets these on startup. Details in

The workarounds to this are: (option a) fork referenceapplication module and change that config (option b) write a module that starts after referenceapplication, and overrides these

(There are a few recent threads that discuss the original philosophy that led to this design, if you care.)



The explanation seems to fit with the symptoms but as ever it raises new questions. My first thought is that if the global variable is being overridden then this maybe/must be for a reason eg some other functionality of the the Ref App could depend upon the format/style of the emr.primaryIdentifierType and how would I know?

The second question is then which other Global Variables does this apply to? It is clearly not all as some that I have set in the XReports area seem to stay set.

Subject to the first question. It seems that of your options a local process to re-overwrite the variables would be easier for me to administer although I have to admit that I do not have the immediate ability to do it.

Is it also possible that the whole re-initialization could be suspended or perhaps subject to some switch i my local configuration?

@mafrica FYI I don’t have time to engage deeper with this conversation in the near future. Your questions and suggestions are good ones…

The philosophy conversation is this one: Extending the reference application

@mafrica since you may not be alone facing this, one possible approach would be for us to create a new global property which depending on its value can turn OFF or ON the resetting of such data on restart. Would that address your issue?

I think it would resolve the immediate issue, but it may mask further problems down the line. It this variable is being reset then I assume it is for a purpose, so by not resetting it something else may fail. It also opens the wider question of which variables can be changed without impact of the functionality of the ref app?

I completely agree!