Product Registration

From OpenEMR Project Wiki

Goal

Goal: Allow users to (optionally) one-time register their OpenEMR installation to improve visibility on unique users. After registering, users will receive email updates when OpenEMR is updated (including security updates).

Approach

Active PR: https://github.com/openemr/openemr/pull/257

High level: I can't imagine the service being more than a POST with email and registration_id, a GET endpoint that returns SELECT count(*) AS 'Number of Unique OpenEMR Registrations' FROM product_registration, and a POST with a message, secret_pin, and new_release_number that triggers AWS SES to inform all users of a new release/security patch. If we really wanted to, we could also capture sender IPs when adding the entry to combat spam.

Low(er) level: We'll have a new database table "product_registration" that has "id", "email", and "opt_out" columns. Regardless of if you just installed OpenEMR or are upgrading it, if you don't have a row in that table, the modal will appear on the login page. If you type your email and hit submit, it will update the table with ("some-uuid", "your@email.com", false) and will send this information to a custom php endpoint exposed at open-emr.org (we can use a file database to store the entries over there... no UI for an MVP implementation). The modal will never show up again after this point.

If you hit "no thanks", it will update the table with (null, null, true) and nothing will be sent to the open-emr.org endpoint. The modal will never show up again after this point.

If you hit "x", the modal will re-appear the next time you are at the login page.

Functionality is on the about_page.php is well.

Tasks

https://github.com/openemr/product_registration#todos

Completed

  • (Matthew/Robert/Brady) Determine overall strategy
  • (Matthew) Determine overall software design strategy
  • (Matthew) Set up jQuery modal
  • (Matthew) Implement on about area
  • (Matthew) Set up unrestricted endpoints (local system)
  • (Matthew) Add security globals to new PHP files
  • (Matthew/Brady) set up database and migration script (local system)