Print study sample, participant and bag labels
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])
- Download the code from github
git clone [email protected]:LCBRU/identity.git- 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- Create the database using
Staying in the identity directory and type the command:
./manage.py version_control
./manage.py upgrade- Run the application
Staying in the identity directory and type the command:
./dev.py- 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
- 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
To test the application, run the following command from the project folder:
pytestTo 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.
To initialise the database run the commands:
manage.py version_control
manage.py upgradeTo upgrade the database to the current version, run the command:
manage.py upgrade