Skip to content

lmandres/OpenAIVitalSigns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAIVitalSigns

The OpenAIVitalSigns project was written to demonstrate converting dictated patient notes into machine-readable language through the use of the OpenAI API.

Prerequisites

The OpenAIVitalSigns project relies on the following prerequisites:

  • Python version 3.4 or greater
  • Git
  • pip for installation of Python modules
  • An OpenAI API Key
  • (optional) venv for installation of Python modules in a virtual environment

Installation

  • In the installation directory run:
git clone https://github.com/lmandres/OpenAIVitalSigns.git
cd OpenAIVitalSigns
git pull
  • You can create a virtual environment to run the application in Linux or MacOS (This step is optional).
python3 -m venv venv
source venv/bin/activate
  • Or in Windows Command Shell:
python -m venv venv
venv\Scripts\activate.bat
  • Install the prerequisite Python modules
pip install -r requirements.txt

Configuration

  • Create a file named "apiKey.txt" to include the OpenAI API key.
  • In this installation, you can use your favorite editor. However, for this example we will be using Windows Notepad.
notepad apiKey.txt
  • Enter the OpenAI API key and save.

Running the application

  • To run the application, you will have to do the following steps, based on your installation.
  • Change into the directory containing the OpenAIVitalSigns script:
cd OpenAIVitalSigns
  • If you installed the Python module dependencies in a virtual environment (after following the optional venv step), you will need to ensure that you source the virtual environment in Linux or MacOS.
source venv/bin/activate
  • In Windows Command Shell, you will have to replace the previous command with the following:
venv\Scripts\activate.bat
  • Run the server application
python app.py

Using the application

  • After starting the server application, open a web browser to the following web address

http://localhost:5000/static/vital_signs.html

  • NOTE: The security context makes it so that you can only visit this page if the server is run on localhost or a page using HTTPS.

Stopping the application

  • To stop the application, type Ctrl-C
  • If you sourced a virtual environment, you can deactivate the virtual environment by entering the following command:
deactivate

Releases

No releases published

Packages

No packages published