HealthWatch Pro
Health data analysis and management

Growth Chart SDK Documentation

Introduction - The SDK enables developers to create customized data management applications by embedding or integrating the functionality of Growth Charts into core business applications and platforms, such as electronic medical record system. With its standards-based, Component Object Model (COM) architecture, the SDK enables our Growth Chart technology to be embedded in both commercial and externally developed applications using any developer language, such as C++, and any universal scripting language, such as JavaScript, VB.NET, and C#. Because the SDK draws on your own programming knowledge and software to create applications, programming time is significantly reduced. And because you can embed our proven expertise right into your applications and platforms, you can be assured that you have all the capabilities you need for manipulating with Growth Charts.

How to use
The SDK is an ActiveX control. All the programming information is stored in the DLL (GrowthChart.dll) as a type library and is therefore language independent. The SDK package contains the DLL, sample code written in VB script (GrowthChart.htm), and sample code written in C++ (folder GrowthChartClient).

All properties can be set in design-time or run-time.

  • GrowthChartType: This property defines the type of the Growth Charts. It should be set to 1 to 15. you may use the following enum:

       typedef enum _ChartType
          GT_B36M_LA_WA = 1,    //Birth to 36 months: Length-for-age and Weight-for-age percentiles
          GT_B36M_HA_WL,    //Birth to 36 months: Head circumference-for-age and Weight-for-length percentiles
          GT_2TO20_BMI,    //2 to 20 years: Body mass index-for-age
          GT_2TO20_SA_WA,    //2 to 20 years: Stature-for-age and Weight-for-age percentiles
          GT_2TO5_WS,    //2 to 5 years: Weight-for-Stature percentiles
          GT_WHO_WA,    //Birth to 5 years: Weight-for-age (WHO)
          GT_WHO_HA,    //Birth to 5 years: Height-for-age (WHO)
          GT_WHO_BA,    //Birth to 5 years: BMI-for-age (WHO)
          GT_WHO_AA,    //3 months to 5 years: Arm circumference-for-age (WHO)
          GT_WHO_HCA,   //Birth to 5 years: Head circumference-for-age (WHO)
          GT_WHO_WL,    //Birth to 2 years: Weight-for-length (WHO)
          GT_WHO_WH,    //2 to 5 years: Weight-for-height (WHO)
          GT_WHO_SSA,    //3 months to 5 years: Subscapular skinfold-for-age (WHO)
          GT_WHO_TSA,    //3 months to 5 years: Triceps skinfold-for-age (WHO)
          GT_WHO_MM    //Six gross motor milestones
  • Gender: This property defines the gender of the patient. It needs to be 1 for male or 2 for female as defined by CDC.
  • FirstName: the first name of the patient.
  • LastName: the last name of the patient.
  • RecordID: the record id of the patient.
  • LineColor: the color used to draw major griding lines and the standard lines.
  • LightLineColor: the color used to draw minor griding lines.
  • TopDataColor: the color used to plot top data set.
  • BottomDataColorr: the color used to plot bottom data set.
  • UseDefaultColors: If it is TRUE, default colors will be used.
  • FatherStature: Stature of patient's father, not all charts used it.
  • MotherStature: Stature of patient's mother, not all charts used it.
  • GestationalAge: only used in chart: "Birth to 36 months: Length-for-age and Weight-for-age percentiles"

    Methods for adding data
    There are 3 methods for adding data into the Growth Chart.

  • 1) void AddData(float fMonth, float fWeight, float fHeight, float fHeadCir, DATE date);
  • 2) void AddDataWithComments(float fMonth, float fWeight, float fHeight, float fHeadCir, DATE date, LPCTSTR strComm);
  • 3) long AddNewData();

    For both 1) and 2), fMonth and date are required. others could be set to -1 if you want to omit the data. The 3) return an index for a new data entry. then you can call the following methods to set data

       void SetWeight(long nIndex, float fWeight);
       void SetHeight(long nIndex, float fHeight);
       void SetHeadCir(long nIndex, float fHeadCir);
       void SetAge(long nIndex, float fMonth);
       void SetTestDate(long nIndex, DATE date);
       void SetComments(long nIndex, LPCTSTR strComm);
       void SetArmCir(long nIndex, float fArmCir); //only for GT_WHO_AA
       void SetSubscapularSkinfold(long nIndex, float fSS); //only for GT_WHO_SSA
       void SetTricepsSkinfold(long nIndex, float fTS); //only for GT_WHO_TSA

    Note: The unit for weight is kg, and that for length is cm. Age should be passed in months. The units for Subscapular skinfold, and Triceps skinfold are mm.

    For chart GT_WHO_MM, call "void SetMotorMilestone(long nType, float fMonth)" to set data for six gross motor milestones. The type should be 0 - 5 as defined in the enum

    The milestone should be passed in months.

    Retrieve data
    To get data from the growth chart, use the following sample:

       long nCount = oChart.GetDataCount();
       for(long i=0; i < nCount; i++)
          float fWeight = oChart.GetWeight(i);
          float fHeight = oChart.GetHeight(i);
          float fHeadCir = oChart.GetHeadCir(i);
          float fMonth = oChart.GetAge(i);
          DATE date = oChart.GetTestDate(i);
          CString strComm = oChart.GetComments(i);
          float fAC = oChart.GetArmCir(i); //only for GT_WHO_AA
          float fSS = oChart.GetSubscapularSkinfold(i); //only for GT_WHO_SSA
          float fTS = oChart.GetTricepsSkinfold(i); //only for GT_WHO_TSA

    For chart GT_WHO_MM, call "float GetMotorMilestone(long nType)" to get data for six gross motor milestones. The milestone will be return in months.

    Other functions

  • Print Chart: Call PrintChart()
  • Call void SaveChartToBMP(LPCTSTR strFullFileName) to save the chart as BMP file.
  • The following methods can be used to calculate percentiles:

       float GetWeightPercentileForAge2(float fMonth, float fWeight);
       float GetWeightPercentileForHeight(long nIndex);
       float GetWeightPercentileForHeight2(float fMonth, float fWeight, float fHeight);
       float GetHeadCirPercentileForAge(long nIndex);
       float GetHeadCirPercentileForAge2(float fMonth, float fHeadCir);
       float GetBMIPercentileForAge(long nIndex);
       float GetBMIPercentileForAge2(float fMonth, float fBMI);
       float GetBMI(float fWeight, float fHeight);
       float GetHeightPercentileForAge(long nIndex);
       float GetHeightPercentileForAge2(float fMonth, float fHeight);

       float GetWHOWeightPercentileForAge(long nIndex);
       float GetWHOWeightPercentileForAge2(float fMonth, float fWeight);
       float GetWHOWeightPercentileForHeight(long nIndex);
       float GetWHOWeightPercentileForHeight2(float fMonth, float fWeight, float fHeight);
       float GetWHOHeadCirPercentileForAge(long nIndex);
       float GetWHOHeadCirPercentileForAge2(float fMonth, float fHeadCir);
       float GetWHOBMIPercentileForAge(long nIndex);
       float GetWHOBMIPercentileForAge2(float fMonth, float fBMI);
       float GetWHOHeightPercentileForAge(long nIndex);
       float GetWHOHeightPercentileForAge2(float fMonth, float fHeight);
       float GetArmCirPercentileForAge(long nIndex);
       float GetArmCirPercentileForAge2(float fMonth, float fArmCir);
       float GetTricepsSkinfoldPercentileForAge(long nIndex);
       float GetTricepsSkinfoldPercentileForAge2(float fMonth, float fTS);
       float GetSubscapularSkinfoldPercentileForAge(long nIndex);
       float GetSubscapularSkinfoldPercentileForAge2(float fMonth, float fSS);

    For each type of percentiles, there are two set methods. One calculates percentile based on data set, and another uses passing data. For example, to calculate weight percentile for age on data set 0,
          float fPercentile = GetWeightPercentileForAge(0);
    or you can pass the weight, and age to get the corresponding percentile,
          float fMonth = 30.3, fWeight = 30;
          float fPercentile = GetWeightPercentileForAge2(fMonth, fWeight);

    If the call successed, the return fPercentle should > 0, otherwise fPercentle = -1 (this normally happens if the passing data are not right, e.g. fMonth < 0 or fMonth > 240 ).

    Copyright 2005 BVTech, Inc. All Rights Reserved

  • Search
    Free Software Downloads
    BVTech Photo Publisher
    Help you publish your pictures over the Internet or a local network so that other people can view them in their Web browsers
    A virtual apple a day to keep the doctor away
    Download VisualSniffer 2.0
    VisualSniffer is a powerful packet capture tool and protocol analyzer
    BVTech Plasmid
    A plasmid drawing software