Does anyone have a query that list all of the alert/flags (flags, care alert, popup alert) that are active? We have so many now that a lot of staff aren't really looking at them now. Most of which aren't meaningful anymore.
Second question
How do you keep a grip on staff creating alerts/flags?
If you just want to see all of the flags/care alerts etc. and you don't care about the context you can do this:
select *
from flag f
where f.status = '0'
You can then change the status value to show what you need.
0 = Unviewed
1 = Viewed
2 = On hold; saved
You are probably going to get more back than you want and will need to modify to limit by date, location or user as well.
Regarding your second question, we don't really have a policy on flags. I would be interested to hear what others have to say on that issue.
Has anyone used a query statement to remove the flags? I noticed that was a delete date field in the table. In testing that is the date for the expired date in the screen when creating an alert.
We have "deleted" flags before, or rather just marked them as deleted in bulk. They are still in the flag table the users just don't see them in the application. Off the top of my head, I believe if you change flag.status to -1 it should do it.
I found this to get you started. In this case we had sent a bulk care alert for patients who needed a prevnar injection. In the care alert we asked that users remove it after giving the injection. However, sometimes they did not, so we wanted to delete the alerts where the patient has a prevnar present. So the script below looks for the message text sent, and patients where a prevnar was given. Hopefully this is helpful.
UPDATE FLAG
SET flag.STATUS = -1
WHERE flag.ID in (
SELECT ID FROM FLAG
LEFT JOIN Immunization imm ON flag.CONTEXTID1 = imm.PID
WHERE flag.MESSAGE LIKE '%Patient due for Prevnar 13. Remove care alert after giving.%' AND flag.CONTEXTID1 IS NOT NULL AND imm.VaccineGroupName = 'Pneumococcal PCV13' AND imm.WasGiven = 'Y')