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")},