Giter Club home page Giter Club logo

mmecalculator's Introduction

CI

Practice Fusion MME Calculator

Morphine Milligram Equivalent (MME) Calculator: APIs, Containers and Samples

The calculator accepts two parameters:

  1. the RxNorm RxCUI (the drug identifier), which is used to retrieve the RxNorm normalized drug name
  2. the sig, free-text instructions from the prescriber or pharmacist indicating how the patient should use the medication

The sig is used to establish a maximum or total daily dose. The normalized drug name is used to identify active opioids and their strengths, so that a total daily dose in milligrams (or the appropriate unit of measure) can be established. Finally, using the appropriate conversion factor, which sometimes requires additional information on the route or form of the drug, a maximum morphine milligram equivalence per day is calculated.

The result is returned along with analysis of the medications and sigs. The analysis breaks down the parsed and calculated information, and includes a confidence rating on the information, along with any explanation of failures. Currently, if there are any failures, the calculator returns a "no-confidence" result.

The calculator makes no recommendations regarding the safety of the maximum MME per day, that is instead left up to calling services (like clinical decision support services), which should analyze the calculated result and the confidence of the calculation before making a recommendation.

Installing / Getting started

Installing the NuGet Package

To use the calculator in your own project, add the package:

dotnet add package PracticeFusion.MmeCalculator.Core

See the sample CLI for more information on how to use the calculator.

Running the web demo in a docker image

  1. From the src directory, run:
$ docker build -f Samples/PracticeFusion.MmeCalculator.WebDemo/Dockerfile . -t mmewebdemo
$ docker run -d -p 80:80 --name mmewebdemo mmewebdemo
  1. Browse to http://localhost/ to see the demo
  2. Browse to http://localhost/docs to view the api documentation.

Web demo examples

The web demo gives you a quick example of how to pass a sig and an RxNorm ID, and get a calculated MME in response:

A screenshot of the MME Calculator Demo web page, showing an MME calculation

The demo also includes a simple example of just parsing a sig:

A screenshot of the MME Calculator Demo web page, showing a parsed sig

Running the sample CLI in a docker image

  1. From the src directory, run:
$ docker build -f Tools/PracticeFusion.MmeCalculator.Cli/Dockerfile . -t mmecli
  1. Run an instance to see the help:
$ docker run -i --rm mmecli --help

Usage:
  mmecalculator [options] [command]

Options:
  -i, --input <input>                                 input file (if not present, will use stdin)
  -o, --output <output>                               output file (if not present, will use stdout)
  -ow, --overwrite                                    overwrite the output file if it exists [default: False]
  -of, --outputFormat <Basic|Debug|DebugFormatted>    output format (basic, debug) [default: Basic]
  --version                                           Show version information
  -?, -h, --help                                      Show help and usage information

Commands:
  calculate
  parsesig
  antlrperf

How to Contribute

We want to make contributing to this project as simple as possible, and we are grateful to the community for contributing bug fixes, feature requests and code improvments. Read below to learn how you can take part in improving the MME calculator.

Bug reports

To report a bug click here and fill in the template. We'll look at it as soon as we can.

Feature Requests

To request a new feature click here and fill in the template.

Contributing Guide

Read our Contributing Guide

We have adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text.

Links

Maintainers

@JonathanMalek

License

The Practice Fusion MME Calculator is licensed under the MIT license.

mmecalculator's People

Contributors

dependabot[bot] avatar jonathanmalek avatar kymidd avatar mend-for-github-com[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmecalculator's Issues

Enable certain "multiple frequencies" or clarify the exception

Currently, the sig: "chew and swallow 1 tablet (80 mg) by mouth 4 times per day after meals and at bedtime as needed"

Produces the following error message: "Ambiguous frequencies: multiple frequencies."

It would be helpful to allow this multiple frequency, or clarify that there is ambiguity in the sig (eating more than 3 meals per day, for instance).

"take 11/2 tablets..." is parsed incorrectly

Describe the bug
The parser incorrectly parses numbers like "11/2" as "1" and "0.5", presented as "10.5".

To Reproduce
Steps to reproduce the behavior:
Create a sig: "take 11/2 tablets by mouth daily"

Expected behavior
Since the parser does not perform calculations like "11/2 = 5.5", this should error as an invalid number.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.