# Generated by Django 2.0.1 on 2018-02-18 16:06

from django.conf import settings
import django.contrib.auth.models
from django.db import migrations, models
import django.db.models.deletion
import samples.models


class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('samples', '0002_auto_20171129_1947'),
    ]

    operations = [
        migrations.CreateModel(
            name='DefaultGroup',
            fields=[
                ('group_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='auth.Group')),
            ],
            bases=('auth.group',),
            managers=[
                ('objects', django.contrib.auth.models.GroupManager()),
            ],
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100)),
                ('last_name', models.CharField(max_length=100)),
                ('patient_dob', models.DateField(verbose_name='Date of Birth')),
                ('patient_sex', models.CharField(choices=[('M', 'M'), ('F', 'F'), ('Other', 'Other')], max_length=5)),
                ('transplant_date', models.DateField()),
                ('creatinine_baseline', models.FloatField()),
                ('deceased', models.BooleanField(verbose_name='Deceased?')),
                ('submitting_group', models.ForeignKey(on_delete=samples.models.DefaultGroup.get_default, to='auth.Group')),
                ('submitting_user', models.ForeignKey(on_delete=samples.models.DefaultGroup.get_default, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.RenameField(
            model_name='sample',
            old_name='transaction_date',
            new_name='date_of_sample_collection',
        ),
        migrations.RemoveField(
            model_name='sample',
            name='protein1',
        ),
        migrations.RemoveField(
            model_name='sample',
            name='protein2',
        ),
        migrations.RemoveField(
            model_name='sample',
            name='protein3',
        ),
        migrations.RemoveField(
            model_name='sample',
            name='protein4',
        ),
        migrations.RemoveField(
            model_name='sample',
            name='sample_Sex',
        ),
        migrations.RemoveField(
            model_name='sample',
            name='sample_dob',
        ),
        migrations.AddField(
            model_name='sample',
            name='biopsy_result',
            field=models.TextField(default='Null'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='sample',
            name='creatinine_current',
            field=models.FloatField(default=0),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='sample',
            name='eGFR',
            field=models.FloatField(default=0),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='sample',
            name='immunosuppression',
            field=models.FloatField(default=0),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='sample',
            name='reason_for_biopsy',
            field=models.TextField(default='Test'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='sample',
            name='sample_status',
            field=models.CharField(choices=[('Consented', 'Consented'), ('Submitted', 'Submitted'), ('Received', 'Received'), ('Tested', 'Tested'), ('Insufficient', 'Insufficient')], max_length=9),
        ),
        migrations.AlterField(
            model_name='sample',
            name='submitting_group',
            field=models.ForeignKey(on_delete=samples.models.DefaultGroup.get_default, to='auth.Group'),
        ),
        migrations.AlterField(
            model_name='sample',
            name='submitting_user',
            field=models.ForeignKey(on_delete=samples.models.DefaultGroup.get_default, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='sample',
            name='patient',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='samples.Patient'),
            preserve_default=False,
        ),
    ]
