ppazos / cabolabs-ehrserver

Open platform to manage and share standardized clinical data, designed by @ppazos at CaboLabs Health Informatics.
https://cabolabs.com
Apache License 2.0
177 stars 110 forks source link

QUERY BUILDER Composition Query DV_DURATION criteria always ask to "fill all the criteria values" even if the values are there. #1040

Closed ppazos closed 4 years ago

ppazos commented 5 years ago

The problem is the reference value field is number but it allows to enter characters, and when the value is checked, it returns empty because is not a number. There should be a way to check the field change and report to the user when the value is not a valid number.

ppazos commented 5 years ago

https://blogs.sap.com/2019/01/16/making-number-input-accept-only-numbers-in-edgefirefox/

ppazos commented 4 years ago

I think a check should be added when the criteria add button is clicked, so if the value is for a number field, match the value against a valid numbre regex, if that is not valid, show an error to the user.

The issue is the number field validation is only done when the form is submitted and that field is not used for the submit.

jQuery has a function to check numbers https://api.jquery.com/jQuery.isNumeric/

ppazos commented 4 years ago

done