Skip to content

Calculate and classify growth for different ages, using the methods outlined by WHO.

License

Notifications You must be signed in to change notification settings

joaodubas/growth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Growth calculation/classification tool

Build Status

Usage

To install the library all you have to do is:

$ npm install growth

If you don't have node installed checkout this guide.

After install the package, you can start using in the following way:

var growth = require('growth');
var measure = {
    "gender": "male",
    "dob": "2000/05/09",
    "doa": "2000/10/12",
    "weight": 4.80,
    "height": 59.80,
    "c_head": 38.90,
    "c_upper_arm": 11.20,
    "sk_triceps": 5.50,
    "sk_subscapular": 4.60
};

function calculate(error, result) {
    if (error) {
        throw error;
    }
    console.log(result.result);
}

growth.measure(measure, calculate);

If you have a series of measurements, it's possible to process then in a batch:

var growth = require('growth');
var measures = [
  {
    "gender": "male",
    "dob": "2000/05/09",
    "doa": "2000/10/12",
    "weight": 4.80,
    "height": 59.80,
    "c_head": 38.90,
    "c_upper_arm": 11.20,
    "sk_triceps": 5.50,
    "sk_subscapular": 4.60
  },
  {
    "gender": "male",
    "dob": "2000/05/09",
    "doa": "2000/12/12",
    "weight": 5.50,
    "height": 61.20,
    "c_head": 40.30,
    "c_upper_arm": 11.40,
    "sk_triceps": 5.20,
    "sk_subscapular": 4.40
  }
];

function calculate(error, results) {
    if (error) {
        throw error;
    }
    results.forEach(function (result) {
        console.log(result.result);
    });
}

growth.batchMeasure(measures, calculate);

API

growth#measure

growth#batchMeasure

growth#Measure

Measure definition

TODO

  • Add license info
  • Implement stream interface, something in the line of levelUp
  • How about implement:
  • Expose the factory#db interface contained in lib#lms

Sources

LICENSE

Copyright (c) 2013 Joao Paulo Dubas [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Calculate and classify growth for different ages, using the methods outlined by WHO.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published