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

Date of Birth field accepting Future Dates #338

Closed
Elgayar opened this issue Jan 5, 2017 · 22 comments
Closed

Date of Birth field accepting Future Dates #338

Elgayar opened this issue Jan 5, 2017 · 22 comments
Assignees

Comments

@Elgayar
Copy link

Elgayar commented Jan 5, 2017

When entering a future date, it should prevent that by alerting the user with an error message, however it doesn't and instead it displays the age in negative. Which is meaningless.

image

@nileshprasad137
Copy link
Member

I'll work on this!

@nileshprasad137
Copy link
Member

please assign this to me , as i am unable to assign this to myself @teryhill @tmccormi

@tmccormi
Copy link

tmccormi commented Mar 3, 2017

Done. have a bit of fun...

@nileshprasad137
Copy link
Member

nileshprasad137 commented Mar 3, 2017

@tmccormi Some help needed !
I tried to create a patient but when i click Create new patient after entering credentials in face sheet , nothing was happening . Do I have to fill all all the details in contacts, privacy etc to add a new patient?
Also note that there is no option to select dob from calender like it has in issurance, Refer screenshots below.

dob_issue
dob_2

EDIT : After filling all the red marked fields , new patient was still not getting created. I think I'll re-setup the project . I just saw a requirement for php.ini file.

EDIT 2: Even after filling all the fields , that button doesn't work.

@teryhill
Copy link
Contributor

teryhill commented Mar 3, 2017

Name , sex and DOB should be all that is needed to create a new patient

@nileshprasad137
Copy link
Member

@teryhill was there a datepicker like that of an insurance before ,,in dob fields?

@teryhill
Copy link
Contributor

teryhill commented Mar 3, 2017

Yes , but now they should be like DOB.

image

@nileshprasad137
Copy link
Member

@teryhill okay , i was on a old version , its getting created now! Sorry for the confusion

@nileshprasad137
Copy link
Member

@teryhill @tmccormi Have a look at this.
screenshot 88

I modified Jquery file of calender and now it cannot accept any future date .
I guess this solves multiple issues 😉

@teryhill
Copy link
Contributor

teryhill commented Mar 3, 2017 via email

@nileshprasad137
Copy link
Member

oops 🙈 I'll correct that.

@teryhill
Copy link
Contributor

teryhill commented Mar 3, 2017 via email

@nileshprasad137
Copy link
Member

nileshprasad137 commented Mar 3, 2017

@teryhill Or maybe a different jquery calender file for appointments and flowboard though it'll be a bit repetitive. ?

@nileshprasad137
Copy link
Member

@teryhill I am a bit stuck up here. Have a look at file https://github.com/LibreHealthIO/LibreEHR/blob/master/interface/new/new.php

See the code from line 231 to 239
<script> $(function() { $("#DOB, #regdate").datetimepicker({ timepicker: false, format: "<?= $DateFormat; ?>" }); $.datetimepicker.setLocale('<?= $DateLocale;?>'); }); </script>

I tried to add a line maxDate:0 for setting up max date to today , but it was not working. And the point to be noted is ** even if you delete this script block , the calender runs fine**, so i think its redundant or something is overriding this script.

Please have a look , and correct me, if I am wrong.

@teryhill
Copy link
Contributor

teryhill commented Mar 4, 2017

@nileshprasad137 you are correct that code block has no bearing on the DOB . You need to look at options.inc in the \library directory. I have a change to that program that has not been committed to the code base yet so look at PR 467 . The code you are looking for is from line 364-387

@nileshprasad137
Copy link
Member

@teryhill @tmccormi
DOB not accepting future dates and flowboard accepting future dates :simple_smile:

screenshot 92

screenshot 93

Any more possible loopholes or
Issue resolved ?

@teryhill
Copy link
Contributor

teryhill commented Mar 4, 2017

@nileshprasad137 ?PR#

@nileshprasad137
Copy link
Member

ok , sending!

nileshprasad137 added a commit to nileshprasad137/LibreEHR that referenced this issue Mar 4, 2017
Fixes LibreHealthIO#338 Fix DOB to not accept any future Date
@teryhill
Copy link
Contributor

teryhill commented Mar 4, 2017

@nileshprasad137 Nice clean fix. It also takes care for deceased date.

@nileshprasad137
Copy link
Member

yes , but unfortunately i did'nt create a new Pull request! I merged that with Master so its coming in that pull request #448 . 😔

I'll not do that mistake again.
Is there a possibility of that getting fixed ?
Its time for me to work with different branches .

@teryhill
Copy link
Contributor

teryhill commented Mar 4, 2017

@tmccormi can you fix this?

@naveen17797
Copy link
Contributor

naveen17797 commented Feb 16, 2018

@teryhill seems this is the issue i have raised in my current PR, they didnt add server side validation on datepicker

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

No branches or pull requests

5 participants