Weight and Height in Vitals not saved or displayed properly when "Show Metric Only"

Weight and Height of the patient is not saved on Vitals.
Console is giving this error when typing the value:
image

I have OpenEMR 7.0.0 (2) in a Dreamhost Shared Hosting.
And have the setting “Units for Visit Forms” set as: “Show metric Only”

As additional info, the error goes away if the setting “Units for Visit Form” is changed to: “Show both US and Metrics”

Could you fix it? I have the same problem with a fresh install.

Are you able to reproduce this problem on the demos? I just tried on the demo this morning which is a fresh install and I am not running into this problem.

On existing installations you have to clear the SMARTY cache in the Admin → Clinic → Calendar section when you upgrade. There were changes made to the vitals form with the calculations in the most recent patches.

I don’t know how the problem is happening on a fresh install which is why I wonder if there is some other setting that changes this. If you can duplicate it on the demo sites please let us know.

Thanks for answering @adunsulag. I forgot to add something, the problem occurs when the language is Spanish (Latin America). Don’t try other languages. I tried it on the demo (b). Looking at my database, it doesn’t write the measurements to the form_vitals table

Thank you, that’s very helpful! I was able to duplicate the issue and it comes down to the language translation. We are using the text for the unit to know what conversion to do. However, when we translate the unit, it doesn’t match the English unit in the code and the conversion fails. This will happen in any language that has language translations for the metric unit names.

This is a good time to bring up the dummy language (can select it as a language), which replaces every translation as “dummy”. This is there to test things and ensure that labels are not being used in the code (ie. labels should only be used on output and not used in coding algorithms). Ideally, things should never break when the dummy language is used. For the fix, the fix should work with the dummy language.

1 Like

I just realized though that the dummy language may not cover everything since we have not done a translation update for awhile (if a word shows up instead of dummy, it means either the word has not gotten to the translation spreadsheet or the xl function family is not being used at that place).

1 Like

I opened up an issue on github for this. I’ll look at getting this in alongside an ACL update I’m planning next week.

Actually, there are many forms and within the codebase, contributed forms and portal that are not translated. I directly do not report it and change the text in the scripts. I know they have a lot of work and I admire their vocation for having the system in continuous improvement. I don’t bother them about it. If you need my help, let me know. You know, I’m not a programmer, but any other intervention is fine.