npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pedi-bp/core

v0.1.0

Published

Pediatric blood pressure percentile calculator — AAP 2017, NHLBI, ERICA (Brazilian), with classification

Readme

@pedi-bp/core

Pediatric blood pressure percentile calculator — AAP 2017, NHLBI, ERICA (Brazilian), Lo 2013, Gemelli.

Zero dependencies. Works in Node.js, browsers, and edge runtimes.

Features

  • 5 data sources: AAP 2017, NHLBI, ERICA (Brazilian data), Lo 2013, Gemelli 1990
  • Automatic cascade: selects the best source based on age, sex, and height availability
  • Classification: AAP 2017 guidelines (percentile-based < 13y, absolute thresholds >= 13y)
  • Transparent source reporting: shows which source was used and available alternatives
  • Height percentile: CDC 2000 growth charts embedded (no external dependency)
  • Input validation: rejects NaN, Infinity, out-of-range values
  • i18n: pt-BR, en, es
  • Independently derived data: avoids GPL-2 licensing constraints

Data Sources

| Source | Age Range | Height | Method | |--------|-----------|--------|--------| | Gemelli 1990 | 1–9 months | No | Gaussian | | AAP 2017 (Flynn) | 1–17 years | Yes (7 percentile bins) | Gaussian | | NHLBI Fourth Report | 1–17 years | Yes / P50 fallback | Gaussian | | Lo 2013 | 3–17 years | No | Gaussian | | ERICA (Brazil) | 12–17 years | Yes (CDC z-score) | Polynomial regression |

Automatic Cascade (source = 'auto')

Gemelli (<12mo) → AAP 2017 (1–12y + height) → ERICA (12–17y + height)
                → Lo 2013 (3–17y, no height) → NHLBI (12–35mo, P50 fallback)

Install

npm install @pedi-bp/core

Usage

import { calculateBp, bpAtPercentile, availableSources } from '@pedi-bp/core';

// Calculate BP percentiles and classification
const result = await calculateBp({
  sex: 'male',
  ageMonths: 120,   // 10 years
  heightCm: 140,
  systolic: 115,
  diastolic: 75,
});

console.log(result.classification.label);    // "PA Elevada"
console.log(result.source.used);             // "aap2017"
console.log(result.systolic?.percentile);    // ~92

// Inverse: BP value at a given percentile
const bp95 = await bpAtPercentile({
  sex: 'male',
  ageMonths: 120,
  heightCm: 140,
  percentile: 95,
  type: 'systolic',
});

// List available sources for a patient
const sources = availableSources('male', 120, 140);

API

calculateBp(input, locale?): Promise<BpResult>

Calculate BP percentiles and classification.

Input:

  • sex: 'male' | 'female'
  • ageMonths: 1–204
  • heightCm?: height in cm (enables height-dependent lookup)
  • systolic?: systolic BP in mmHg
  • diastolic?: diastolic BP in mmHg
  • source?: 'auto' (default) | 'aap2017' | 'nhlbi' | 'erica' | 'lo2013'

bpAtPercentile(input): Promise<number>

Compute BP value at a given percentile (inverse function).

availableSources(sex, ageMonths, heightCm?): BpSourceInfo

List available sources for a given patient profile.

Classification (AAP 2017)

Children < 13 years (percentile-based)

| Category | SBP | DBP | |----------|-----|-----| | Normal | < P90 | < P90 | | Elevated | P90 to < P95 or >= 120/80 | P90 to < P95 | | HTN Stage 1 | P95 to P95+12 | P95 to P95+12 | | HTN Stage 2 | >= P95+12 | >= P95+12 |

Adolescents >= 13 years (absolute thresholds)

| Category | SBP | DBP | |----------|-----|-----| | Normal | < 120 | < 80 | | Elevated | 120–129 | < 80 | | HTN Stage 1 | 130–139 | 80–89 | | HTN Stage 2 | >= 140 | >= 90 |

Classification uses the worst of SBP and DBP.

Formulas

  • Gaussian: z = (BP - mean) / SD, percentile = normal CDF
  • ERICA: polynomial regression BP = f(age, z_height) with 4th-degree terms
  • Height percentile: CDC 2000 LMS method (recumbent < 24mo, standing >= 24mo)

Data Sources

  • AAP 2017: Flynn JT et al. Pediatrics 2017;140(3):e20171904
  • ERICA: Jardim TV et al. J Pediatr (Rio J) 2020;96(2):168-176
  • Gemelli: Gemelli M et al. Eur J Pediatr 1990;149(5):318-20
  • Lo 2013: Lo JC et al. Pediatrics 2013;131(2):e415-24
  • NHLBI: Pediatrics 2011;128(Suppl 5):S213-56
  • CDC 2000: Kuczmarski RJ et al. Adv Data 2000;(314):1-27

License

MIT