Git Product home page Git Product logo

django's Introduction

LIMS

Repository for UBC Capstone project 2021/2022, group LIMS 0

Introduction

Organization Background

A Laboratory Information Management System (LIMS) is an internal software program with multiple modules that manages laboratory work flows and information including but not limited to samples and test orders and results. The implementation of the LIMS will simplify data consolidation, improve data quality and security, facilitate receiving samples and track work orders.

Description

The client’s target is to prepare a user-friendly LIMS which will have all the options a lab could imagine with different module systems. It should be a plug and play software based integrated LIMS to minimize a requirement of software engineer in a lab facility.

Goals of the LIMS is to develop and deploy a server/cloud-based system that provides effective and efficient management of laboratory work flow and information within the organization. The LIMS will be a proponent part of all the regulatory requirement as it will track personnel activates, monitor equipment, record methods validation, record instrument calibration, record and produce technical documents, integrate measurements of uncertainty, ensure validity of results, general reporting, control data and information management.

General Objectives:

  • To implement a server/cloud-based LIMS to manage various lab work flow and information pertaining to tracking sample from receipt to completion.
  • To provide Inventory Management for consumables.
  • Maintain track-record of reagents, samples and current location.
  • Equipment integration for free-flowing data management, compliant to International Standardized Organization.
  • To record Quality Control procedures and meet objectives.
  • To facilitate real time reporting and record keeping.
  • To use unique identifiers (QR/Barcode).
  • To use app enabled devices for easy accessibility.
  • Incorporating accounting management to make it a complete package.
  • Easy to operate module system for any laboratory persons.
  • Clients’ portal to access test results and invoices

More Info in LIMS.pdf

Developer Instructions

Setting Up You .env File

  1. Place your .env file under LIMS_IMAGE
  2. Your .env file should be formatted like so
SECRET_KEY=fake_key
DJANGO_SETTINGS_MODULE=src.settings
EMAIL_PASSWORD=email_app_password

MSSQL_HOST=fake_mssql_host_name
DB_USER=fake_user
DB_PASSWORD=fake_password

POSTGRES_DB=fake_postgres_db_name
POSTGRES_HOST=fake_postgres_host_name
POSTGRES_USER=fake_user
POSTGRES_PASSWORD=fake_password
  1. For the SECRET_KEY, start up the web server (instructions below) use the bash command to get inside the contianer and run
  2. Replace the fake data with the correct data for the rest of the variables.
python -c "import secrets; print(secrets.token_urlsafe())"

This will generate your own SECRET_KEY

Creating new superusers

  1. sudo docker exec -it lims_web_server python manage.py migrate
  2. sudo docker exec -it lims_web_server python manage.py createsuperuser and follow the prompts.

Accessing the admin site

  1. Get superuser login from User.md
  2. Visit localhost:8000/admin and use the superuser account to login.

Alternatively

  1. Get superuser login from User.md
  2. Visit localhost:8000 and login use the superuser account to login
  3. In the navigation bar select "Administrator Dashboard" to be redirected to the admin site

Making migrations

When you change something about the database structure in the application we need to migrate those changes

  1. docker-compose --build
  2. docker exec -it lims_web_server bash
  3. python manage.py makemigrations
  4. python manage.py migrate

Note: If a change to the models was made that prevents the container from starting before the migrations are made, you can run this command in isolation: docker-compose run web python manage.py makemigrations and do the same to migrate.

Email Setup

Email settings are defined in settings.py. To change the email address, change the EMAIL_HOST_USER and EMAIL_HOST_PASSWORD values (and other values if changing to a provider other than gmail). The email host password is defined in the .env file. To change to a new gmail account, ensure to use an app password and not the google account password.

Testing

The testing README is found in the testing folder, along with all the tests

Docker Instructions

Using Docker Image to Run Web Server

  1. Ensure docker and docker-compose are installed, and that this repo is cloned to your machine.
  2. cd into LIMS_IMAGE.
  3. For first-time setup run docker-compose up --build db-postgres to let the database build (make sure you wait until it says the database is ready to accept connections. It may pause after the message 'ok' but that does not mean it is finished).
  4. After the database has run bring it down (CTRL+C) then run docker-compose up --build.

Enter the Docker Image

  1. Start Up the Web Server in one terminal
  2. In a new terminal, cd into LIMS_IMAGE.
  3. Run docker exec -it lims_db_server_postgres bash

Database Instructions

Exporting a database backup

This is required to persist data from the database in the repository. This will export the data as a backup file that will be used to initialize the database next time the container is built. When pulling updates with a new database backup, you must rebuild the container.

To create a database backup, simply run the following command while the container is running: docker exec -it lims_web_server python manage.py dumpdata -o datadump.json (this command also assumes the current directory is /LIMS_IMAGE)

Linting and Comments

We have done our best to leave explanitory comments throughout the code. We have linted the code to the best of our ability using pylint

django's People

Contributors

rock-it-science avatar shepkeira avatar sselin-co avatar keirashepherd avatar sayo96825 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.