2023-12-29 17:11:36 +08:00
|
|
|
# FELICITY LIMS
|
2021-10-17 21:41:46 +08:00
|
|
|
|
2021-10-17 21:53:13 +08:00
|
|
|

|
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
The next generation open source laboratory information management system for clinical/medical laboratories.
|
2021-10-17 21:04:50 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
## Description
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
The Felicity LIMS project aims to create a Laboratory Information Management System (LIMS) that tracks the complete
|
|
|
|
laboratory workflow providing all the functionalities of a Laboratory Information Management System.
|
2021-10-17 21:41:46 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
Felicity strives to promote an accurate flow of sample and associated experimental data to and through a laboratory to
|
|
|
|
produce information that is used to make conclusions and critical decisions.
|
2021-10-17 21:41:46 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
Felicity LIMS will ensure that sufficient metadata is captured and clinical laboratory personnel can track the lifecycle
|
|
|
|
of a bio-specimen in the laboratory from receipt to dispatch.
|
2021-10-17 21:41:46 +08:00
|
|
|
|
2021-10-17 21:54:22 +08:00
|
|
|
Felicity is the quality of being good, pleasant, or desirable.
|
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
### FrontEnd
|
|
|
|
|
2024-09-02 01:22:05 +08:00
|
|
|
Felicity's frontend is developed using Vite, Vue, URQL, and Tailwind CS, etc.
|
2024-01-28 21:17:16 +08:00
|
|
|
|
|
|
|
### Backend
|
|
|
|
|
|
|
|
Felicity's backend is developed using FastAPI, Strawberry-Graphql and SQLAlchemy
|
|
|
|
|
2024-09-02 01:22:05 +08:00
|
|
|
Minio is used as object storage to store pdf reports
|
|
|
|
|
|
|
|
Mongodb is used to store audit logs
|
|
|
|
|
|
|
|
Postgres is the main db with core tables
|
|
|
|
|
|
|
|
Dragonfly is the redis cache to keep track of sample status locks, websocket subscriptions etc
|
|
|
|
|
2021-10-17 21:47:46 +08:00
|
|
|
## Main Features
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
- Dashboard - Analytics
|
|
|
|
- Patient - Listing, compact, detail, search, Audit Log
|
|
|
|
- Sample - Listing, Detail, Audit Log, Reports, search
|
|
|
|
- Worksheet - Templates, listing, auto create, multi create, manual create
|
2024-09-02 01:22:05 +08:00
|
|
|
- Inventory - Item manager, listing, detail, transactions, adjustments, orders, requests
|
2024-01-28 21:17:16 +08:00
|
|
|
- Shipment - Fhir ready (experimental), Listing, detail,
|
|
|
|
- Storage - store rooms, locations, containers, templates,
|
|
|
|
- Client - listing, detail, contacts
|
|
|
|
- User - listing, profiles, RBAC
|
2024-09-02 01:22:05 +08:00
|
|
|
- Billing - listing, profiles, RBAC -- incomplete
|
2024-01-28 21:17:16 +08:00
|
|
|
- Admin - admin functions
|
2024-09-02 01:22:05 +08:00
|
|
|
- Reflex rules
|
2021-10-17 22:05:13 +08:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
Our recommended method to get up and running quickly is to use the docker.
|
2024-09-02 01:22:05 +08:00
|
|
|
This method uses Docker and docker compose which handles the details of installing dependencies for you.
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
We provide 2 methods to run felicity with docker. Choose whichever methods suits you best.
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
```shell
|
|
|
|
git clone https://github.com/beak-insights/felicity-lims.git
|
|
|
|
cd felicity-lims
|
|
|
|
```
|
|
|
|
|
|
|
|
##### Method 1. FastAPI serve static files generated by the vue frontend.
|
|
|
|
|
2024-09-02 01:22:05 +08:00
|
|
|
Docker service presets are: *felicity-aio-caddy*, *felicity-aio-nginx*, *felicity-aio*
|
2024-01-28 21:17:16 +08:00
|
|
|
|
2024-09-02 01:22:05 +08:00
|
|
|
- **felicity-aio-caddy** - felicity serves static files with caddy as a reverse proxy in front
|
|
|
|
- **felicity-aio-nginx** - felicity serves static files with nginx as a reverse proxy in front
|
|
|
|
- **felicity-aio** - felicity serves static files without a reverse proxy
|
2024-01-28 21:17:16 +08:00
|
|
|
|
|
|
|
```commandline
|
|
|
|
docker compose -f ./docker-compose.prod.yml up -d your_preset --build
|
2024-09-02 01:22:05 +08:00
|
|
|
docker compose -f docker-compose.prod.yml exec your_preset bash -c "cd felicity && alembic upgrade head"
|
|
|
|
docker compose -f docker-compose.prod.yml logs your_preset -f -n100
|
2024-01-28 21:17:16 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
##### Method 2. Nginx/Caddy serve static files generated by the vue frontend.
|
|
|
|
|
2024-09-02 01:22:05 +08:00
|
|
|
Docker service presets are: *felicity-static-nginx*, *felicity-static-caddy*
|
2024-01-28 21:17:16 +08:00
|
|
|
|
2024-09-02 01:22:05 +08:00
|
|
|
- **felicity-static-nginx** - felicity handles the api and nginx serves static files
|
|
|
|
- **felicity-static-caddy** - felicity handles the api and caddy serves static files
|
2024-01-28 21:17:16 +08:00
|
|
|
|
|
|
|
```commandline
|
|
|
|
docker compose -f ./docker-compose.prod.yml up -d your_preset --build
|
2024-09-02 01:22:05 +08:00
|
|
|
docker compose -f docker-compose.prod.yml exec your_preset bash -c "cd felicity && alembic upgrade head"
|
|
|
|
docker compose -f docker-compose.prod.yml logs your_preset -f -n100
|
2024-01-28 21:17:16 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
##### Alternative deployment method without docker
|
|
|
|
|
|
|
|
If you don't want to use docker, as an alternative we recommend supervisor.
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2021-10-17 23:11:18 +08:00
|
|
|
```shell
|
2024-01-28 21:17:16 +08:00
|
|
|
# install os requirements
|
|
|
|
sudo apt update && apt install libcairo2-dev pkg-config python3-dev gcc g++
|
|
|
|
|
|
|
|
# create and activate a python virtual environment - we recomment using miniconda
|
|
|
|
conda create -n felicity python=3.11
|
|
|
|
conda activate felicity
|
|
|
|
|
|
|
|
# install felicity lims requirements
|
|
|
|
pip install -r requirements.txt;
|
|
|
|
|
|
|
|
# setup postgres - First create a database and user
|
|
|
|
pnpm db:al:upgrade;
|
|
|
|
|
|
|
|
# install webapp dependencies using pnpm - we recommend node v18 +
|
|
|
|
pnpm i;
|
|
|
|
|
|
|
|
# build webapp and setup felicity to serve the static files
|
|
|
|
pnpm standalone:build
|
|
|
|
|
|
|
|
# gunicorn run felicity - Yay you are up and running
|
|
|
|
pnpm server:gu
|
|
|
|
|
|
|
|
# Demonising felicity-lims with supervisor
|
|
|
|
|
|
|
|
# Install supervisor
|
|
|
|
sudo apt install supervisor
|
|
|
|
|
|
|
|
# check status:
|
|
|
|
sudo systemctl status supervisor
|
|
|
|
|
|
|
|
# open supervisor config file:
|
|
|
|
sudo nano /etc/supervisor/conf.d/felicity_lims.conf
|
|
|
|
|
|
|
|
# Copy and Paste the following and edit correct accordingly
|
|
|
|
# command first argument must the python in your virtual environment
|
|
|
|
# command second argument must the felicity folder inside felicity_lims
|
|
|
|
[program:felicity_lims]
|
|
|
|
command=/home/<user>/miniconda3/bin/python <full path to felicity lims root folder>
|
|
|
|
autostart=true
|
|
|
|
autorestart=true
|
|
|
|
stderr_logfile=/var/log/felicity_lims.err.log
|
|
|
|
stdout_logfile=/var/log/felicity_lims.out.log
|
|
|
|
|
|
|
|
# command example could be like:
|
|
|
|
# command=/home/administrator/miniconda3/bin/python /home/administrator/felicity_lims/felicity
|
|
|
|
|
|
|
|
# inform supervisor of our new programs:
|
|
|
|
sudo supervisorctl reread
|
|
|
|
|
|
|
|
# tell supervisor to enact any changes:
|
|
|
|
sudo supervisorctl update
|
|
|
|
|
|
|
|
##### Supervisor management commands
|
|
|
|
# check program status:
|
|
|
|
sudo supervisorctl status
|
|
|
|
|
|
|
|
# reload
|
|
|
|
sudo supervisorctl reload
|
|
|
|
|
|
|
|
# reload or restart felicity_lims:
|
|
|
|
sudo supervisorctl restart felicity_lims
|
|
|
|
|
|
|
|
# tail error logs:
|
|
|
|
sudo supervisorctl tail -f felicity_lims stderr # or
|
|
|
|
tail -f /var/log/felicity_lims.err.log
|
|
|
|
|
|
|
|
# tail output logs:
|
|
|
|
sudo supervisorctl tail -f felicity_lims stdout # or
|
|
|
|
tail -f /var/log/felicity_lims.out.log
|
2023-04-10 09:29:10 +08:00
|
|
|
```
|
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
## Application Monitoring
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
We have added open telemetry so that you can monitor how the application if performing. Make sure open tracing is
|
|
|
|
enabled if you want to collect metrics - `RUN_OPEN_TRACING=True` and also
|
|
|
|
run `opentelemetry-bootstrap --action=install`.
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2021-10-17 22:51:36 +08:00
|
|
|
```shell
|
2024-01-28 21:17:16 +08:00
|
|
|
# Install signoz with docker method - easier method
|
|
|
|
git clone -b main https://github.com/SigNoz/signoz.git
|
|
|
|
cd signoz/deploy/
|
|
|
|
|
|
|
|
# Remove the Sample Application from SigNoz Dashboard
|
|
|
|
# open Docker Compose file deploy/docker/clickhouse-setup/docker-compose.yaml in a plain-text editor.
|
|
|
|
# Comment out or remove the services.hotrod and services.load-hotrod sections
|
|
|
|
docker compose -f docker/clickhouse-setup/docker-compose.yaml up -d
|
|
|
|
|
|
|
|
## When you are done installing SigNoz, you can access the UI at: http://localhost:3301
|
2021-10-17 22:12:48 +08:00
|
|
|
```
|
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
## Load testing
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
Use locust or any method and tell us how it performs. We have done our locust tests and we are extremely happy so far.
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2021-10-17 22:12:48 +08:00
|
|
|
## Contact
|
2023-04-10 09:29:10 +08:00
|
|
|
|
2024-01-28 21:17:16 +08:00
|
|
|
- [EMail](mailto:aurthurmusendame@gmail.com?subject=[GitHub]%20Felicity%20Lims%20Enquiry)
|
|
|
|
- [LinkedIn](https://www.linkedin.com/in/aurthurmusendame)
|
|
|
|
- [Whatsapp](https://api.WhatsApp.com/send?phone=263776406399)
|
|
|
|
- [Telegram](https://www.t.me/aurthurm)
|