1. Get list of all items in production (via Ens.Director:getProductionItems)

2. Iterate over items local array and for each item:

  • Get list of settings for an item (via Ens.Director:GetItemSettings)
  • Check if ReplyCodeActions is a setting for current item, if it is get it's value.
  • Write into any structure the pairs Item:ReplyCodeActionsValue

 

Structure can be anything you want:

  • Custom class
  • Dynamic object
  • %List
  • %ListOfDataTypes

That mainly depends on what do you want to do with this information later.

You can't just concatenate to a %Status:

set ^sghp1($i(ind))=st_"**"_Hospital_"**"_OrganizationInitials_"**"_Organization_"**"_obj.SourceConfigName_"!!!"_obj.AlertText_"!!!"_obj.AlertDestination_"!!!"_obj.AlertTime_"!!!"_obj.SessionId

You need to append a %Status to another %Status:

if $$$ISERR(st) {
   set msg = "**"_Hospital_"**"_OrganizationInitials_"**"_Organization_"**"_obj.SourceConfigName_"!!!"_obj.AlertText_"!!!"_obj.AlertDestination_"!!!"_obj.AlertTime_"!!!"_obj.SessionId
   set infost = $$$ERROR($$$GeneralError, msg)
   set st = $$$ADDSC(st, infost)
} 
set ^sghp1($i(ind)) = st

In this snippet first I check if the save was successful, if it was not I build additional error message, then convert it from %String to %Status and concatenate old and new statuses into one.

Via SQL:

SELECT Settings
FROM Ens_Config.Item
WHERE Settings [ 'ReplyCodeActions'

Documentation on [.

You can also get it without SQL:

To get production setting use one of:

Set Value = ##class(Ens.Director).GetCurrProductionSettingValue("SettingName", .sc)
Set Value = ##class(Ens.Director).GetProductionSettingValue("Production", "SettingName", .sc)

To get setting of production item use:

Set Value = ##class(Ens.Director).GetItemSettingValue("ItemName", Type, "SettingName", sc)

Where Type can be Host or Adaptor.

The ItemName argument may contain the following elements:

ProductionName||ConfigName|CommentOrClassname

Notes on ItemName:

  • Only the ConfigName portion is required.
  • If ProductionName is not given, then the currently running or last run Production will be used.
  • CommentOrClassname is the name shown in the Config page's dropdown list for multiple items having the same ConfigName. If it is not given, then if more than one item of the given ConfigName exists, all will match.
  • None of the names of the items in your production should contain the '|' character.

Documentation.