Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

femr

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

femr

Framework for Electronic Medical Records. A python package for building models using EHR data.

  • 0.2.3
  • PyPI
  • Socket score

Maintainers
2

FEMR

Framework for Electronic Medical Records

FEMR is a Python package for manipulating longitudinal EHR data for machine learning, with a focus on supporting the creation of foundation models and verifying their presumed benefits in healthcare. Such a framework is needed given the current state of large language models in healthcare and the need for better evaluation frameworks.

The currently supported foundation models are CLMBR and MOTOR.

FEMR works with data that has been converted to the MEDS schema, a simple schema that supports a wide variety of EHR / claims datasets. Please see the MEDS documentation, and in particular its provided ETLs for help converting your data to MEDS.

FEMR helps users:

  1. Use ontologies to better understand / featurize medical codes
  2. Algorithmically label patient records based on structured data
  3. Generate tabular features from patient timelines for use with traditional gradient boosted tree models
  4. Train and finetune CLMBR-derived models for binary classification and prediction tasks.
  5. Train and finetune MOTOR-derived models for binary classification and prediction tasks.

We recommend users start with our tutorial folder

Installation

FEMR can be installed with the simple command pip install femr.

If you are using deep learning, you need to also install xformers pip install xformers.

Getting Started

The first step of using FEMR is to convert your patient data into MEDS, the standard input format expected by FEMR codebase.

The best way to do this is with the ETLs provided by MEDS.

Development

The following guides are for developers who want to contribute to FEMR.

Precommit checks

Before committing, please run the following commands to ensure that your code is formatted correctly and passes all tests.

Installation

conda install pre-commit pytest -y
pre-commit install

Running

Test Functions
pytest tests

Formatting Checks

pre-commit run --all-files

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc