This repository provides a framework to extract and process cardiopulmonary exercise tests from various systems.
- Flexible System Interface: Easily extensible to support more systems in the future.
- COSMED Data Extraction: Extracts demographic and time series data from COSMED system files.
To extract data from a supported system:
npm i system-interface
import { SystemInterface } from 'system-interface';
const dataFromFile = SystemInterface.extractFileData('filepath', 'system');
const dataFromBuffer = SystemInterface.extractFileData(buffer, 'system');
// output
{
demographics: {
id: '1',
fname: 'Apurva',
lname: 'Shah',
...
},
timeSeries: {
t: [...],
power: [...],
vo2: [...],
vco2: [...],
ve: [...],
hr: [...],
}
}
Valid systems as of right now consist of: 'cosmed'
.
Interested in contributing? Here's how to get started.
-
Clone the Repository:
git clone https://github.com/your-username/system-file-handler.git
-
Navigate to the Project Directory:
cd system-file-handler
-
Install Dependencies:
npm install
-
Compile TypeScript Code: If you make changes to the TypeScript files, you will need to compile them to JavaScript:
tsc
-
Usage: You can now use the package locally. To use it in other projects, you can link it:
npm link
All commits into the main
branch must follow the conventional commit formatting.
- Please ensure that you're squashing your commits before submitting a PR. We follow the "Squash and merge" policy.
- Make sure to create changes on a separate branch before opening a pull request.
- All pull requests must be approved before merging.
- Ensure all checks are passing before requesting a review or merging your PR.
- Before committing your changes, make sure to run
npm run prettier
to format your code. - Also, ensure no linting errors by running
npm run lint
.
Distributed under the MIT License. See LICENSE
for more information.