A simple library to evaulate Elsa Open Health Models for use in any environment.
yarn add @elsa-health/model-runtime
// or using npm: npm install --save @elsa-health/model-runtime
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);
Client + Server: Javascript + Typescript
- 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
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
.
The disease models can be found at https://open.elsa.health