Skip to content

Elsa-Health/model-runtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elsa Model Interpreter (WIP)

A simple library to evaulate Elsa Open Health Models for use in any environment.

Badges

Apache-2.0 License

Model Interpreter

Coverage Status

Installation

yarn add @elsa-health/model-runtime

// or using npm: npm install --save @elsa-health/model-runtime

Usage/Examples

import {
	createPatient,
	interpret,
	formatPatient,
} from '@elsa-health/model-runtime';

// Visit open.elsa.health/explore-models to find and download any model you want to use.
const diseaseModel = require('path/to/downloaded-model.js');
/*
 * {
 *	name: "my-model"
 *	condition: "pneumonia"
 *	ownerId: "....",
 *	ownerEmail: "...",
 *	symptoms: [],
 *	....
 * }
 */

const symptoms = [
	{
		name: 'fever',
		locations: [],
		duration: 3,
		onset: 'sudden',
		nature: 'high-grade',
		periodicity: 'intermittent',
		aggravators: ['bright-lights', 'crying'],
		relievers: ['paracetamol'],
	},
];

const signs = [];

// Define your patient
const patient = createPatient('male', 22, symptoms, signs);

// Run the assessment
const isStochastic = false; // set to true if you want to allow randomness in the results - good for error margins
const result = interpret(isStochastic)(diseaseModel)(
	formatPatient(formatPatient)
);

console.log('Here is the result: ', result);

Tech Stack

Client + Server: Javascript + Typescript

Roadmap

  • 80% Test coverage
  • Support for more random variables in symptom natures
    • Support Weibul Variables
    • Support Changing Variables - size, color, elevatedness, etc
  • Optional Support for uncertainity in the results through sampling of the random variables.
  • Support patient assessment results that show exactly what symptom features are not matching or are matching with different degees. (path towards explainability??)
  • Support weights for each of the symptom features
  • Support for age differences in model definitions
  • Support for sex differences in model definitions

Contributing

Contributions are always welcome!

Please visit this link for the contribution guidelines: https://opensource.elsa.health/contribution-guidelines

Please adhere to this project's code of conduct.

FAQ

Where do I get the disease models to run?

The disease models can be found at https://open.elsa.health

License

Apache 2.0

About

Elsa Health models & algorithms runtime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published