Extensions (LPP)

SmartForm Server-side Scripting Functions

Extensions can be used to perform server-side (cache) scripting, giving the ability to programmatically perform some data manipulation actions that are not supported within SmartForms. Most commonly, a particular type of SmartForm may not support display or editing of a specific patient data (EPT) record. To work with that information, it may be possible to manage a SmartData element within the form and to set the value of that element from the EPT record while loading the form, then return the SDE value the EPT record on closing the form.

The following SmartForm scripting use cases offer extensions that can be copied and configured to accomplish a specific task.

Cache Code

Core data management functions draw from the "HULIB100" library for SmartForm scripting. Callable tags include:

SmartForm Scripting using Epic Extension Code Templates

SmartForm Script - Set value for a Date-type SmartData Field based on a time-offset interval

LPP 37963 (IP SMARTFORM SCRIPTING SET DEFAULT DATE) can be copied and used to set the value of a SmartForm Field of "Date" type (usually data bound to an SDE element). When this programming extension is added as a scripting action to the AfterDataLoaded event of the RootComponent, it will set a default date for the field when the form is loaded. The same functionality can be attached to other events (e.g., command buttons to set the date of a related field).

SmartForm Script - Set SmartForm Label Caption from a Rule (CER) Message in Patient Context

LPP 42320 (ES SMARTFORM SET LABEL CAPTION) can be copied and used to set the caption of a SmartForm Label object

SmartForm Script - Set SmartForm SmartData value from a Rule (CER) Message in Patient OR Score Context (any target SDE data type)

LPP 12713 (SF SCRIPTING EXT - ADD RULE ERROR MESSAGE TO SDE) can be copied and used to set a SmartForm SmartData element from a rule error message.

SmartForm Script - Set SmartForm-Bound EPT (Chronicles) Data Value from a Rule (CER) Message

LPP 42940 (ES SET RULE ERROR IN SMARTFORM FIELD) can be copied and used to set the value of a SmartForm Field object. 

SmartForm Script - Append Values to a SmartForm SmartData element that is in List (category) format

LPP 24516 (SMARTFORM APPEND VALUES) can be copied and used to add values to a List, SmartGrid or a SmartText Box component via SmartForm Scripting.

Custom SmartForm Extensions

Set SmartForm Label Caption from a Rule (CER) Message in Patient Score Context

Patient Rule Error Message to SmartData Element - Update SmartData element from error message from a Rule (CER) in Patient Context

Patient Score Rule Error Message to SmartData - Update SmartData element from error message from a Rule (CER) in Patient Score Context

Flowsheet to SmartData - Set SDE Value from Flowsheet Row Value - String Only

SmartData to Flowsheet - Set Flowsheet Row Value from SDE Value - Category (single-select) or String

SmartData to Flowsheet - Set Flowsheet Row Value from SDE Value - Date Only

SmartData to Flowsheet - Set Flowsheet Row Value from SDE Value - Multi-select

SmartData to SmartData - Update one SmartData element from another (equivalent type) SDE


Resources