Vitals / Weight in Lbs and Ounces

bradymiller wrote on Friday, November 02, 2012:

Hi yehster,

Check out my post above (number 2) for a suggested way to go about doing this (It looks like you are heading in this direction). Just to provide a bit of history that may be helpful; about three years a ago or since, in order to support internationalization, I dropped the metric vitals forms and consolidated it all into the main vitals form. Note that this form actually only stores the values in US units and the support of the metric units in the codebase is done by converting this value, so support for alternative units is extremely lightweight and support of the lb-oz feature should be very straightforward.

-brady
OpenEMR

yehster wrote on Friday, November 02, 2012:

Brady said:

Note that this form actually only stores the values in US units and the support of the metric units in the codebase is done by converting this value

Didn’t I say that already? See my post #5.

form_vitals stores the weight value using a float to two decimal places in POUNDS. The form itself has fields to enter the data in either decimal pounds or decimal kilograms, and there is javascript which handles the conversion between the two units.

Sometimes I think you don’t believe in my competence to do the right thing. My perception is that you somehow need/want  to be involved with every decision. I know this can’t be completely true , but that’s certainly how you make me feel sometimes.

blankev wrote on Friday, November 02, 2012:

Fight over post 2 and post 5, don’t feel terrible. Just show what you can and let us enjoy your refreshed idea so OpenEMR can and will be an even better product.

Without people like you And Brady AND all others who have comment and advises OpenEMR would have failed long ago.

Have a nice weekend, Pimm

bradymiller wrote on Friday, November 02, 2012:

Hi yehster,

To be blunt. I actually think your development skills far exceed mine. There are many posts on this thread and I did not see your note regarding POUNDS. The majority of my post was supply some historical context of the current code along with pointing you towards my second post (since you didn’t seem to note the point about units_of_measurement in post 2). I did not mean to offend you at all or make you think I am second guessing you. Please continue what you are doing and disregard the post.

-brady
OpenEMR

yehster wrote on Saturday, November 03, 2012:

https://github.com/yehster/openemr/commit/dab4bdf38ccd93019dba75010fcbb93f4f9cb8c1
Preliminary implementation.

Introduced global ‘us_weight_format’ to choose display type. (decimal pounds or pounds and ounces)
Added short hand using ‘#’ for vitals input to denote pounds and ounces

There is now a global flag on the locale tab to switch between decimal pounds and pounds and ounces for display. It effects the display on the demographics screen and the historical values.  It doesn’t change the input methods.

When inputting a weight in pounds, you can use shorthand with the # symbol.  (So type 5#4) for 5 pounds 4 ounces.  It will convert to the decimal value.  There is a tool tip on the box explaining this, and this short cut works regardless of the display mode.  I chose this method because I think it creates the least amount of clutter

The data is still stored at two decimal precision in the DB.

There is no conflict with the growth charts, as everything is still maintained as decimal pounds internally.

blankev wrote on Saturday, November 03, 2012:

Yester,

now you are in the middle/end of implementing this correction, could you also change the metric values to show with three decimals? Or was this included as stated before in your post 19 (shouldn’t it be 6,3 for adults with considerable overweight, or is 5,3 better since overweight adults don’t measure in three decimals, or is the 5 not giving the totals of characters?)

Is this change of table incorporated in install for V 4.1.1.2?

Tnx, Pimm

bradymiller wrote on Sunday, November 04, 2012:

Hi yehster,

I placed a review on gihthub.

-brady
OpenEMR

yehster wrote on Friday, November 09, 2012:

I’ve pushed the code into sourceforge.
https://github.com/yehster/openemr/tree/pounds_and_ounces_final

No changes for precision of the measurements at this time. Pimm, you are right that it does probably need to be 6,3 for that change, the other thing that would need to change is the javascript which validates/converts the measurements which currently forces to two decimal places.  However I don’t have plans to work on this for the official codebase.

Part of my reluctance to implement is that its not something that we can do that would be configurable, and except for neonates, I doubt that the weight are sufficiently precise, reliable or accurate enough to warrant resolution to the gram.

blankev wrote on Friday, November 09, 2012:

Yester,

tnx for your commit, are you willing to give me some advise on how to use GIT? I did three commit and want to uncommit them,  but I don’t seem to find the solution. Every time I see them, but I don’t find the Click spot to delete. Or can you give me the site of the manual with more information on what I can and even more WHAT I SHOULD NOT DO in Github.

Concerning the thre or two decimals, it is no problem. I am used to writ that the weight of an adult is 4,500 Kilo. But I think: it is about four and a half kilo". Or it is something in between four and five kilo. But for a child and even more so for a new born or early birth the total amount of gram is important as said in a remark of DrKay.

drkay wrote on Saturday, November 10, 2012:

Thank you Yehster! I can’t wait to try it!

Regarding the weight precision, it would be nice to have 3 decimal places for the kilograms for pediatrics, but at this point I’ll take what I can get. :slight_smile:

Much appreciated!

Dr Kay

drkay wrote on Tuesday, January 29, 2013:

Yehster-

Could I try this fix yet, or does it still need work?

If it’s ready, how would I add it to my installation?

Dr Kay

aethelwulffe wrote on Tuesday, January 29, 2013:

Of course, in the US, 4,500 kilo is the mass of a very large truck.  4.500 kilos still is quite a bit less than the mass of a small adult…more like 45.000 Kilos.  I guess we get to the dot a a floating point question for the EU crowd.  I am just glad that we do not have to deal with Troy measure, shillings, or cubits.  “Cubits?  Who understandeth Cubits!?” -Noah

tmccormi wrote on Tuesday, January 29, 2013:

Don’t for “Stone” as a measure …. :slight_smile:
-Tony

yehster wrote on Wednesday, January 30, 2013:

Dr Kay,
I think the code is in fairly good shape, but a zip file for these changes is going to be riskier than the zip file I gave you for the fee sheet changes. Reversing them in the event of an unknown problem won’t be as simple as with the fee sheet.  If you can wait, I can help you out next week.

The “official way” to add the changes to your system would be to wait for Brady to release them in a patch.

As for you jokers, I think in honor of my Alma matter, I’m going to change the vitals to only accept height in “Smoots.” Brady, you are going to love that code review. 

drkay wrote on Wednesday, January 30, 2013:

Ok, no problem. I’ll wait for the patch.

Dr Kay

bradymiller wrote on Wednesday, January 30, 2013:

Hi,
I’m ok with “Smoots”, but we may need to get more input on this issue. Maybe we should add this “Smoots” issue to the next ad-hoc call. Art, can you add it please?
:slight_smile:
-brady