Skip to content
Snippets Groups Projects
Commit 84a8469a authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

administration modes are an enumerated type, not a external table.

indirectly fixes #10


Former-commit-id: 752a49eea7d413544f8ad74478924847edb1c959
parent 004f4690
No related branches found
No related tags found
No related merge requests found
2b15950995d163e68e50e2aabf1b4e9a4ff2dfeb
\ No newline at end of file
0029ba376cb55048b9799efa8aaeccaaf33d350d
\ No newline at end of file
# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-23 18:58
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ippidb', '0022_auto_20170523_1311'),
]
operations = [
migrations.AlterField(
model_name='testpkdescription',
name='administration_mode',
field=models.CharField(blank=True, choices=[('IV', ''), ('PO', ''), ('IP', ''), ('SL', 'SL')], max_length=2, null=True, verbose_name='Administration mode'),
),
migrations.DeleteModel(
name='AdministrationMode',
),
]
......@@ -361,14 +361,17 @@ class CompoundCytotoxicityResult(models.Model):
class Meta:
unique_together = (('compound', 'test_cytotoxicity_description'),)
class AdministrationMode(models.Model):
name = models.CharField('Administration mode', max_length=20, blank=True, null=True)
class TestPKDescription(models.Model):
ADMINISTRATION_MODES = (
('IV', ''),
('PO', ''),
('IP', ''),
('SL', 'SL')
)
biblio = models.ForeignKey(Bibliography)
test_name = models.CharField('Pharmacokinetic test name', max_length=100)
organism = models.ForeignKey(Taxonomy)
administration_mode = models.ForeignKey(AdministrationMode, blank=True, null=True)
administration_mode = models.CharField('Administration mode', max_length=2, choices=ADMINISTRATION_MODES,blank=True, null=True)
dose = models.DecimalField('Dose in mg/kg', max_digits=7, decimal_places=4, blank=True, null=True)
dose_interval = models.IntegerField('Dose interval, in hours', blank=True, null=True)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment