# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-11-03 22:30
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Categoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=30, verbose_name='Categoria')),
            ],
        ),
        migrations.CreateModel(
            name='CategoriaE',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='DetalleAnalisis',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('valor', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Diagnostico',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=30, verbose_name='Diagnostico')),
                ('tecnica', models.CharField(max_length=30)),
                ('tercerizacion', models.BooleanField()),
                ('activo', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='EliminacionProtocolo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateField()),
                ('motivoBaja', models.TextField(verbose_name='Motivo de Baja')),
            ],
        ),
        migrations.CreateModel(
            name='Especializacion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=30, verbose_name='Especializacion')),
            ],
        ),
        migrations.CreateModel(
            name='Especie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=30, verbose_name='Especie')),
                ('categoria', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.CategoriaE')),
            ],
        ),
        migrations.CreateModel(
            name='Establecimiento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('partido', models.CharField(max_length=20)),
                ('propietario', models.CharField(max_length=30)),
                ('RENSPA', models.CharField(max_length=30)),
                ('CUIT', models.CharField(blank=True, max_length=30, null=True)),
                ('activo', models.BooleanField()),
                ('categorias', models.ManyToManyField(to='alpha1.Categoria')),
            ],
        ),
        migrations.CreateModel(
            name='Explotacion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=30, verbose_name='Explotacion')),
            ],
        ),
        migrations.CreateModel(
            name='Individuos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identificacion', models.CharField(max_length=10, verbose_name='Identificacion / N° de Caravana')),
                ('nombre', models.CharField(blank=True, max_length=15, null=True, verbose_name='Nombre')),
                ('edad', models.CharField(blank=True, max_length=2, null=True, verbose_name='Edad')),
                ('sexo', models.CharField(blank=True, choices=[('M', 'Macho'), ('H', 'Hembra'), ('X', 'NS/NC')], default='X', max_length=1, null=True, verbose_name='Sexo')),
                ('obs', models.TextField(blank=True, null=True, verbose_name='Observaciones')),
            ],
        ),
        migrations.CreateModel(
            name='Motivos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Muestra',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=30, verbose_name='Muestra')),
            ],
        ),
        migrations.CreateModel(
            name='Parametros',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=30, verbose_name='Parametro')),
                ('tipo_de_dato', models.CharField(choices=[('I', 'Entero'), ('B', 'Positivo/Negativo'), ('F', 'Numero con decimales'), ('S', 'Texto')], max_length=1, verbose_name='Tipo de Dato')),
            ],
        ),
        migrations.CreateModel(
            name='Protocolo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numero', models.IntegerField(unique=True, verbose_name='Numero de Protocolo')),
                ('activo', models.BooleanField(verbose_name='Estado Confirmado')),
            ],
        ),
        migrations.CreateModel(
            name='Raza',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='SolicitudAnalisis',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateField()),
                ('obs', models.TextField(blank=True, null=True, verbose_name='Observaciones')),
                ('activo', models.BooleanField()),
                ('especie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Especie')),
                ('establecimiento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Establecimiento')),
                ('motivo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Motivos')),
            ],
        ),
        migrations.CreateModel(
            name='ValoresReferencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('valorRef', models.CharField(max_length=30)),
                ('valorDef', models.CharField(max_length=30)),
                ('diagnostico', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Diagnostico')),
                ('especie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Especie')),
                ('parametros', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Parametros')),
            ],
        ),
        migrations.CreateModel(
            name='Veterinario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30, verbose_name='Nombre')),
                ('apellido', models.CharField(max_length=30, verbose_name='Apellido')),
                ('matricula', models.CharField(max_length=10, unique=True)),
                ('dni', models.CharField(max_length=8, unique=True)),
                ('domicilio_particular', models.CharField(blank=True, max_length=30, null=True, verbose_name='Domicilio Particular')),
                ('cp_domicilio_particular', models.CharField(blank=True, max_length=4, null=True, verbose_name='Codigo Postal del Dom.Part.')),
                ('domicilio_fiscal', models.CharField(max_length=30, verbose_name='Domicilio Fiscal')),
                ('cp_domicilio_fiscal', models.CharField(max_length=4, verbose_name='Codigo Postal del Dom.Fisc')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='Email')),
                ('cuit', models.CharField(max_length=13, verbose_name='C.U.I.T.')),
                ('codigo_area', models.CharField(max_length=4, verbose_name='Codigo de Area')),
                ('telefono1', models.CharField(max_length=15, verbose_name='Telefono 1')),
                ('telefono2', models.CharField(blank=True, max_length=15, null=True, verbose_name='Telefono 2')),
                ('fecha_ingreso', models.DateField(verbose_name='Fecha de Ingreso')),
                ('fecha_baja', models.DateField(blank=True, null=True, verbose_name='Fecha de Baja')),
                ('acreditacion_brucelosis', models.CharField(blank=True, max_length=15, null=True, verbose_name='Numero de Acreditacion de Brucelosis')),
                ('acreditacion_aie', models.CharField(blank=True, max_length=15, null=True, verbose_name='Numero de Acreditacion de A.I.E.')),
                ('activo', models.BooleanField()),
                ('especializaciones', models.ManyToManyField(to='alpha1.Especializacion')),
            ],
        ),
        migrations.AddField(
            model_name='solicitudanalisis',
            name='veterinario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Veterinario'),
        ),
        migrations.AddField(
            model_name='establecimiento',
            name='explotacion',
            field=models.ManyToManyField(to='alpha1.Explotacion'),
        ),
        migrations.AddField(
            model_name='establecimiento',
            name='veterinario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Veterinario', verbose_name='Veterinario de Cabecera'),
        ),
        migrations.AddField(
            model_name='especie',
            name='raza',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Raza'),
        ),
        migrations.AddField(
            model_name='eliminacionprotocolo',
            name='protocolo',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Protocolo'),
        ),
        migrations.AddField(
            model_name='diagnostico',
            name='muestra',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Muestra'),
        ),
        migrations.AddField(
            model_name='detalleanalisis',
            name='diagnostico',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Diagnostico'),
        ),
        migrations.AddField(
            model_name='detalleanalisis',
            name='individuo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Individuos'),
        ),
        migrations.AddField(
            model_name='detalleanalisis',
            name='parametros',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Parametros'),
        ),
        migrations.AddField(
            model_name='detalleanalisis',
            name='protocolo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.Protocolo'),
        ),
        migrations.AddField(
            model_name='detalleanalisis',
            name='solicitud',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alpha1.SolicitudAnalisis'),
        ),
        migrations.AlterUniqueTogether(
            name='valoresreferencia',
            unique_together=set([('diagnostico', 'especie', 'parametros')]),
        ),
    ]
