Database question: form_vitals table. Any reason why the values are of type dec(12,6)

I noticed that the table form_vitals changed the value type from dec(5,2) to dec(12,6)

OpenEMR 610

OpenEMR 700

And the column name for height was changed to height_dec

Some of my custom code that uses the vitals table is failing and I’m trying to figure out why this was done. Is there something I am missing? I’m always open for learning, so please advise. Also, values in the past that would print as 90.00 are printing as 90.000000000, for weight.

The next question is about the percentiles. Since its possible that the thresholds for percentiles can change over time, is there a reason why we store the absolute value instead of calculating the value based on the most recent threshold in real-time?

Thank you.

We had to change the precision on the columns due to how our metric conversions behave in order to keep the same metric value that users were entering in a Vitals form. See this issue here: https://github.com/openemr/openemr/issues/5473 where I discuss the issue.

If you can open a github issue with the weight display I’d like to make sure we fix that. We have another round of fixes coming down the pipe with the vitals form where I convert it from Smarty to Twig and we should try to get that fix in alongside the vitals form changes. We made the conversion as long term we are trying to get rid of Smarty and have everything just use twig. See my PR here: https://github.com/openemr/openemr/pull/5668

As far as calculating percentiles, I know we discussed calculating the percentile at the time the clinician entered the percentile but it was going to be quite a bit of work to put that in so in the interest of time we just put it in the hands of the clinician.

In terms of adjusting the percentile over time, I’m not sure I understand the use case. While the percentiles can change as WHO makes adjustments, I’m not sure we want to change the ‘historical’ value. The fact someone was in the 50% for height and weight in 2005 probably should not be changed to show in the 48% or whatever the new number is in 2022. Unless I’m misunderstanding what you are meaning here by adjusting the thresholds over time.

Thanks for clarifying. I’ll go ahead and open an issue.