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

Fix in vitals form #348

Merged
merged 1 commit into from
Nov 20, 2016
Merged

Conversation

matrix-amiel
Copy link
Member

here I try to resolved error that occur when you use for distance calculation with centimeter and not with inch.
this form gets the data in cm converts it to inch but it saves the number in the database only with 2 decimal places so when the form shows the data again in centimeter it can show wrong.
example -
height - 160cm -> convert to inch -> 62.99 -> convert again to cm -> 159.99

The solution is to round but only the second decimal.

thanks
Amiel

@matrix-drorgo
Copy link
Contributor

If you use 10 floating points number the problem should be resolved.

??? ?? Outlook for Androidhttps://aka.ms/ghei36


From: matrix-amiel notifications@github.com
Sent: Tuesday, November 15, 2016 9:52:40 PM
To: openemr/openemr
Subject: [openemr/openemr] Fix in vitals form (#348)

here I try to resolved error that occur when you use for distance calculation with centimeter and not with inch.
this form gets the data in cm converts it to inch but it saves the number in the database only with 2 decimal places so when the form shows the data again in centimeter it can show wrong.
example -
height - 160cm -> convert to inch -> 62.99 -> convert again to cm -> 159.99

The solution is to round but only the second decimal.

thanks
Amiel


You can view, comment on, or merge this pull request online at:

#348

Commit Summary

  • vitals form - round the result in CM (case becuse in dataase it is saved in inchs )

File Changes

Patch Links:

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com//pull/348, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARhns9Y1QBC3qGvom9ETfo_XeC-XOiAgks5q-g2IgaJpZM4Ky8ot.

@matrix-amiel
Copy link
Member Author

Right, but I haven't wanted to touch in the mysql table setting and there you can save only 2 floating points number.
if I change in the database we should fix all the views else we will see long number..

@bradymiller
Copy link
Sponsor Member

This seems reasonable and tests well. Will bring it into the codebase. Thanks for the fix!
-brady

@bradymiller bradymiller merged commit 68b9668 into openemr:master Nov 20, 2016
@matrix-amiel matrix-amiel deleted the AE/formsFixes branch February 6, 2017 08:49
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.

3 participants