Skip to content
/ identity Public

Leicester Biomedical Research Centre Participant Register

License

Notifications You must be signed in to change notification settings

LCBRU/identity

Repository files navigation

identity

Print study sample, participant and bag labels

Demographics Web Service

This application uses the NHS Digital Patient Demographics Service (PDS). See the pds directory in the documentation directory for details.

The web services that this application utilises is maintained by Joss Markham ([email protected])

Installation and Running

  1. Download the code from github
git clone [email protected]:LCBRU/identity.git
  1. Install the requirements

Go to the identity directory and type the command:

sudo apt install sqlite3
sudo apt-get install libldap2-dev
sudo apt-get install libsasl2-dev
sudo apt-get install unixodbc unixodbc-dev
sudo apt-get install python3-pyodbc

pip install -r requirements.txt
  1. Create the database using

Staying in the identity directory and type the command:

./manage.py version_control
./manage.py upgrade
  1. Run the application

Staying in the identity directory and type the command:

./dev.py
  1. Start Celery Worker

This application uses Celery to run background tasks. To start Celery run the following command from the identity directory:

celery -A celery_worker.celery worker
  1. Start Celery Beat

This application uses Celery to run background tasks. To start Celery run the following command from the identity directory:

celery -A celery_worker.celery beat

Development

Testing

To test the application, run the following command from the project folder:

pytest

Database Schema Amendments

Create Migration

To create a migration run the command

./manage.py script "{Description of change}"

You will then need to change the newly-created script created in the migrations directory to make the necessary upgrade and downgrade changes.

Installation

To initialise the database run the commands:

manage.py version_control
manage.py upgrade

Upgrade

To upgrade the database to the current version, run the command:

manage.py upgrade

About

Leicester Biomedical Research Centre Participant Register

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published