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

@precisa-saude/fhir-calculators

v0.5.1

Published

Calculadoras clínicas — PhenoAge, BrDMrisc, biomarcadores derivados (HOMA-IR, VLDL, IMC)

Readme

@precisa-saude/fhir-calculators

Calculadoras clínicas — PhenoAge (Levine 2018), BrDMrisc (Bracco 2023), biomarcadores derivados (HOMA-IR, VLDL, IMC).

Instalação

npm install @precisa-saude/fhir-calculators

Nota: Requer @precisa-saude/fhir como peer dependency.

Uso rápido

PhenoAge — Idade biológica

Implementação do algoritmo de Levine et al. (2018) para cálculo de idade biológica a partir de 9 biomarcadores sanguíneos.

import { phenoage } from '@precisa-saude/fhir-calculators';

const result = phenoage.calculatePhenoAge({
  chronologicalAge: 45,
  albumin: 42,             // g/L
  creatinine: 80,          // μmol/L
  glucose: 5.2,            // mmol/L
  crp: 1.5,                // mg/L
  lymphocytePercent: 30,
  mcv: 88,                 // fL
  rdw: 13.2,               // %
  alkalinePhosphatase: 65, // U/L
  wbc: 6.0,                // 10^9/L
});

console.log(result.phenoAge);       // 42.3 (idade biológica)
console.log(result.ageDifference);  // -2.7 (anos mais jovem)

BrDMrisc — Risco de diabetes tipo 2

Implementação do modelo BrDMrisc (Bracco et al. 2023) para estimativa de risco de diabetes tipo 2 em 10 anos, validado para a população brasileira. Seleciona automaticamente o melhor modelo disponível com base nos biomarcadores presentes.

import { brdmrisc } from '@precisa-saude/fhir-calculators';

const result = brdmrisc.calculateBrDMrisc({
  fpg: 105,           // mg/dL — glicemia de jejum
  hba1c: 5.8,         // %
  triglycerides: 180,  // mg/dL
  hdlc: 42,           // mg/dL
});

console.log(result.riskPercent);  // 18.5 (% risco em 10 anos)
console.log(result.riskCategory); // 'moderate'
console.log(result.modelUsed.name); // 'FPG + HbA1c + Lipids'

Biomarcadores derivados

Calcula biomarcadores derivados a partir de valores laboratoriais existentes.

import { computeDerivedBiomarkers } from '@precisa-saude/fhir-calculators';

const derived = computeDerivedBiomarkers([
  { code: 'Glucose', value: 95 },
  { code: 'Insulin', value: 12.0 },
  { code: 'Triglycerides', value: 150 },
]);

// Retorna: HOMA-IR = (95 × 12) / 405, VLDL = 150 / 5
derived.forEach(d => console.log(`${d.code}: ${d.value} ${d.unit}`));

Referências acadêmicas

| Calculadora | Referência | | --------------- | ---------------------------------------------------------------------------------------------- | | PhenoAge | Levine ME et al. (2018). An epigenetic biomarker of aging. Aging 10(4):573-591 | | BrDMrisc | Bracco PA et al. (2023). BrDMrisc model for type 2 diabetes risk in Brazilians | | HOMA-IR | Matthews DR et al. (1985). Homeostasis model assessment. Diabetologia 28(7):412-419 | | VLDL | Friedewald WT et al. (1972). Estimation of LDL cholesterol. Clin Chem 18(6):499-502 |

Aviso médico

Este pacote implementa algoritmos clínicos publicados para fins de software. Os resultados não constituem diagnóstico médico e não substituem avaliação profissional. Consulte o DISCLAIMER.md na raiz do repositório para detalhes completos.

Licença

Apache-2.0