Skip to main content


persistent class HS.Util.Installer.ConfigItem extends %Library.Persistent, %XML.Adaptor, HS.Util.DataModel.Adaptor, HS.Util.Installer.AbstractConfigItemType

SQL Table Name: HS_Util_Installer.ConfigItem

A HealthShare configuration item

Property Inventory

Method Inventory


Used in components to define the code database name where to locate sample templates
parameter ClassMappingList = HS,Test,%pkg.isc;
parameter DOMAIN = HS;
Use the "HS" domain for localization.
parameter NamespaceRESTHandler;
Dispatch class for the namespace REST web app which serves the Angular UI for this namespace type.
SHOULD follow the naming convention: HS..RESTHandler.
parameter NamespaceServicesRESTHandler;
Dispatch class for the web app used for REST services for this namespace type i.e. server-to-server communication to this namespace.
SHOULD follow the naming convention: HS..RESTHandler.
parameter RESOURCE;
Inherited description: If specified, this RESOURCE:PERMISSION is checked before any operation on this class via Zen MVC. (Create, Read, Update, or Delete.)
Where to locate the sample template definitions, ie Hub HS.Sample.Production.Hub (to get all items under that package)
parameter TYPE;
Type is set in the sub-classes, and used here as default for the Type property
parameter UIFilesRelativeInstallPath;
Physical file path relative to install directory on an instance where the distribution Angular UI files for this namespace type reside.
parameter UITIER = 10;
Parameter that controls the relative importance of this component type in the HealthShare Home UI for selecting namespaces. Lower values indicate components that should appear earlier in the UI. The value is used as the default return value for the GetConfigTypeUITier()() helper method.
Inherited description: The XMLIGNOREINVALIDTAG parameter allows the programmer to control handling of unexpected elements in the XML input. The XMLIGNOREINVALIDTAG parameter will only take affect if XMLSEQUENCE = 0 (the default). By default (XMLIGNOREINVALIDTAG = 0), will treat an unexpected element as an error. If XMLIGNOREINVALIDTAG is set = 1 and XMLSEQUENCE = 0, then unexpected elements will be ignored.
parameter XMLIGNORENULL = inputonly;
Inherited description: XMLIGNORENULL allows the programmer to override the default XML handling of empty strings for properties of type %String. By default (XMLIGNORENULL = 0), empty strings in the XML input are stored as $c(0) and $c(0) is written to XML as an empty tag. A missing tag in the XML input is always stored as "" and "" is always output to XML as no tag.

If XMLIGNORENULL is set = 1, then both missing tags in the XML and empty strings are input as "", and both "" and $c(0) are output as empty tags (i.e. <tag></tag>).

If XMLIGNORENULL is set = "inputonly", then both missing tags in the XML and empty strings are input as "". Output of "" and $c(0) are for XMLIGNORENULL = 0: $c(0) is output as an empty tag (i.e. <tag></tag>) and "" is output as no tag.

If XMLIGNORENULL = "runtime" (runtime is not case sensitive), then the behavior of XMLIGNORENULL is determined by the format parameter of XMLExport, XMLImport and %XML.Reader.OpenFile. The default behavior for XMLIGNORENULL="runtime is the same as XMLIGNORENULL=0. Adding "ignorenull" to the format argument changes the behavior to that of XMLIGNORENULL=1. "ignorenull" shoud be separated by a comma from literal/encoded part of the format. Example values for format are "", ",ignorenull", "literal,ignorenull" and "encoded,ignorenull". Note that "inputonly" is equivalent to using ,ignorenull for XMLExport and not for %XML.Reader.


property %HSLIB as %String [ InitialExpression = "HSLIB" , Required ];
Property methods: %HSLIBDisplayToLogical(), %HSLIBGet(), %HSLIBGetStored(), %HSLIBIsValid(), %HSLIBLogicalToDisplay(), %HSLIBLogicalToOdbc(), %HSLIBNormalize(), %HSLIBSet()
property Activated as %Boolean [ InitialExpression = 0 ];
Activated status
Property methods: ActivatedDisplayToLogical(), ActivatedGet(), ActivatedGetStored(), ActivatedIsValid(), ActivatedLogicalToDisplay(), ActivatedLogicalToXSD(), ActivatedNormalize(), ActivatedSet(), ActivatedXSDToLogical()
property AuditProduction as %Boolean;
One production in the federation, either the registry (default) or an edge, is designated as the controller for the audit database. The audit consolidation service runs there for alerts, and external ATNA inbound and outbound services and operations run there.
Property methods: AuditProductionDisplayToLogical(), AuditProductionGet(), AuditProductionGetStored(), AuditProductionIsValid(), AuditProductionLogicalToDisplay(), AuditProductionLogicalToXSD(), AuditProductionNormalize(), AuditProductionSet(), AuditProductionXSDToLogical()
property CreatedAt as %TimeStamp [ InitialExpression = $ZDT($H,3) , Required ];
Time this config item was created
Property methods: CreatedAtDisplayToLogical(), CreatedAtGet(), CreatedAtGetStored(), CreatedAtIsValid(), CreatedAtLogicalToDisplay(), CreatedAtLogicalToXSD(), CreatedAtNormalize(), CreatedAtOdbcToLogical(), CreatedAtSet(), CreatedAtXSDToLogical()
property DatabaseLocation as %String);
When not set, the database will be placed in the manager directory
Property methods: DatabaseLocationDisplayToLogical(), DatabaseLocationGet(), DatabaseLocationGetStored(), DatabaseLocationIsValid(), DatabaseLocationLogicalToDisplay(), DatabaseLocationLogicalToOdbc(), DatabaseLocationNormalize(), DatabaseLocationSet()
property Description as %Text.Text;
Description of this item
Property methods: DescriptionAddDocToDictionary(), DescriptionAddToDictionary(), DescriptionAddToThesaurus(), DescriptionBuildValueArray(), DescriptionChooseSearchKey(), DescriptionClassify(), DescriptionCreateQList(), DescriptionDecompressOffsets(), DescriptionDisplayToLogical(), DescriptionDropDictionary(), DescriptionEndOfWord(), DescriptionExcludeCommonTerms(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLoadThesaurus(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionMakeSearchTerms(), DescriptionNormalize(), DescriptionRemoveDocFromDictionary(), DescriptionRemoveFromThesaurus(), DescriptionSeparateWords(), DescriptionSet(), DescriptionSimilarity(), DescriptionSimilarityIdx(), DescriptionStandardize(), DescriptionTranslate(), Descriptionends(), Descriptionsetto(), DescriptionstemWord()
property Disabled as %Boolean [ InitialExpression = 0 ];
Disabled flag
Property methods: DisabledDisplayToLogical(), DisabledGet(), DisabledGetStored(), DisabledIsValid(), DisabledLogicalToDisplay(), DisabledLogicalToXSD(), DisabledNormalize(), DisabledSet(), DisabledXSDToLogical()
property HSComponentName as %String (MAXLEN = 320);
HealthShare network wide unique name
The HSComponentName should be no longer than 320 characters (255 for Max FQDN, 64 for Max namespace length, plus 1 for colon)
Property methods: HSComponentNameDisplayToLogical(), HSComponentNameGet(), HSComponentNameGetStored(), HSComponentNameIsValid(), HSComponentNameLogicalToDisplay(), HSComponentNameLogicalToOdbc(), HSComponentNameNormalize(), HSComponentNameSet()
property LastActivated as %TimeStamp;
Time this config item was last Activated (if at all)
Property methods: LastActivatedDisplayToLogical(), LastActivatedGet(), LastActivatedGetStored(), LastActivatedIsValid(), LastActivatedLogicalToDisplay(), LastActivatedLogicalToXSD(), LastActivatedNormalize(), LastActivatedOdbcToLogical(), LastActivatedSet(), LastActivatedXSDToLogical()
property Name as HS.Types.ComponentName [ Required ];
Item name (also the namespace name)
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIdxCheck(), NameIdxDelete(), NameIdxExists(), NameIdxOpen(), NameIdxSQLCheckUnique(), NameIdxSQLExists(), NameIdxSQLFindPKeyByConstraint(), NameIdxSQLFindRowIDByConstraint(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property Production as %String (MAXLEN = 128);
Production name
Property methods: ProductionDisplayToLogical(), ProductionGet(), ProductionGetStored(), ProductionIsValid(), ProductionLogicalToDisplay(), ProductionLogicalToOdbc(), ProductionNormalize(), ProductionSet()
property Products as list of %String;
Property methods: ProductsBuildValueArray(), ProductsCollectionToDisplay(), ProductsCollectionToOdbc(), ProductsDisplayToCollection(), ProductsDisplayToLogical(), ProductsGet(), ProductsGetObject(), ProductsGetObjectId(), ProductsGetStored(), ProductsGetSwizzled(), ProductsIsValid(), ProductsLogicalToDisplay(), ProductsLogicalToOdbc(), ProductsNormalize(), ProductsOdbcToCollection(), ProductsSet(), ProductsSetObject(), ProductsSetObjectId()
property Template as %String (MAXLEN = 128);
Production template
Property methods: TemplateDisplayToLogical(), TemplateGet(), TemplateGetStored(), TemplateIsValid(), TemplateLogicalToDisplay(), TemplateLogicalToOdbc(), TemplateNormalize(), TemplateSet()
property Type as %String (DISPLAYLIST = ",Hub,Edge Gateway,Access Gateway,Flash Gateway,Bus,System Index,Event Log,Foundation", MAXLEN = 12, VALUELIST = ",Hub,EdgeGateway,AccessGateway,FlashGateway,Bus,SysIndex,EventLog,Foundation") [ InitialExpression = ..#TYPE , Required ];
Property methods: TypeDisplayToLogical(), TypeGet(), TypeGetStored(), TypeIsValid(), TypeLogicalToDisplay(), TypeLogicalToOdbc(), TypeNormalize(), TypeSet()


classmethod AddDeferredAction(pNamespace As %String, actionName As %String, value As %List)
Saves Marker handled by OnProductionStart handler to perform actions that require a running Production
classmethod AuditRegistryServiceExists() as %Boolean
classmethod BuildPortalApp(pNamespace, ByRef pLogFile, pAddRoles As %String = "") as %Status
Build CSP application
classmethod CSPPath(pNamespace) as %String
classmethod CSPRolesForCoreNamespace(pNamespace As %String, pIncludeIRISSYS As %Boolean = 0) as %String
classmethod ClearAuditLog()
classmethod ClearDeferredActions(pNamespace)
classmethod ClearFHIRDbs(pDBList As %List, pLogFile, pPurge) as %Status
classmethod ClearSystemAPI()
classmethod CopyFilesFromInstallDirToDataDir(pSourceRelativePath As %String, pTargetRelativePath As %String) as %String
Copy files from provided source path (relative to the installation directory) to provided target target path (relative to data directory).
Files are overlaid.
IS NOT MIRROR AWARE. This is intentional. This method is intended for use during an operation that happens on both members of a mirror (such as production start).
@Argument pSourceRelativePath Source path (should be relative. Not absolute).
@Argument pTargetRelativePath Target path (should be relative. Not absolute).
classmethod CreateCSPRoles(pNames) as %Status
classmethod CreateNavigationApp()
classmethod CreateProjectionsForRESTModelClasses(pTargetNamespace As %String = $Namespace, pSourceNamespace As %String = "HSLIB")
Helper method to transfer all persistent data (created by projections) from a source namespace to a target one.
classmethod DeleteHSAUDIT() as %Status
classmethod ExistsNS(pNamespace) as %Boolean
classmethod FormattedCSPRolesForCoreNamespace(pNamespace, pIncludeIRISSYS As %Boolean = 0) as %String
Returns a set of roles output by CSPRolesForCoreNamespace(), but formatted such that they can be used in the MatchRoles property of Security.Applications:Create() The output is in the format :role1:role2:role3
@Argument pNamespace The namespace where the roles will be used.
classmethod GatewayDisableRequest(pNamespace) as %Status
classmethod GetComponentByName(pName As %String, ByRef pComponent As HS.Util.Installer.ConfigItem, pCreate As %Boolean = 0, pType As %String = "", pHSLIB As %String = "HSLIB", ByRef pSettings) as %Status
Open the configuration object pComponent with name pName If it does not exist (an pCreate is set) then create an object of the specified type, using any Settings provided and some (but not all) defaults pHSLIB argument is not used - it's an ancient leftover
classmethod GetDBDirs(pDBList As %List, ByRef pArr)
classmethod GetDBResourceName(pNamespace As %String = "", ByRef tSC=$$$OK) as %String
classmethod GetDefaultCSPCustomLoginPage() as %String
Helper method to return the default CSP Custom Login page that should be added to user-facing CSP applications for this ConfigItem type.
classmethod GetDefaultCSPCustomLoginPageForNamespace(pNamespace As %String) as %String
Helper method to return the default CSP Custom Login page for a given namespace.
classmethod GetDefaultCSPSessionEventsClass() as %String
Helper method to return the default CSP SessionEvents class that should be added to user-facing CSP applications for this ConfigItem type.
classmethod GetDefaultCSPSessionEventsClassForNamespace(pNamespace As %String) as %String
Helper method to return the default CSP SessionEvents class for a given namespace.
classmethod GetDeferredAction(pNamespace As %String, actionName As %String) as %List
method GetNamespaceAdditionalInfo() as %Library.ListOfObjects
Return any aditional info for this particular HS namespace that is to be exposed over the "Instance Info" API i.e. the REST resource HS.HC.InstanceConfig.Resource.Namespace.
Usually varies by "Namespace type" i.e. per different subclasses of HS.Util.Installer.ConfigItem.
SHOULD be overridden by subclasses.
MUST use concurrency = 0 when calling methods such as %OpenId() to prevent errors on data in mirrored databases.
MUST not do any locking on globals that are in mirrored database to prevent errors.
method GetPackageName() as %String
method GetProductionName() as %String
classmethod GetPropertyValue(pID="", pPropertyName As %String = "", Output pSC As %Status) as %String
The GetStored method of properties in persistent classes is designed (and documented) to return an error if the referenced object instance does not exist. This method works around that by returning "" in that case.
classmethod GetSampleTemplates(Output pSampleProductions) as %Status
classmethod GetThisComponentName() as %String
This can be called from a running production to get the component name. By Default, the component name is the same as the namespace. In 2008.1, this was only sort-of findable, on edge gateways, as a setting on HS.Gateway.HSWS.WebServices Starting with 2008.2, there's a setting on the sample productions where this will really live.
classmethod GetUIMenuClass(pInternalProductName As %String) as %Dictionary.Classname
Helper method to allow sub-classes to specify an alternative class to drive the population of the UI menus for this namespace type. The menu class should extend HS.HC.Util.AbstractUIMenuClass and SHOULD implement the addMenu() method.
classmethod GetUpgradeClassPrefix(pInternalProductName As %String) as %String
Helper method to identify the prefix that should be used to locate the upgrade classes for the specified product. Note that the classes must extend HS.Util.Installer.Upgrade.Abstract, and have numeric trailing values that match major version releases.
classmethod HasDeferredActions(pNamespace As %String)
abstract classmethod Install(pNamespace As %String, ByRef pVars) as %Status
Install the configuration item in the specified namespace. pVars allows you to override/change configuration parameters, which will be updated in the HS.Util.Installer.ConfigItem database. The allowed subscripts in pVars will vary across the different subclasses of HS.Util.Installer.ConfigItem, and the method should be overridden and re-documented in each subclass.
classmethod InstallKits(ByRef pVars, pNamespace As %String, pIsUpgrade As %Boolean) as %Status
classmethod MapAllAuditDB() as %Status
Called for install of hub or edge, where that has been specified as the audit production
classmethod MapAuditDB(pNamespace, pAuditDB) as %Status
method MarkActivated(pValue As %Boolean = 1) as %Status
Mark this config item as being activated Also saves any changed values
classmethod MergeGlobal(pGlobalName As %String, pSource As %String, pTarget As %String)
classmethod MirrorCheck(pNS) as %Boolean
classmethod MoveAndUpdateFilesForNamespaceUI(pNamespace As %String = $Namespace, pRelativeInstallPath As %String = ..#UIFilesRelativeInstallPath, pPatternToReplace As %String = "(?i)\{\$webAppPath\}")
Copies the UI files for the namespace UI from their kitted location to the web app path.
Also updates the base href in the index.html file for UI to have the correct web app path as the base href required when using HTML5 path routing.
MUST ONLY be called from non-mirror aware code (such as production start).
@Argument pNamespace The namespace where pages for this application are run.
@Argument pRelativeInstallPath Directory relative to the install directory where UI files are kitted (e.g. /csp/hslib/ui/hs-app-hub)
@Argument pPatternToReplace The pattern in the index.html file where which identifies the location of where the web app path should be inserted.
classmethod OnPreUnInstall(pNamespace As %String, pPurgeFiles As %Boolean = 0, pLogFile) as %Status
classmethod OnUnInstall(pNamespace As %String, pPurgeFiles As %Boolean = 0, pLogFile) as %Status
Can be implemented on subclasses that aren't overriding UnInstall
classmethod SetThisComponentName(pHSName As %String) as %Status
classmethod SettingsFilePath(tDirPath)
Input a file directory path that is relative to the installation directory This outputs a path that we can use as an Ensemble setting, relative to the default process directory, assuming the default process' database directory is directly under (installdir)\mgr This allows an installdemo to be mirrored on the same laptop In production, the setting would always be changed to point to somewhere else, and if a mirror, it would need to be the same physical directory on both sides
classmethod UnInstall(pNamespace As %String, pPurgeFiles As %Boolean = 0, pDeleteCSPApps As %Boolean = 1) as %Status
Most callers will pass 1 to purgefiles This will attempt to clean up as much as possible, even if things are partially deleted
classmethod UnInstallCleanup()
On UnInstall, cleanup HSSYS if no other HS namespaces exist
classmethod UnInstallP(pNamespace As %String) as %Status
New wrapper for Uninstall - does purge. Subsequent reinstall will fail if IRIS.DAT is still present
classmethod UnMapAllAuditDB(pForce As %Boolean = 0) as %Status
Called for uninstall of hub or edge Also called by UnInstallAll, with pForce (and it ignores errors)
classmethod UnMapAuditDB(pNamespace, pAuditDB) as %Status
classmethod UpdateClassMappings(pNamespace, pHSLIB, pOldList="", pNewList="")
classmethod ValidateName(pNamespace, ByRef pDatabase, ByRef pProduction) as %String
classmethod WebAppExists(pWebAppName As %String) as %Boolean
Returns 1 if a web application with the give name exists.


query Configuration()
SQL Query:
SELECT %ID,Name,Type,CreatedAt,Description,Production,Activated,LastActivated,Disabled FROM ConfigItem ORDER BY Type, Name
Enumerate all configuration items


index (NameIdx on Name) [IdKey, Type = key, Unique];
Name index to ensure uniqueness
Index methods: NameIdxCheck(), NameIdxDelete(), NameIdxExists(), NameIdxOpen(), NameIdxSQLCheckUnique(), NameIdxSQLExists(), NameIdxSQLFindPKeyByConstraint(), NameIdxSQLFindRowIDByConstraint()

Inherited Members

Inherited Properties

Inherited Methods


Storage Model: Storage (HS.Util.Installer.ConfigItem)


Storage Model: Storage (HS.Util.Installer.ConfigItem)


Storage Model: Storage (HS.Util.Installer.ConfigItem)



FeedbackOpens in a new tab