diff --git a/ippisite/db.sqlite3.REMOVED.git-id b/ippisite/db.sqlite3.REMOVED.git-id index dc41e52df23e0086cc2a543909651dbd0fd66784..226017b6055590ffd8776a4cb3d80676752867e5 100644 --- a/ippisite/db.sqlite3.REMOVED.git-id +++ b/ippisite/db.sqlite3.REMOVED.git-id @@ -1 +1 @@ -2b15950995d163e68e50e2aabf1b4e9a4ff2dfeb \ No newline at end of file +0029ba376cb55048b9799efa8aaeccaaf33d350d \ No newline at end of file diff --git a/ippisite/ippidb/migrations/0023_auto_20170523_1858.py b/ippisite/ippidb/migrations/0023_auto_20170523_1858.py new file mode 100644 index 0000000000000000000000000000000000000000..904209de44969541baed91edb7396d3cb0cbe27e --- /dev/null +++ b/ippisite/ippidb/migrations/0023_auto_20170523_1858.py @@ -0,0 +1,23 @@ +# -*- 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', + ), + ] diff --git a/ippisite/ippidb/models.py b/ippisite/ippidb/models.py index c2599e0127f52089c625ecfc28b3a10c90578a05..f012c911d8dfe41344a50c71ce54c4f64a04f750 100644 --- a/ippisite/ippidb/models.py +++ b/ippisite/ippidb/models.py @@ -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)