Skip to content

nerdocs/django-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

from testproject.testproject.settings import INSTALLED_APPS

Django-Lab

This is a Django library for laboratory units, specimen, analytes etc., and to handle, maintain, and convert between them.

It is separated into three modules:

django_lab.loinc

Purpose: Provides the core data model of LOINC entities.

Components:

  • LoincTerm model

django_lab.core

Purpose: Provides the core data models and fundamental functionality for e.g. the needs of a GP's practice: laboratory units, specimens, and analytes. Bases on django_lab.loinc.

Components:

  • Base models for laboratory entities
  • Unit definitions and relationships
  • Core validation logic
  • Converters

django_lab.ops

Purpose: Provides operational functionality for laboratory operations: maintenance, sample management, platforms, literature, etc.

Components:

  • ...

This project is still pre-alpha. Don't use it without expecting breakage.

Usage

Use django_lab in your Django project as usual.

# settings.py

INSTALLED_APPS = [
    # ...
    "django_lab.loinc",  # always needed!
    "django_lab.core",  # basic functionality
    
    # special functionality for laboratories, optional: 
    "django_lab.ops",
]

Demo project setup

cd testproject
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser

Initial data import

Django-lab provides a subset and some side data of LOINC as fixtures. You are not forced to import these data as you can start with a blank database too. But it will help to get names to abbreviations, and some initial specimen data etc. into the database, before importing the real LOINC data.

!!! note You must import these fixtures before you import Loinc.csv. Later you will get contraint errors.

To load the predefined specimen types, method types etc. into your database, use Django's loaddata management command:

python manage.py loaddata initial_data

About

Medical laboratory management basics for Django

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages