Weight Change Calc
3 posts
• Page 1 of 1
Posts: 15
Joined: Fri May 01, 2009 2:54 pm Location: Oregon |
My company runs assisted living centers for the elderly and part of our health tracking system is monitoring weight changes for each resident. We have fields to enter in all their vital signs each month, one of them being weight. Our current calc is Min(vital:weight)/Max(vital:weight)-1, which gives a weight range, but always spits out a negative number, even if the resident has gained a large amount of weight! What I'd like to figure out how to do is write a calc that gives a percent weight change (positive or negative) over a period, say 3 months. Anyone have any ideas?
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Hi. Well the way you have it coded (using Min) you can't tell if they have gained or lost weight. And since you've mentioned a "range" of time, I'd suggest the following:
- Add some date criteria to the relationship Vital:: (or to a new relationship just for this purpose) so you're showing a resident's weight records for a specific range of time. - Then your calc would look like Last(vital:weight) / First(vital:weight). Gains in weight would be numbers over 100%. Hope that helps. John Sindelar
SeedCode |
Posts: 15
Joined: Fri May 01, 2009 2:54 pm Location: Oregon |
That's great, John. Thank you so much!
|
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests