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}))=(""))">
<return></return>
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?
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.