Has anyone built or considered building the display of a Terms and Conditions page in OpenMRS?
At PIH we are starting to consider having all users of our production implementations review (and maybe sign) a data use Terms and Conditions note. Certainly we could handle this offline but it would be great if it was something integrated into the app. I’m thinking a page that gets displayed and requires a checkbox the first time a use signs in?
Let us know if anyone has any thoughts!
fyi @dmunson , @mogoodrich , @mseaton
This sounds like a great opportunity to test the modularity of OpenMRS 3 by creating an optional module. It would require a useful post-authorization extension point so it could intervene immediately following login. And it would need to be able to cancel the login if the user declined the agreement.
You could accomplish this with a combination of global properties and a user property:
- Global property
terms_and_conditions (and optionally
terms_and_conditions_xx for localized versions) to contain rich text terms and conditions
- Global property
terms_and_conditions_version to hold the current version number of terms and conditions (in case they change over time).
- User property
terms_and_conditions_agreed to contain json or delimited timestamp & version to which the person agreed.
When I user logs in, you read their
terms_and_conditions_agreed user property. If it doesn’t exist or if the version doesn’t match the
terms_and_conditions_version global property, then you present the terms and conditions (looking for the global property
terms_and_conditions_xx for their default locale and falling back to
terms_and_conditions if that global property isn’t found). If they agree, you update their user property with the current timestamp & the current version. If they decline, you log them out.
p.s. The extension point for this frontend module could help pave the way for a 2FA (two factor authentication) GSoC project, which would need nearly the same type of extension point in the frontend.
Do any OpenMRS implementations have existing terms and conditions text that we could run by our legal team?