gather-foundation / gather-metrics

MIT License
1 stars 0 forks source link

GATHER Metrics

GATHER icon

Gather Metrics is a lightweight web application designed to assist clinicians in quickly calculating head circumference percentiles based on the latest available data. The application provides an intuitive interface where users can input patient data and receive immediate, accurate results.

Visit the live version of the tool at metrics.gatherfoundation.ch

Commitizen friendly Coverage Status Tests Status

Table of Contents

GATHER Foundation

GATHER Foundation stands for Global Alliance Towards Harmonized E-health Records for Precision Medicine in Neurodevelopmental Disorders (NDDs).

As a recently established initiative, GATHER Foundation aims to promote and support the generation of minimum requirement frameworks for the curation and collection of harmonized clinical, genetic and molecular data in the field of NDDs.

API Usage

The Head Circumference Percentile API allows you to calculate the percentile of a patient's head circumference based on their age, sex, and head circumference measurements.

Example Request

Endpoint: POST /api/v1/head-circumference

{
    "age_unit": "months",
    "age_value": 6,
    "sex": "M",
    "hcirc_value": 42.0,
    "hcirc_unit": "cm"
}

Example Response

{
    "hcirc_percentile": 75.0
}

For detailed documentation and additional options, please refer to the OpenAPI documentation.

Rate Limiting

This endpoint is rate-limited to 100 requests per minute per IP address. If you exceed this limit, you will receive a 429 Too Many Requests response.

Deployment

This project is deployed using Docker and is privately managed by the GATHER Foundation on AWS App Runner via Amazon ECR (Elastic Container Registry).

Local Deployment

If you wish to run the project locally, you can do so using Docker:

  1. Build the Docker Image:
docker build -t gather-metrics:latest .
  1. Run the Docker Container:
docker run -p 8000:8000 gather-metrics:latest

This will start the application on http://localhost:8000, allowing you to interact with it locally.

Production Deployment

The production deployment of this project is managed privately by the GATHER Foundation. The Docker image is built and pushed to Amazon ECR, and then deployed on AWS App Runner.

Note: The deployment process is controlled by the organization, and contributors do not have direct access to the production environment.

For more details on contributing to the project or setting up a development environment, please refer to the Contributing section.

Architecture

The Gather Metrics project leverages FastAPI for the backend, Jinja2 for templating, HTMX for interactivity and follows REST principles.

FastAPI

FastAPI is a modern web framework for building APIs with Python. It’s chosen for its:

HTMX

HTMX is used to enhance the interactivity of the application by enabling dynamic content updates based on user interactions without requiring a full page reload. It allows you to use standard HTML attributes to send requests to the server and update parts of the page with the server’s response.

Overview

This architecture ensures that the Gather Metrics application is robust, scalable, and easy to maintain.

Contributing

Want to contribute? Check out our contribution guidelines.

Contributors

Samuel Valentini
Samuel Valentini

STALICLA
Sergio Morales
Sergio Morales

STALICLA
Héctor Naranjo
Héctor Naranjo

STALICLA

Contact

Contact the project maintainers or support team at developers@gatherfoundation.ch.