GSOC 2019: OpenMRS Atlas 3.1

@burke @cintiadr

I’m resuming my work on ATLAS-168. This is what I’m planning on.

We create 2 new tables with schemas described here. The notifications table maps an auth rule to the last time it was notified. We run a scheduled task periodically (what do you think the period should be?) to iterate over the auth rules, and if the marker in an auth rule hasn’t been updated/notified in a while, we send them an email containing update,delete, and unsubscribe links embedding with tokens (What should we use to generate these tokens?). These tokens are managed using the ‘autotokens’ table. Here, tokens are mapped to the respective marker and action. Old tokens are cleared by a scheduler. We need to write an API to handle these links and perform the appropriate action. What do you think the API should look like?

I made an untested PR of all the changes until now. The API isn’t built yet, but I think most of the remaining work(besides testing…) is done. What do you think of this idea, and let me know of any changes you’d like (especially the names… ‘auto tokens’… there has to be a technical word for such tokens). :slight_smile:

I’ll starting testing this feature on staging once the table schemas are approved. Don’t worry, I’ll make sure to only send mails to my email. :slight_smile: