Skip to content

shaharoded/CDSS-Dev-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cdss-dev-project

Developing a CDSS as a mini project. The system is designed to offer patients management front and patients state dashboard, which reports on the patients in risk within your DB as of a chosen date.


Project Structure

cdss-dev-project/
│
├── data/
│   ├── project_db.xlsx       # Patients batch file
│   ├── cdss.db               # Processed DB for all operations. Created automatically.
│   └── Loinc_2.80.zip
│
├── backend/
├── ├── queries/                        # All of the queries for initialization, data access and business logic
│   │   ├── create_patients_table.sql
│   │   ├── create_loinc_table.sql
│   │   ├── insert_patient.sql
│   │   └── ...
│   │
├── ├── tak/                            # All abstraction rules (TAK files).
│   │   ├── hemoglobin_state.xml
│   │   ├── wbc_state.xml
│   │   └── ...
├── ├── rules/                          
│   │   ├── declarative_knowledge/      # All state rules (Json files).
│   │   │   ├── hematological_rules.json
│   │   │   └── toxicity_rules.json
│   │   └── procedural_knowledge/       # All procedural rules (Json files).
│   │       └── treatment_rules.json
│   │
│   ├── backend_config.py               # Configuration file for the backend operations
│   ├── dataaccess.py                   # DB connection module
│   ├── businesslogic.py                # Business logic module
│   ├── mediator.py                     # Data abstraction calculation module
│   └── rule_processor.py               # Rule-based patient's state inference module
│
├── frontend/
│   ├── images/                         # Images used for design
│   ├── userinterface.py                # UI - Data management system
│   └── dashboard.py                    # UI - Streamlit recommendation board
│
├── README.md
└── requirements.txt

Installation

Prerequisites

  • Python 3.7 or higher.
  • Loinc_2.80.zip (Downloaded from Loinc-Org) - Should be placed under data repository.

NOTE: For the recommendation system section of thsi project, the LOINC table was modified, re-zipped and used, adding a few SNOMED codes to it for the engine's rules.

Setup

  1. Clone the repository:
git clone https://github.com/shaharoded/cdss-dev-project.git
cd cdss-dev-project
  1. Create and activate a virtual environment:
# On Windows
python -m venv venv
.\venv\Scripts\Activate

# On macOS/Linux
python3 -m venv venv
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt

How to use

Backend Tests

Once you updates the main of each module:

You can run the following PowerShell command in the root repository to initiate the DataAccess class and build your DB:

(from root)
python -m backend.dataaccess

You can run the following PowerShell command in the root repository to test your business logic:

(from root)
python -m backend.businesslogic

You can run the following PowerShell command in the root repository to test your abstraction logic \ rules logic:

(from root)
python -m backend.mediator
python -m backend.rule_processor

Need to remove the DB you created?

rm cdss.db

Run APP

In order to run the application, you'll need to run the following command from root repo:

(from root)
python -m frontend.userinterface

Within the app you'll have the option to open the patient's state screen (streamlit dashboard).


GIT Commit Tips

Once you've made changes, commit and push as usual:

git add .
git commit -m "Commit message"
git push -u origin main

About

A coding project aiming to design a 3-layer architecture CDSS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages