Using Sentry Alerts In Your C/S NPR Code

Using Sentry Alerts In Your C/S NPR Code

This document may be outdated. It was moved to the HCI Wiki:






Anytime we setup an HCI Universe on-site, we setup our Sentry application. There should be a database in the HCIS called SEN.HCI. Sentry is a call home alerting service. We can utilize it to send an email alert back to support staff here at the HCI Solution. The idea is that we write code that will report back to us when a problem is encountered. This allows us to resolve problems before our customers are even aware there is a problem.

Below is an example of some code that you can use to generate a Sentry email alert. This code is from the EOB interface that was written for Fauquier Healthcare.
  • Add the code to the point in your program where you can check for an error condition.
  • Notice how I added "EOB AETNA iNTERFACE" as a prefix to the error that is returned by the interface? You may have more than one interface running in an HCIS, so it's good to know which interface the message is coming from.
  • Add code to generate an alert when an interface starts. This way if you keep getting several startup type alerts concurrently, it most likely indicates that your interface is crashing.
  • Add code to generate a message if the interface receives a shut-down command.
  • Test the alert to make sure it is working properly.
...
END;

#MAYBE.SEND.SENTRY.ALERT
IF{"Y"=DEBUG.MODE;
   "Y"'=@MIS.APPL.DB.active["SEN.HCI"];
   IF{%(SEN);%Z.link.svc(`P,O,S',"SEN")^SERR},
   SERR;
   %SEN.U.sentry("W","EOB AETNA INTERFACE: "_ERR)};

It's probably also a good idea to close the %(SEN) prefix at the end of your program:

IF{%(SEN) %Z.link.svc(`P,C,U',"SEN")},

    • Related Articles

    • How to Find MT Interface Job Machine's IP Address

      Logon to Meditech with HCI User and go to the Interface Manager Under MIS     Find any running interface, and click the + button next to the mnemonic      Clicking on the Magnifying glass under the "Job" Column in the image above gets you the next ...
    • Extract and Convert Base64 Data from MEDITECH Outbox Message

      This is a C/S NPR utility. Run this program from the front end: ; ; Arguments: ;  A = MIS.XO.MSG.urn ; ; This code will retrieve an outbox message, save it locally, ;   then extract the base64 content out of the message and save it to a ;    binary ...
    • Map Citrix Keys for Meditech NPR Report Writing

      [HKEY_CURRENT_USER\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine\Hot Keys] "AllowHotkey"="0" "ConnectionBar"="" "Hotkey3Shift"="(none)"    ;yes, you need to put (none) as the value "Hotkey4Shift"="Ctrl" ...
    • CS Download File Path Default

      If you don't want to get to the Print, View, Download page and just enter a download path or default a download path: add Z.cust.rw.download.path IG Download Path to your selection criteria Select #9. Edit Elements to add a default path for that ...
    • Report Designer Rule Functions - Date/Time and Other String Conversion Functions

      When building Report Designer rules there a re a bunch of date/time functions (and others) available in the string conversion functions. Here are some MEDITECH articles that are a great reference when using these functions. I have also included the ...