New post

Find

Article
· Mar 19, 2020 10m read

Developing Operational Analytics Dashboards

Hi Developers and Interface Engineers!

I'd like to share with you how you can help your organization today obtain a better understanding of key message processing metrics (i.e. average message processing times, number of inbound messages, number of outbound messages, etc.)! Given the embedded IRIS database powering integration, you already have all the data you need -- you just need to put the data to use and present them in a user-friendly format!

Let me walk you through a sample implementation of an operational analytics dashboard that has served as a template for many organizations using these dashboards in production today. This particular sample dashboard will include the following metrics:

 

You can find the accompanying sample code here on Open Exchange. Just as a note, I used IRIS for Health 2019.1, but this can be done on Ensemble, Health Connect, and HealthShare.

Now, let's dive in!

1) Create a New Namespace: “REPORTS”

In this section, we will create a new namespace called “REPORTS,” where we will be compiling all the messages from other namespaces of interest to compute the message processing metrics.  

  1. From the main screen of the Management Portal, click System Administration à Configuration à System Configuration à Namespaces
  2. To create a new namespace, click the Create New Namespace button on the top left corner of the page.
  3.  Fill in the following information to configure the namespace:
    1. Name of the namespace: REPORTS
    2. The default database for Globals: Local Database
    3. Select an existing database for Globals: Select Create New Database

This will launch the Database Wizard, which is used to create a new database 

      1. Enter the name of your database: REPORTSGLOBALS
      2. Database directory: C:\InterSystems\HealthShare\mgr\REPORTSGLOBALS

A warning will appear saying that the directory does not exist. This is okay.

      1. Click Next. Click Finish.
    1. The default database for Routines: Local Database
    2. Select an existing database for Routines: Select Create New Database

This will launch the Database Wizard, which is used to create a new database 

      1. Enter the name of your database: REPORTSROUTINES
      2. Database directory: C:\InterSystems\HealthShare\mgr\REPORTSROUTINES

A warning will appear saying that the directory does not exist. This is okay.

      1. Click Next. Click Finish.
    1. Click Save. Wait for the namespace to be created – a new page will show up.
  1. Scroll to the bottom of the new Enable Ensemble Namespace page and click Close.

To edit the settings of a namespace, click the namespace on the Namespaces page and edit the desired properties. Then click Save in the top left corner of the page.

2) Import Code via Studio

In this section, we will use Studio to code and create necessary class files to fetch messages from all namespaces specified in the ^ReportNamespaces global and store the computed metrics in the Demo.OperationalAnalytics.MetricsTable class.

  1. Open Studio. Ensure you are in the REPORTS namespace. To switch namespaces, go to File à Change Namespace and select the REPORTS namespace.
  2. Click File à New. Under Categories, select General. Under Templates, select Class Definition and click OK.
    1. In the New Class Wizard, specify the following:
      1. Enter a package name: Demo.OperationalAnalytics
      2. Enter a class name: Compute
      3. Click “Next”
      4. For Class Type, press “Extends” and enter %SYS.Task.Definition for the Name of super class. This is to enable scheduling via Task Manager.
      5. Click “Finish”
  3. Within the curly braces of the Demo.OperationalAnalytics.Compute class, copy-paste the following:
  • Retrieve the code from Open Exchange
  • Wait until we create the actual table to compile the class we just created.
  1. Click File à New. Under Categories, select General. Under Templates, select Class Definition and click OK.
    1. In the New Class Wizard, specify the following:
      1. Enter a package name: Demo.OperationalAnalytics
      2. Enter a class name: MetricsTable
      3. Click “Next”
      4. For Class Type, select “Persistent”
      5. Click “Finish”
  2. Within the curly braces of the Demo.OperationalAnalytics.MetricsTable class, copy-paste the following (the code will also be available on Open Exchange):

 

  1. Compile both class files. On the top toolbar, click Build à Compile to compile the class.
  2. In the Output console at the bottom of Studio, store the names of all namespaces into the ^ReportNamespaces global.
    1. For example:
      1. set ^ReportNamespaces(1) = “SANDBOX”
      2. set ^ReportNamespaces(2) = “FHIRSERVER”
      3. Repeat until you have the names of all namespaces stored in ^ReportNamespaces. You can check which namespaces have been stored by entering “zwrite ^ReportNamespaces”

3) Add Appropriate Global/Package Mappings to Namespaces of Interest

In this section, we will add the necessary global and package mappings to all namespaces that will be reporting to the REPORTS namespace.

  1. From the main screen of the Management Portal, click System Administration à Configuration à System Configuration à Namespaces
  2. For every namespace you would like to include in the final table,
    1. Click on Global Mappings, and then click “New.” Fill in the following information:
      1. Global Database Location: REPORTSGLOBALS
      2. Global Name: (copy paste from <DataLocation> tag in Demo.OperationalAnalytics.MetricsTable file in Studio – see below)
        1. Do not include the “^”
      3. Press “OK” to close the pop-up box, and then press “Save Changes.”
    2. Click on Package Mappings, and then click “New.” Fill in the following information:
      1. Package Database Location: REPORTSROUTINES
      2. Package Name: Demo.OperationalAnalytics
      3. Press “OK” to close the pop-up box, and then press “Save Changes.”

 

 

4) Set up Cube and Pivot Table on Analytics

In this section, we will build a Cube on Analytics Architect to organize the data from Demo.OperationalAnalytics.Compute class.

  1. From the main screen of the Management Portal, click Analytics àArchitect. Ensure you are in the REPORTS namespace.
  2. Click “New” and fill in the following information:
    1. Definition Type: Cube
    2. Cube Name: Operational Analytics
    3. Cube Source: Class
    4. Source Class: Demo.OperationalAnalytics.MetricsTable
      1. Use the “Browse…” button to select the class
    5. Class Name for the Cube: Leave as is.
    6. Hit “OK” on the bottom right.
  3. From Source Class on the left-hand column, drag and drop Namespace onto the Dimensions category under the “Operational Analytics”.
    1. To create a roll-up for the date/time (year, month, day, hour):
      1. Click “Add Element” next to “Model Elements” at the top.
      2. In the pop-up window, enter the following:
        1. Enter New Element Name: DateRollUp
        2. Select Time Dimension
        3. Click “OK”
      3. Click on “DateRollUp” under Dimensions and select “Property” as “RunTime” in the Details pane. Then, click on the “H1” listed under “DateRollUp”, and click “Add Element” at the top again.
        1. Enter New Element Name: Year
        2. Select Level
        3. Click “OK”
        4. Click the new level that was just created and select the appropriate “Extract value with function” on the right-hand side under “Details”. See table below for corresponding functions.

        1. Repeat for Month, Day, and Hour

Element Name

Year

Month

Day

Hour

Function

Year

MonthYear

DayMonthYear

HourNumber

 

  1. Drag and drop the remaining metrics except %ID (AvgAckTime, AvgTime, MaxTime, MinTime, NumInbound, and NumOutbound) onto the Measures category.
    1. The following only applies to the time metrics (AvgAckTime, AvgTime, MaxTime, MinTime). Leave NumInbound and NumOutbound as is:

Under Details on the right-hand side, set the “Precision” to 3, as shown below.

  1. Press “Compile” and hit “Done” once finished. The Cube should look like the following:

 

 

  1. Back in the Management Portal, go to Analytics àAnalyzer. In the Analyzer, press the cube on the top left and select the “Operational Analytics” cube we just created.
    1. The Analyzer may already load the “Operational Analytics” cube. Move onto step 7 if so
  2. Drag and drop all the measures (except “Count”) under Columns. As for the dimensions, drag and drop them onto rows in the following manner:

After dragging Namespace into Rows, drag DateRollUp onto the diagonal arrow of Namespace.

  1. To format the numbers that will show up in the table, click on the “wheel” symbol next to each measure you added in the column (see image above).
  2. When the “Level Options” window pops out, press “Format and Style” to expand the section.
    1. Enter “#” in the Format section for NumInbound and NumOutbound.
    2. Hit “OK” to exit.

  1. Press “Save” at the top, and fill in the following information for “Save Pivot”:
    1. Folder: Demo (up to user discretion)
    2. Pivot Name: Operational Analytics Pivot
    3. Press “OK”

5) Create a Dashboard on Analytics – User Portal

In this section, we will set up a dashboard on Analytics User Portal to display the resulting Operational Analytics pivot table.

  1. From the main screen of the Management Portal, click Analytics à User Portal. Ensure you are in the REPORTS namespace.
  2. Press the large “+” sign at the top, and then press “Add Dashboard” under “Add New Item” on the left-hand column.
    1. Fill in the following information to create a new dashboard.
      1. Folder: Demo (up to user discretion)
      2. Dashboard Name: Operational Analytics Dashboard
      3. Dashboard Title: Operational Analytics Dashboard
      4. Press “OK” at the bottom right.
  3. An empty dashboard will have appeared on the page. Click the right-hand arrow on the left-side of the page. In the Dashboard Editor that will slide out, click “Widgets” and then the “+” sign to add a widget.
  4. In the Widget Wizard, click on “Pivots and Charts” on the left-hand column, and then select “Table”. See example image below.
    1. Data source: Demo/Operational Analytics Pivot.pivot (use the magnifying glass button to navigate)
    2. Widget Name: Operational Analytics Widget
    3. Press “OK” on the bottom right to exit the wizard.

The resulting widget will display the data stored in the Demo.OperationalAnalytics.MetricsTable. As of right now, there is no data stored and you will see an empty table.

 

By adding a filter on Namespace or Year/Month/Day/Hour, we can focus on particular dates and exclude “null” data.

  1. Click the right-hand arrow on the left-side of the page. In the Dashboard Editor that will slide out, click “Widgets” and then select the “Operational Analytics Widget” widget.
  2. Click on “Controls” and then press the “+” sign to prompt the Control Wizard
    1. Target: *
    2. Action: Apply Filter
    3. Filter: (put in Namespace, Month, etc.)
    4. Press “OK” to exit the wizard.
  3. Press “Save” on the top to preserve the newly added filter.
  4. More filters can be added by following the above procedure.

6) Schedule to Run Hourly using Task Manager

In this section, we will use the Task Manager to schedule the Operational Analytics Dashboard to refresh every hour to evaluate the messages from the preceding hour.

  1. From the main screen of the Management Portal, ensure you are in the REPORTS namespace. To navigate to Task Manager, click System Operation à Task Manager à New Task
  2. Fill out the Task Scheduler Wizard:
    1. Task name: Refresh Operational Analytics Dashboard
    2. Namespace to run task in: REPORTS
    3. Task type: Demo.OperationalAnalytics.Compute
    4. Click “Next>” on the bottom of the screen.
    5. How often do you want the Task Manager to execute this task? Daily
      1. Every “1” day(s)
      2. Specify Start Date (End Date is not necessary)
      3. Select the option to “Run every ___” and modify to “Run every 1 Hours”
      4. First time to run: 00:00:00
      5. Last time to run: 23:00:00
    6. Press “Finish” to exit the wizard.

7) Verifying the Implementation

In this section, we will examine how to verify the above implementation of the operational analytics table displaying key metrics of processing messages across specified namespaces.

To observe the contents of the Demo.OperationalAnalytics.MetricsTable, we can take advantage of the built-in SQL feature.

  1. From the main screen of the Management Portal, ensure you are in the REPORTS namespace.
  2. Navigate to System Explorer à SQL
  3. Click “Execute Query” and insert the following SQL statement:
    1. select * from Demo_OperationalAnalytics.MetricsTable
  4. Press “Execute” and the contents will be displayed via SQL.

8) Resulting Analytics Dashboard: Sample

By following the above implementation, we are able to achieve a table listing the metrics for messages from specified namespace(s).

 

 

 

 

*Please note that the data has been generated for display purposes.

 

Double click on "2019" next to SANDBOX to take advantage of the DateRollUp we created! 

Continue clicking down into "Mar-2019" or any of the other months to drill down into days and then hours.

 

... and that's it! Please feel free to adapt the sample code to meet the needs of your organization!

If you have any questions, please reach out to your account's Sales Engineer!

3 Comments
Discussion (3)2
Log in or sign up to continue
Question
· Mar 19, 2020

Cache sql syntax and meaning

Hi ,

 

I have a code written in cache  sql and trying to understand it, below is the code , can anyone help me understand what does that mean 

ex - !! dosage_unit !!

 

 

SELECT (CASE WHEN (order_description IS NULL OR (order_description='')) THEN '' ELSE (order_description) END) !! (CASE WHEN (dosage IS NULL OR dosage_unit IS NULL OR (dosage='') OR (dosage_unit='')) THEN '' ELSE (', ' !! dosage !! ' ' !! dosage_unit !!

 

Thank You in advance.

12 Comments
Discussion (12)1
Log in or sign up to continue
InterSystems Official
· Mar 12, 2020

March 11, 2020 – Multiple HealthShare Advisories

This message contains five recent HealthShare Advisories, which are available below.

These advisories are also on the InterSystems Product Alerts and Advisories page

If you have any questions regarding these advisory, please contact the Worldwide Response Center (WRC).

March 11, 2020 – Advisory: Gap in medications display if generic names not included

InterSystems has corrected a defect affecting how medications are displayed in the Clinical Viewer, when the generic name is not provided.

This problem exists for:

  • HealthShare Information Exchange 2018.1
  • HealthShare Unified Care Record 2019.1

This defect occurs when incoming medication data does not include the generic name within the Unified Care Record and subsequently is not displaying the Clinical Viewer.  This has been corrected as of 2019.1.2. This can be resolved by requesting an Ad hoc with the dev key below.

The correction for this defect is identified as dev key WRS1026 and will be included in all future product releases. It is also available via Ad hoc change file (patch) or full kit distribution by contacting the Worldwide Response Center (WRC).

If you have any questions regarding this advisory, please contact the WRC.

March 11, 2020 – Advisory: Updated the Clinical Viewer so that silent encounters do not display

InterSystems has corrected a defect affecting silent encounters in the Clinical Viewer.

This problem exists for:

  • HealthShare Information Exchange 2018.1
  • HealthShare Unified Care Record 2019.1

The Unified Care Record creates a silent encounter when incoming data is not associated with an encounter.  The defect is that these silent encounters were displaying within the Clinical Viewer, when they should not. This has been corrected as of 2019.1.2. Customers using 2018.1 and 2019.1 can request an ad hoc with the dev keys below.

If customers have not upgraded to HealthShare Information Exchange 2018.1 or Unified Care Record 2019.1, this defect is not present. The Unified Care Record 2019.1.2 release has fixed this defect.

The correction for this defect is identified as dev keys WRS1027, WRS1052 and WRS1067, which will be included in all future product releases. It is also available via Ad hoc change file (patch) or full kit distribution by contacting the Worldwide Response Center (WRC).

If you have any questions regarding this advisory, please contact the WRC.

March 11, 2020 – Advisory: Corrected gap in custom lab charts not displaying all results in Clinical Viewer

InterSystems has corrected a defect affecting custom lab charts.

This problem exists for:

  • HealthShare Information Exchange 2018.1 HealthShare Unified Care Record 2019.1

This defect occurs when a Unified Care Record customer has created a custom lab chart where not all incoming lab data is tagged with the "lab" category in SDA.  This can be resolved by requesting an ad hoc with the dev key below.

If customers have not upgraded to HealthShare Information Exchange 2018.1 or Unified Care Record 2019.1, this defect is not present. The Unified Care Record 2019.1.2 release has fixed this defect.

The correction for this defect is identified as WRS1025 which will be included in all future product releases.  It is also available via Ad hoc change file (patch) or full kit distribution by contacting the Worldwide Response Center (WRC).

If you have any questions regarding this advisory, please contact the WRC.

March 11, 2020 – Advisory: Residual Locks on Late Update

InterSystems has corrected a defect when the InactiveMRNHandlingMode is set to Late Update.

This problem exists for:

  • HealthShare Unified Care Record 2019.1

This defect occurs when the InactiveMRNHandlingMode in the HS.Gateway.ECR.Manager is set to Late Update. In rare situations where the Late Update code is triggered, locks on an MRN can fail to be released. This can result in messages becoming stuck in the ECR Manager.

The correction for this defect is identified as dev key MCZ110 and included in all product releases from Unified Care Record 2019.1.1 onwards.  It is also available via Ad hoc change file (patch) or full kit distribution by contacting the Worldwide Response Center (WRC).

If you have any questions regarding this advisory, please contact the WRC.

March 11, 2020 – Advisory: Incorrect HealthShare Mirror Upgrade Documentation could lead to Data Integrity issues

InterSystems has corrected a defect in the steps needed to upgrade a mirrored HealthShare environment.

This problem exists for:

  • All versions of HealthShare Information Exchange, Unified Care Record, Patient Index, Health Insight, or Personal Community that support mirroring prior to version 2019.2.

This does not affect any versions of Health Connect or IRIS for Health.

In previous versions, the HealthShare mirror upgrade procedure was written in a way that minimized system downtime. Specifically, the mirror upgrade instructions allowed customers to continue processing new data until after the backup mirror member was already successfully upgraded and running the new version. Due to changes in the data model between versions, the recommendation now is to stop processing new data immediately upon beginning the upgrade procedure.

If customers were to follow the previously documented mirror upgrade procedure, it could cause an issue where new data comes in using the data model from the previous version, but then gets mirrored to a backup member without going through the proper conversion steps.

For more information, please see the 2019.2 mirror upgrade documentation.

With each upgrade, it is important to review and follow the upgrade instructions included for the version. The new procedure of turning off data feeds at the beginning of the upgrade should be followed for all upgrades, including those to previous versions such as 2019.1 or 2018.1. The documentation for these version has been updated.

Customers upgrading their mirrored environments should NOT reference the documentation available with their current version. Instead, they should reference the HealthShare 2019.2 online documentation for the correct set of instructions, specifically the section titled Upgrading a Unified Care Record Mirror.

There are no code changes related to this Advisory and an Ad hoc is not required.

If you have any questions regarding this advisory, please contact the Worldwide Response Center (WRC).

Discussion (0)0
Log in or sign up to continue
Article
· Mar 6, 2020 2m read

InterSystems IRIS Business Intelligence: Building vs Synchronizing

InterSystems IRIS Business Intelligence allows you to keep your cubes up to date in multiple ways. This article will cover building vs synchronizing. There are also ways to manually keep cubes up to date, but these are very special cases and almost always cubes are kept current by building or synchronizing.

What is Building?

The build starts by removing all data in the cube. This ensures that the build is starting in a clean state. The build then goes through all records specified by the source class. This may take all records from the source class or it may take a restricted set of records from the source class. As the build goes through the specific records, the data required by the cube is inserted into the cube. Finally, once all of the data has been inserted into the cube, the indices are built. During this process, the cube is not available to be queried. The build can be executed single-threaded or multi-threaded. It can be initiated by both the UI or Terminal. The UI will be multi-threaded by default. Running a build from terminal will default to multi-threaded unless a parameter is passed in. In most cases multi-threaded builds are possible. There are specific cases where it is not possible to perform a multi-threaded build and it must be done single-threaded.

What is Synchronizing?

If a cube's source class is DSTIME Enabled (see documentation), it is able to be synchronized. DSTime allows modifications to the source class to be tracked. When synchronization is called, only the records that have been modified will be inserted, updated, or deleted as needed within the cube. While a synchronize is running, the cube is available to be queried. A Synchronize can only be initiated from Terminal. It can be scheduled in the Cube Manager through the UI, but it can't be directly executed from the UI. By default, synchronize is executed single-threaded, but there is a parameter to initiate the synchronize multi-threaded.

 

It is always a good idea to initially build your cube and then it can be kept up to date with synchronize if desired.

Recap of differences

  Build Synchronize
Which records are modified? All Only records that have changed
Available in UI? Yes

No

Multi-Threaded Yes, by default

Yes, not the default

Cube available for query No(*1) Yes
Requires source class modification No Yes, DSTIME must be enabled

 

Build Updates

(*1) Starting with InterSystems IRIS 2020.1, Selective Build is now an available option while building your cube. This allows the cube to be available for querying while being built selectively. For additional information see Getting Started with Selective Build

Synchronize Updates

Starting with InterSystems IRIS 2021.2, DSTIME has a new "CONDITIONAL" option. This allows implementations to conditionally enable DSTIME for specific sites/installations.

1 Comment
Discussion (1)1
Log in or sign up to continue
Question
· Mar 3, 2020

Server side pagination with Iris?

Hi,

Do you have any experience in server side pagination with IRIS using Angular on the client side?
Any idea on a typical SQL request on the server side?

Thanks!
Blaise

6 Comments
Discussion (6)0
Log in or sign up to continue