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.
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- Python 3.7 or higher.
- Loinc_2.80.zip (Downloaded from Loinc-Org) - Should be placed under
datarepository.
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.
- Clone the repository:
git clone https://github.com/shaharoded/cdss-dev-project.git
cd cdss-dev-project- 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- Install dependencies:
pip install -r requirements.txtOnce 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.dataaccessYou can run the following PowerShell command in the root repository to test your business logic:
(from root)
python -m backend.businesslogicYou 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_processorNeed to remove the DB you created?
rm cdss.dbIn order to run the application, you'll need to run the following command from root repo:
(from root)
python -m frontend.userinterfaceWithin the app you'll have the option to open the patient's state screen (streamlit dashboard).
Once you've made changes, commit and push as usual:
git add .
git commit -m "Commit message"
git push -u origin main