Paul Dawson · Jul 6, 2021

Can Globals be called from BusinessRule classes?

I am attempting to prevent ADT merge messages from coming into Healthshare if the MRN being merged does not exist. To my mind, the best way to do this would be to check the PriorPatientIdentifierList.IDNumber against the HS.SDAStreamletMRN global. However, I'm not able to get it to work in Business Rule classes. 

Something like:

<when condition="$G(^HS.SDAStreamletMRN('MRN','Facility^AssigningAuthority^'_(Document.{MRG:PriorPatientIdentifierList(1).IDNumber}))=(&quot;&quot;))">


However, I'm not able to have the business rule fire without a general error. 

I know that Business Rule classes don't have as much functionality, so is it even possible to call a global in a BusinessRule class?

Product version: IRIS 2020.2
$ZV: HealthShare 2020.2 [HealthShare Modules: Core:20.0.8620] - IRIS for Windows (x86-64) 2020.1 (Build 217_1_20418U) Tue Nov 17 2020 15:12:53 EST
0 94
Discussion (1)2
Log in or sign up to continue

Getting the value of a global node should not be a problem, but you need to figure out the proper quoting for the string values.  You might as well create a class method in a location that makes sense, and reference the global from there, in case the syntax becomes easier to manage.