Skip to content

Nico-Curti/FiloBluService

Repository files navigation

Authors Project Code Quality Documentation
N. Curti
A. Ciardiello
S. Giagu
FiloBlu Codacy : Codacy Badge
Codebeat: codebeat badge
docs

GitHub pull-requests GitHub issues

GitHub stars GitHub watchers


INFN

UNIBO


Sapienza


BiMind

FiloBlu Service manager

FiloBlu Service computation scheme.

This package is part of the FILOBLU project (Application of machine learning algorithms to physician-patient communications, within the FILOBLU project) and was developed by the collaboration between the INFN Group of the University of Bologna and the INFN Group of the University of Rome (Sapienza) with the support of BiMind company. The module implements a windows service application for the processing of medical text messages and biological parameters stored in a central DB. With a neural network processing a score/importance is given to provide a possible reading order to the doctors.

  1. Prerequisites
  2. Installation
  3. Authors
  4. License
  5. Acknowledgments

A slight overview about theoretical background of services and the computational strategies chosen in this project is provided in the docs folder:

Prerequisites

The package is intended for use only on a Windows environment and it needs the MySQL support for the database management. Before install the package pay attention to download the whole set of dependencies or just simple run:

PS \>        pip install -r requirements.txt

inside the main folder of the project. Make sure also to provide a config.json file formatted like below in a data folder inside the project:

{
  "host" : "localhost_or_the_IP_number",
  "username" : "db_username",
  "password" : "db_pwd",
  "database" : "db_name"
}

Before start the service pay attention to have the full set of system environment variables! Example (with Anaconda3/Miniconda3):

PS \>        C:\Users\UserName\Anaconda3
PS \>        C:\Users\UserName\Anaconda3\Library\mingw-w64\bin
PS \>        C:\Users\UserName\Anaconda3\Library\usr\bin
PS \>        C:\Users\UserName\Anaconda3\Library\bin
PS \>        C:\Users\UserName\Anaconda3\Scripts

and the MOST important:

PS \>        C:\Users\UserName\Anaconda3\Lib\site-packages\pywin32_system32
PS \>        C:\Users\UserName\Anaconda3\Lib\site-packages\win32

and make sure to run the service with an Administrator Powershell or just use the filobluservice.ps1 script provided in the project folder changing the project_folder variable. This script can be also used as StartUp program to refresh and re-enable the service.

In the scripts folder a downloader script of the neural network weight file is provided. The file can be extracted only with a password: if you are interested in using our pre-trained model, please send an email to one of the authors.

Installation

First of all follow the Prerequisites instructions. Then you can just use the filobluservice.ps1 script or run inside the project folder the following commands with an Administrator Powershell:

PS \>        python FiloBlu\filobluservice_np.py install
PS \>        python FiloBlu\filobluservice_np.py update
PS \>        python FiloBlu\filobluservice_np.py start

By default each 20 seconds the script provides a query to DB and processes the text messages founded and assign to a score value to each (the floating-point results are converted in a integer value in [1, 4] ). These scores are then written in the DB.

The data management is performed by queue container to avoid the lost of records due to the time intervals. The service check also for new model updates and in case it restarts automatically the service with the new weights (the file must be set in a precise folder with a *.upd extension).

Authors

See also the list of contributors GitHub contributors who participated in this project.

License

The FiloBluService package is licensed under the MIT "Expat" License. License

Acknowledgment

Thanks goes to the BiMind company for their collaboration in the development of this project. A big thank goes to Alessandro Fabbri for the important support in the development of the service manager application.