I have a question about deleting alerts.

As part of my demographic import program, I have found that errors
arise that need to be handled.  For example, I may have two patients
with the same name and DOB, but their SSNums differ-- most likely a
data entry error on one system or the other.

To handle these, I store the details of the error in a custom file
record (file 22706 that I created), and then create an alert that
links back to the IEN of that error record.

But now, I realize that I will be running the import on a daily basis,
and some problems that existed yesterday still exist today.  But I
don't want duplicate alerts for one same error.

So I have an option of searching for old errors and comparing to
current errors and avoiding duplicates that way.  But I think an
easier method would be to just clear all the old errors and alerts,
and run the import again and see what errors exist today.

This brings me to my question: I am having trouble figuring out how to
delete the old alerts.  I found the function in kernel,
DELETE^XQALERT.  It takes as input, a XQAID, that the manual describes
as this:

Alert Identifier of the alert to delete.  It must be a complete Alert
Identifier, containing all three semicolon pieces.  The first
semicolon piece (Package Identifer) must be in the same form as the
creator defined it, the second piece being the DUZ of the user who
created the alert, and the third piece being the time the alert was
created (the second and third pieces are defined by the Alert
Handler).

Below is the code where I make the alert.


MakeErrAlert(IEN,User,PtInfo)
        ;"Purpose: To create an alert regarding upload error
        ;"Input: IEN -- The IEN of the error, stored in file 22706
        ;"       User -- the IEN in file 200 (i.e. DUZ) of user to
receive alert.
        ;"       PtInfo -- PASS BY REFERENCE.  an array containing
patient info, as created by ParseLine()
        ;"Output: An alert will be created in send to User
        ;"Result: none

        new XQA,XQAMSG,XQAID
        new XQAOPT ;" ensure no residual menu option specified

        set XQA(User)=""
        set XQAMSG="Problem with upload of Sequel data for:
"_$get(PtInfo("FULL NAME"))
        set XQAID="TMG"
        set XQADATA=IEN
        set XQAROU="HANDLE^TMGSEQL2"

        do SETUP^XQALERT

        quit



When I later go to delete such an alert, I will know the package
identifier (I think in my case it is that "TMG" I put into XQAID, and
will know the DUZ.  But that creation time is the problem.

Does everyone keep track of the time that they make an alert, so they
can later delete it?  Isn't there another way?  What if I store the
time of the error creation (obtained by $$NOW^XLFDT), but there is a
change in the seconds between when I ask for the current time, and
when I ask for the creation of the alert?

Also, menu option XQALERT BY USER DELETE doesn't seem need to have a
copy of the creation time to achieve deletion.

Any thoughts?

Kevin


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to