Now we are rebuilding the Medicalculator using modern web technologies.
Current code does not work well!
Please try https://github.com/kcrt/med/tree/6a592ee2360f8d80ecf4460efc3b7bd36d6cb957 that works properly.
The old version (jQuery + jQuery Mobile) is available at https://github.com/kcrt/med/tree/6a592ee2360f8d80ecf4460efc3b7bd36d6cb957.
The Medicalculator is an application for performing various medical calculations. While every effort has been made to ensure accuracy, please always refer to the original literature and verify calculations when using this application in clinical practice.
- Next.js 16 with App Router
- React 19 with React Compiler
- TypeScript 5
- Mantine 8 for UI components
- Tailwind CSS v4 for styling
- next-intl for internationalization (English/Japanese/Chinese)
- Vitest for testing
- Zod for runtime type validation
- qrcode.react for QR code generation
- marked for markdown rendering
The application supports English, Japanese, Simplified Chinese, and Traditional Chinese with automatic browser detection. See docs/LOCALE.md for detailed configuration, translation system, and adding new languages.
A stable version of the Medicalculator is hosted at app.kcrt.net. Access it via your web browser, or on iOS, add it as a Web Clip for convenient access.
The calculation features are also available as an npm package that can be installed and used in other JavaScript/TypeScript applications:
npm install medFor detailed usage instructions and API documentation, see LIB_README.md.
Quick example:
import { getFormula, evaluateFormulaOutputs } from 'med';
const formula = getFormula('bmi_adult');
if (formula) {
const results = evaluateFormulaOutputs(formula, {
height: 170, // cm
weight: 70 // kg
});
console.log(results); // { BMI: 24.2, ... }
}# Install dependencies
npm install
# Run development server (includes hot reload)
npm run devFor bug reports and feature requests, please contact via email or Twitter. I read all emails but may not be able to respond to every message.
For requests to add new calculations, it would be helpful if you could provide references to the original literature when possible.
Copyright © 2012-2025 TAKAHASHI, Kyohei
This project includes open-source software redistributed under their respective licenses:
- Mantine UI - MIT License
- Tabler Icons - MIT License
- expr-eval - MIT License
npm run dev # Start development server
npm run build # Build for production
npm start # Start production server
npm test # Run tests with Vitest
npm run lint # Run Biome linter
npm run format # Format code with Biome- API Reference - Hooks, components, utilities, and type definitions
- Locale Configuration - Internationalization setup and translation system
- Formula Syntax - Complete guide to formula.json format, input types, and conditional visibility
- Calculate API - API route for formula calculations
