none
Cholesterol Profile LDL, HDL, and Triglycerides units

    Question

  • How do I determine the units (e.g. mmol/L or mg/dL) of the LDL, HDL, Triglycerides and Total Cholesterol values in the Cholesterol Profile class?  

    Whatever units I have set when I enter the data in Health Vault, those are the values I get back via the Health Vault API. I was expecting (from the documentation) everything to be in mg/dL .

    I am currently using version 1.0.2193.4712 of the Health Vault API.

    Wednesday, November 13, 2013 11:30 PM

Answers

  • Hi Phil,

    A while ago we updated the Cholesterol Profile type in HealthVault to support storing the units and the value of the original measurement (HealthVault calls this the display value).

    Even though our web-service supports this newer updated type, the HealthVault SDK that you're using (version 1.0.2193.4712 form November 2009) does not have built-in support for it.  If you pick up the latest version of the SDK, you'll see the new CholesterolProfileV2 type.

    In the old type, values are specified in mg/dL units -- you can't specify another unit.

    In the new type (CholesterolProfileV2), values are specified in mmol/L units (this is the value applications can use for calculations and such), and additionally you can store a "display value" in whatever units you wish (this is the value used for display purposes.)

    For example, if I was adding cholesterol profile information to HealthVault using this new type, and the results that I am recording were originally in mg/dL, this is what I'd do:

    // Storing HDL originally measured or user-entered in mg/dL
    double originalHDL = 100.0;
    
    CholesterolProfileV2 ch = new CholesterolProfileV2();
    ch.HDL = new ConcentrationMeasurement();
    
    // store value in mmol/L -- need to convert from mg/dL
    ch.HDL.Value = originalHDL * 0.0259;
    
    // store original value in original units (optional)
    ch.HDL.DisplayValue =
        new DisplayValue(originalHDL, "mg/dL", "mg-per-dl");

    and if the results I was recording was in mmol/L this is what I would do:

    // Storing HDL originally measured or user-entered in mmol/L
    double originalHDL = 2.5;
    
    CholesterolProfileV2 ch = new CholesterolProfileV2();
    ch.HDL = new ConcentrationMeasurement();
    
    // store value in mmol/L -- no conversion required
    ch.HDL.Value = originalHDL;
    
    // store original value in original units (optional)
    ch.HDL.DisplayValue =
        new DisplayValue(originalHDL, "mmol/L", "mmol-per-l");

    Note that in display value, we specify value, units, and units code.  Specifying a standard code for the units is optional, but makes it localizable by other consumers of this data.  See the HealthVault Lab Results Units vocabulary.

    Since we're on this subject, a little reminder that HDL, LDL, and total cholesterolall use the same conversion factor (1 mg/dL ~= 0.0259 mmol/L), but triglyceride has a different conversion factor (1 mg/dL ~= 0.0113 mmol/L).

    • Marked as answer by Phil Brock Thursday, November 14, 2013 4:17 PM
    Thursday, November 14, 2013 8:32 AM

All replies

  • Hi Phil,

    A while ago we updated the Cholesterol Profile type in HealthVault to support storing the units and the value of the original measurement (HealthVault calls this the display value).

    Even though our web-service supports this newer updated type, the HealthVault SDK that you're using (version 1.0.2193.4712 form November 2009) does not have built-in support for it.  If you pick up the latest version of the SDK, you'll see the new CholesterolProfileV2 type.

    In the old type, values are specified in mg/dL units -- you can't specify another unit.

    In the new type (CholesterolProfileV2), values are specified in mmol/L units (this is the value applications can use for calculations and such), and additionally you can store a "display value" in whatever units you wish (this is the value used for display purposes.)

    For example, if I was adding cholesterol profile information to HealthVault using this new type, and the results that I am recording were originally in mg/dL, this is what I'd do:

    // Storing HDL originally measured or user-entered in mg/dL
    double originalHDL = 100.0;
    
    CholesterolProfileV2 ch = new CholesterolProfileV2();
    ch.HDL = new ConcentrationMeasurement();
    
    // store value in mmol/L -- need to convert from mg/dL
    ch.HDL.Value = originalHDL * 0.0259;
    
    // store original value in original units (optional)
    ch.HDL.DisplayValue =
        new DisplayValue(originalHDL, "mg/dL", "mg-per-dl");

    and if the results I was recording was in mmol/L this is what I would do:

    // Storing HDL originally measured or user-entered in mmol/L
    double originalHDL = 2.5;
    
    CholesterolProfileV2 ch = new CholesterolProfileV2();
    ch.HDL = new ConcentrationMeasurement();
    
    // store value in mmol/L -- no conversion required
    ch.HDL.Value = originalHDL;
    
    // store original value in original units (optional)
    ch.HDL.DisplayValue =
        new DisplayValue(originalHDL, "mmol/L", "mmol-per-l");

    Note that in display value, we specify value, units, and units code.  Specifying a standard code for the units is optional, but makes it localizable by other consumers of this data.  See the HealthVault Lab Results Units vocabulary.

    Since we're on this subject, a little reminder that HDL, LDL, and total cholesterolall use the same conversion factor (1 mg/dL ~= 0.0259 mmol/L), but triglyceride has a different conversion factor (1 mg/dL ~= 0.0113 mmol/L).

    • Marked as answer by Phil Brock Thursday, November 14, 2013 4:17 PM
    Thursday, November 14, 2013 8:32 AM
  • Thank you Saeed, that is exactly the type of answer I was looking for. Excellent on your part!
    Thursday, November 14, 2013 4:18 PM