Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add email validation in initial installation #7338

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

boscosylvester-john
Copy link

@boscosylvester-john boscosylvester-john commented Apr 11, 2024

Fixes #7337

Short description of what this resolves:

This PR adds email validation for the fields 'Contact Email' and 'Trusted Email' in the patient's Demographics section. Through this, we can remove the responsibility from users to add email validations to their required fields. As email validation is a common feature and as emails are key in contacting the patients, this validation is essential.

After update:
with email validation

Changes proposed in this pull request:

  1. In database.sql script, update the INSERT statements for layout_options table where form_id is "DEM" and field_id is either "email" or "email_direct", to include the value for validation field as "email".
  2. In 7_0_2-to-7_0_3_upgrade.sql script, add UPDATE statements to update the value of validation field to "email" where form_id is "DEM" and field_id is either "email" or "email_direct"

@boscosylvester-john
Copy link
Author

Hey @bradymiller @stephenwaite
Thanks a lot for your amazing work on OpenEMR. Could you take a look at this PR.

@adunsulag
Copy link
Member

@boscosylvester-john What are your thoughts on addressing existing installation data?

@boscosylvester-john
Copy link
Author

@adunsulag Existing installations could be updated using the upgrade script 7_0_2-to-7_0_3_upgrade.sql
I have made the required changes in the upgrade script as well

@bradymiller
Copy link
Member

hi @boscosylvester-john ,
This will break if using nonstandard email address. Example is with emoticons which are now possible:
https://mailoji.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Absence of validation for emails in default installation
4 participants