1.0.2 • Published 9 months ago

medicolib v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

MedicoLib

MedicoLib is a JavaScript library for cardiovascular calculations. It provides functions to perform various cardiovascular calculations, such as cardiac output, cardiac index, max heart rate, target heart rate, and mean arterial pressure (MAP).

Table of Contents

Installation

To install MedicoLib, you can use npm:

npm install medicolib

## API Reference
cardiacOutput(heartRate, strokeVolume)
Calculates the cardiac output.

Parameters:

heartRate (number): The heart rate in beats per minute.
strokeVolume (number): The stroke volume in milliliters per beat.
Returns: The calculated cardiac output in milliliters per minute.

cardiacIndex(cardiacOutputValue, bodySurfaceArea)
Calculates the cardiac index.

Parameters:

cardiacOutputValue (number): The cardiac output value in milliliters per minute.
bodySurfaceArea (number): The body surface area in square meters.
Returns: The calculated cardiac index in milliliters per minute per square meter.

maxHeartRate(ageInYears)
Calculates the maximum heart rate.

Parameters:

ageInYears (number): The age in years.
Returns: The calculated maximum heart rate in beats per minute.

targetHeartRate(maxHeartRateValue, targetPercent)
Calculates the target heart rate based on the maximum heart rate.

Parameters:

maxHeartRateValue (number): The maximum heart rate in beats per minute.
targetPercent (number): The target heart rate as a decimal percentage.
Returns: The calculated target heart rate in beats per minute.

MeanArterialPressure_MAP(DiastolicBP, SystolicBP)
Calculates the mean arterial pressure (MAP) using diastolic and systolic blood pressure values.

Parameters:

DiastolicBP (number): The diastolic blood pressure in millimeters of mercury (mmHg).
SystolicBP (number): The systolic blood pressure in millimeters of mercury (mmHg).
Returns: The calculated mean arterial pressure (MAP) in millimeters of mercury (mmHg).

Usage
Here's how you can use MedicoLib in your JavaScript code:

const { cardiacOutput, maxHeartRate } = require('medicolib');

const output = cardiacOutput(70, 80);
console.log('Cardiac Output:', output);

const heartRate = maxHeartRate(30);
console.log('Max Heart Rate:', heartRate);
Contributing
Contributions are welcome! If you find a bug or want to add a new feature, feel free to open an issue or submit a pull request.

License
This project is licensed under the MIT License
1.0.2

9 months ago

1.0.12

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago