Skip to main content

HS.HC.UI.Util

abstract class HS.HC.UI.Util extends HS.UI.Base

Common methods for HS UI.

Property Inventory

Method Inventory

Parameters

parameter ALLOWEDFIELDS = Name,ID;
Comma-delimited list of fields that can be retrieved with LoadComboBox. If any fields other than Name and ID are needed, this should be set in each subclass which calls LoadComboBox.
parameter ALLOWEDTABLES;
Comma-delimited list of tables which can be loaded with LoadComboBox. This should be set in each subclass which calls LoadComboBox.
parameter EXCLUDEFIELDS;
Override to choose which fields to exclude (e.g. "txtSpecialty,txtSubSpecialty")

Properties

property excludeFields as %ZEN.Datatype.string [ InitialExpression = ..#EXCLUDEFIELDS ];
Property methods: excludeFieldsDisplayToLogical(), excludeFieldsGet(), excludeFieldsIsValid(), excludeFieldsLogicalToDisplay(), excludeFieldsLogicalToOdbc(), excludeFieldsNormalize(), excludeFieldsSet()

Methods

classmethod %CheckError(pSC As %Status, pObj As HS.Util.WebServices.ServiceStatus, pShowInternalDetails As %Boolean = 1, Output pWarning As %String) as %String
Check for an error from a web service call to load an object. If the error code is an HS specific localized error, ALWAYS let it through as the text has already been filtered for the specific use case and should be visible to the end user.
method %DisableControl(pControlName As %String, pDisabled As %Boolean = 1, pNormal As %String = "black")
Disable a control and grey out its label (not always the standard behavior)
classmethod %EscapeComma(pValue As %String) as %String
Escape commas in values to be included in comma-delimited lists
classmethod %FormatError(pMsg As %String) as %String
Make error message presentable
method %HideDropdownArrow(pComboName As %String)
Don't show drowdown arrow for a combobox
method %HideFields(pGroup As %ZEN.Component.abstractGroup, pHideAll As %Boolean = 0)
Hide search criteria fields
classmethod %InFacilityList(pFilter As %Boolean) as %String
Filter facilities to those in a users list
classmethod %SetItemsIntoUI(pSelected As %ListOfDataTypes, pCodes As %ArrayOfDataTypes, pNames As %ArrayOfDataTypes, pAvail As %String = "lst", pSelect As %String = "lstSelect")
Set available and selected lists into the UI
classmethod %SetListIntoUI(pControl As %String, pList As HS.Util.WebServices.ListItems)
Set a list into a UI control
method AddOption(pCombobox As %ZEN.Component.combobox, pValue As %String, pText As %String, pOptionStyle As %String = "") [ ZenMethod ]
Add an option to a combobox
classmethod CheckUIVersion(pKey) as %Status
Utility Method used by UIs that can run on a gateway, to check if the gateway version is recent enough to be compatible with an upgraded registry. Use the same key (without the "\UI\") as HSUILink
classmethod ConfigValue(pKey As %String, pDefault As %String = "") as %String
Utility Method used by $$$ConfigValue Gets a value from the session if there, otherwise from the Configuration Registry
classmethod GetImplied(selection) as %String [ ZenMethod ]
Given a group name, return implied group names if appliable
method InsertOption(pCombobox As %ZEN.Component.combobox, pValue As %String, pText As %String, pOptionStyle As %String = "") [ ZenMethod ]
Insert an option in the sort order of a combobox, avoiding duplicates
method LoadComboBox(pTable As %String, pControl As %String, pWhere As %String = "", pName As %String = "Name", pID As %String = "ID") [ ZenMethod ]
Load dropdown choices via web service calls
classmethod OutputXMLToBrowser(pStream, pFromUtf As %Boolean = 0)
This takes a vanilla XML stream, and adds in a style sheet from the Ensemble library to make this browser friendly (needed for Chrome, useful for others) pFromUtf should be set to 1 if the incoming stream is encoded in UTF-8; this is to ensure that special characters (ones that are stored across multiple bytes) show up correctly.
clientmethod arrowClick(from, to, sort) [ Language = javascript ]
*******************************************************************/// Generic Methods *******************************************************************/// Moving a list item from one box to the next, then remove it from the original box
clientmethod comboBoxMatch(comboBox) [ Language = javascript ]
Fill in an exact match based on a partial entry in a combobox with editable="true" and onkeyup="zenPage.comboBoxMatch(zenThis);" Note that you'll also need to reproduce any onchange actions after calling this method in onkeyup.
clientmethod convertQuotes(ctrlName) [ Language = javascript ]
Convert double quotes to single quote in a control
clientmethod disableControl(controlName, disabled, normal) [ Language = javascript ]
Disable a control and grey out its label (not always the standard behavior)
clientmethod disableSave(flag) [ Language = javascript ]
enable or disable the Save button - note that the Save buttn's id is "btnSave".
method displayCheck(pTable As %ZEN.Component.tablePane, pName As %String, pSeed As %String) as %Status
Display a checkmark (actually an X) for a Boolean field
clientmethod jsQuote(inStr) [ Language = javascript ]
Javascript to convert input string into quoted JavaScript literal
clientmethod multiUserIdentified(usersInfo) [ Language = javascript ]
Multiple users were successfully identified
clientmethod onPopupAction(popupName, action, value) [ Language = javascript ]
Return from searching for a clinician or provider
clientmethod popupUser(searchMode, filter, systems, mpiid, groups, inactive) [ Language = javascript ]
User clicked Find a User.
clientmethod setListBoxItems(listBoxId, items, render) [ Language = javascript ]
clientmethod sortList(ctlName) [ Language = javascript ]
Sort the entries in a listbox or combobox
clientmethod toggle(ctrlName) [ Language = javascript ]
Toggle whether a field is displayed
clientmethod userIdentified(id, userName, userID, searchMode, type) [ Language = javascript ]
A user was successfully identified
clientmethod validateTime(time) [ Language = javascript ]
Validate input time, returning time in military time

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab