cfu288 / meld-cds-hook

A CDS hook to calculate the MELD 3.0 score for a patient using the OPTN calculator.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MELD CDS Hook

This repository contains a implementation of a Clinical Decision Support (CDS) hook for calculating the MELD score whenever a patient's chart is opened in the EMR. The MELD score is a measure of liver disease severity and is used to prioritize patients for liver transplantation. The MELD score was initially developed to predict three-month mortality in patients who underwent transjugular intrahepatic portosystemic shunt (TIPS) procedures, amd has undergone multiple revisions.

This CDS MELD calculator uses the most recent revision: the MELD 3.0 formula published by OPTN.

Dependencies

Poetry is used to manage dependencies. You can install it by following the instructions at Poetry's official website.

Running the CDS Hook Service in Production Mode

To run the application in production mode, follow these steps:

  1. Install the project dependencies by running:

    poetry install
  2. Start the server with the following command:

    poetry run fastapi run meld_cds_hook/main.py
  3. The server will be running at http://localhost:8000.

Running the CDS Hook Service in Development Mode

To run the application in development mode, follow these steps:

  1. Install the project dependencies by running:

    poetry install
  2. Start the development server with the following command:

    poetry run fastapi dev meld_cds_hook/main.py
  3. The server will be running at http://localhost:8000 with fast reload.

You can test the CDS hook using the CDS Hooks Sandbox.

Running Tests

To run the tests, execute the following command:

Test with Sandbox

Sandbox screenshot

With the server running, you can test the CDS hook using the CDS Hooks Sandbox. Click on the settings gear in the top right corner and enter the following URL in the *Enter discovery endpoint url" field: http://localhost:8000/cds-services. Then hit save. The sandbox should now attempt to discover the CDS hook and you should see the MELD CDS card displayed.

Test with pytest

poetry run pytest

About

A CDS hook to calculate the MELD 3.0 score for a patient using the OPTN calculator.

License:MIT License


Languages

Language:Python 100.0%