from testproject.testproject.settings import INSTALLED_APPS
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:
Purpose: Provides the core data model of LOINC entities.
Components:
- LoincTerm model
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
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.
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",
]cd testproject
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuserDjango-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