lib/sections/vitals.js
function getVitalUnits(vitalType) {
    /*for height and weight, you need some kind of realistic numberical evaluator to
     determine the weight and height units */
    if (vitalType.toLowerCase() === 'blood pressure') {
        return 'mm[Hg]';
    } else if (vitalType.toLowerCase().indexOf('glucose') >= 0) {
        return 'mg/dL';
    } else if (vitalType.toLowerCase().indexOf('height') >= 0) {
        return 'cm';
    } else if (vitalType.toLowerCase().indexOf('weight') >= 0) {
        return 'kg';
    }

    return null;
}
function getVitalUnits(vitalType) {
    /*for height and weight, you need some kind of realistic numberical evaluator to
     determine the weight and height units */
    if (vitalType.toLowerCase() === 'blood pressure') {
        return 'mm[Hg]';
    } else if (vitalType.toLowerCase().indexOf('glucose') >= 0) {
        return 'mg/dL';
    } else if (vitalType.toLowerCase().indexOf('height') >= 0) {
        return 'cm';
    } else if (vitalType.toLowerCase().indexOf('weight') >= 0) {
        return 'kg';
    }

    return null;
}
function getVitalUnits ( vitalType ) { /*for height and weight, you need some kind of realistic numberical evaluator to
     determine the weight and height units */ if ( vitalType . toLowerCase ( ) === 'blood pressure' ) { return 'mm[Hg]' ; } else if ( vitalType . toLowerCase ( ) . indexOf ( 'glucose' ) >= 0 ) { return 'mg/dL' ; } else if ( vitalType . toLowerCase ( ) . indexOf ( 'height' ) >= 0 ) { return 'cm' ; } else if ( vitalType . toLowerCase ( ) . indexOf ( 'weight' ) >= 0 ) { return 'kg' ; } return null ; }
this needs to be a more complex function that can correctly analyze what type of units it is. Also should be given the value as well later.
this needs to be a more complex function that can correctly analyze what type of units it is . Also should be given the value as well later .