Widget Definition
To customize widgets, you will use the Widget Definition form which will guide you through all the steps required to create a widget. From here you can create four types of widgets.
| Option | Result |
|---|---|
| Single Row SQL | Allows up to 5 SQL statements, each one must produce a single row of data. The HTML code references the results from each of the queries and displays data in the format specified in the HTML code |
| Allows a single SQL query. The query can be simple to advancedand include HTML code to format the display. | |
| Allows you to include a URL for essential websites to ensure easy access from myAvatar. | |
| URL/POST | Allows you to create a link to myHealthPointe. |
To start creating a new widget you can:
- Add New Widget - Used when there are no widgets in the system that closely resembles what you want to accomplish.
- Edit Existing - Used to edit and existing widget’s SQL or HTML statements.
- Copy Existing - Instead of starting with a blank slate, use this option to copy a widget that is close to what you want so you can modify it.
Widgets can support up to five SQL statements to gather necessary data and should respond in fewer than five seconds. Best practice is for you to write them with Sub-second response time.
- If you have long-running widgets, Netsmart recommends building a separate database with customized views, and indexes to support the recommended sub-second response time.
- Netsmart strongly advises against the use of widgets which take longer than three seconds to load. Most widgets should load under a second. To accomplish this, there should be no table scans in the queries.
Widgets are application specific. To create a query for a PM widget that you want to access CWS tables, those CWS tables must be part of the CDR. You will not be able to access CWS tables directly from the PM Widget Definition form.
All modeled tables and most product tables will be part of the CDR.
CDR tables are copies of CWS tables in myAvatar PM. To reach CWS from PM, the data goes from CWS to PM and queries go from PM to CWS (i.e., widget multiple row SQL).
To confirm that a table is part of the CDR, go to User Definition and review the list of tables for SQL Access. The CDR tables are all under their own schema (i.e., CWSnamespace name - Original schema).
Create a Widget
- In the What can I help you find? field type “Widget Definition”
- Choose Select Widget.
- Select Add New Widget from the top of the list.
- In the Widget ID field, enter the ID for your new widget.
Note: Use alphabetical or numeric characters, separate words with an underscore ( _ ). - In the Title field, enter the widget's display title.
- In the Widget Type field select what type of widget you want to create.
- Single Row SQL - Allows up to 5 SQL statements, each one must produce a single row of data. The HTML code references the results from each of the queries and displays data in the format specified in the HTML code.
- Multiple Row SQL - Allows a single SQL query. The query can be either simple or advanced and can include HTML code to format the display.
- URL - Allows you to include a URL for essential websites to ensure easy access from myAvatar.
- URL/POST - Allows you to create a link to myHealthPointe.
- In the Widget Attributes field, select the attributes that apply.
- In the Time Limit (seconds) field, enter the maximum number of seconds that the widget will be able to run.
Note: This prevents widgets running for too long and degrading server performance.
Allowable limits are between 0.001 and 10 seconds. Netsmart recommends widgets have a time limit of 1.0 second if the widget will display in home or chart views. This prevents a scenario where many long-running widgets running at the same time slows system performance. - In the Widget Category field, enter the category you want to use to define the widget template.
Note: Categories create sub-menu items that allow you to organize your widgets, making them easier to locate. - In the Use for Templates on Demand field select Yes or No.
Note: If you select Yes, additional fields will activate. - In the Suppress Column Headers field select Yes or No.
- In the Display Widget Content Vertically in Templates On Demand field select Yes or No.
- In the Suppress Additional Line Breaks field select Yes or No.
Note: Depending on what you select in the Widget Type field different fields will activate. - Fill out the required field that is red based on previous Widget Type selection.
- In the Enhance Widget View field select Yes or No.
Note: If you select Yes, the next field will activate. - In the Primary Entity Selection field selection either Patient or Staff.
- In the Clear Entity on Row Deselect field select either Yes or No.
Note: If you select URL or URL/POST for Widget type, the final fields on form will be active. - Enter in URL.
- In the If this is a Netsmart CarePOV widget field, choose the appropriate option.
- Fill in URL keyword field.
- In the Launch URL in New Window in myAvatar NX field select Yes or No.
Edit a widget
- In the What can I help you find? field type “Widget definition”.
- Choose Select Widget.
Result: The Select Widgets screen displays. Widgets created in this form are available. - Select the widget, then select OK.
Copy From widget
- In the What can I help you find? field type “Widget definition”
- Choose Copy From Widget.
Result: The Copy From Widget screen displays. Widgets created in this form are available. - Select the widget, then select OK.
Delete a widget
- In the What can I help you find? field type “Widget definition”
- Choose Select Widget.
Result: The Select Widgets screen displays. Widgets created in this form are available. - Select the widget, then select OK.
- Select Delete Widget.
Result: A delete confirmation dialog displays. - Select OK.
- ► Test Script
-
For implementing new systems or new functionality, download the following standard test script for this feature. Please contact your Netsmart representative for more information about Test scripts.
