# Generated by Django 3.1.2 on 2020-11-14 13:39

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('did', models.AutoField(db_column='DID', primary_key=True, serialize=False)),
                ('name', models.CharField(blank=True, max_length=50, null=True)),
                ('surname', models.CharField(blank=True, max_length=50, null=True)),
                ('gender', models.CharField(blank=True, max_length=50, null=True)),
                ('dob', models.CharField(blank=True, db_column='DoB', max_length=50, null=True)),
                ('country', models.CharField(blank=True, db_column='Country', max_length=50, null=True)),
            ],
            options={
                'db_table': 'Doctor',
            },
        ),
        migrations.CreateModel(
            name='Medication',
            fields=[
                ('medid', models.AutoField(db_column='MEDID', primary_key=True, serialize=False)),
                ('name', models.CharField(blank=True, max_length=50, null=True)),
                ('generic_name', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'db_table': 'Medication',
            },
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('pid', models.AutoField(db_column='PID', primary_key=True, serialize=False)),
                ('name', models.CharField(blank=True, max_length=50, null=True)),
                ('surname', models.CharField(blank=True, max_length=50, null=True)),
                ('gender', models.CharField(blank=True, max_length=50, null=True)),
                ('date', models.DateField()),
                ('country', models.CharField(blank=True, db_column='Country', max_length=50, null=True)),
                ('street_address', models.CharField(blank=True, db_column='Street_Address', max_length=50, null=True)),
                ('city', models.CharField(blank=True, db_column='City', max_length=50, null=True)),
                ('state', models.CharField(blank=True, db_column='State', max_length=50, null=True)),
                ('postal', models.CharField(blank=True, db_column='Postal', max_length=50, null=True)),
            ],
            options={
                'db_table': 'Patient',
            },
        ),
        migrations.CreateModel(
            name='Prescription',
            fields=[
                ('prescript_id', models.AutoField(db_column='Prescript_ID', primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('did', models.ForeignKey(blank=True, db_column='DID', null=True, on_delete=django.db.models.deletion.CASCADE, to='patient.doctor')),
                ('pid', models.ForeignKey(blank=True, db_column='PID', null=True, on_delete=django.db.models.deletion.CASCADE, to='patient.patient')),
            ],
            options={
                'db_table': 'Prescription',
            },
        ),
        migrations.CreateModel(
            name='Xray',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('xray', models.BinaryField(blank=True, db_column='Xray', null=True)),
                ('pid', models.ForeignKey(blank=True, db_column='PID', null=True, on_delete=django.db.models.deletion.CASCADE, to='patient.patient')),
            ],
            options={
                'db_table': 'Xray',
                'unique_together': {('pid', 'date')},
            },
        ),
        migrations.CreateModel(
            name='Prescriptmed',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('description', models.CharField(blank=True, db_column='Description', max_length=50, null=True)),
                ('days', models.IntegerField(blank=True, db_column='Days', null=True)),
                ('medid', models.ForeignKey(blank=True, db_column='MEDID', null=True, on_delete=django.db.models.deletion.CASCADE, to='patient.medication')),
                ('prescript_id', models.ForeignKey(blank=True, db_column='Prescript_ID', null=True, on_delete=django.db.models.deletion.CASCADE, to='patient.prescription')),
            ],
            options={
                'db_table': 'PrescriptMed',
                'unique_together': {('medid', 'prescript_id')},
            },
        ),
        migrations.CreateModel(
            name='Mri',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('mri', models.BinaryField(blank=True, db_column='MRI', null=True)),
                ('pid', models.ForeignKey(blank=True, db_column='PID', null=True, on_delete=django.db.models.deletion.CASCADE, to='patient.patient')),
            ],
            options={
                'db_table': 'MRI',
                'unique_together': {('pid', 'date')},
            },
        ),
        migrations.CreateModel(
            name='Commonbloodcount',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('wbc', models.DecimalField(blank=True, db_column='WBC', decimal_places=10, max_digits=19, null=True)),
                ('rbc', models.DecimalField(blank=True, db_column='RBC', decimal_places=10, max_digits=19, null=True)),
                ('hemoglobin', models.DecimalField(blank=True, db_column='Hemoglobin', decimal_places=10, max_digits=19, null=True)),
                ('hematocrit', models.DecimalField(blank=True, db_column='Hematocrit', decimal_places=10, max_digits=19, null=True)),
                ('mcv', models.DecimalField(blank=True, db_column='MCV', decimal_places=10, max_digits=19, null=True)),
                ('mch', models.DecimalField(blank=True, db_column='MCH', decimal_places=10, max_digits=19, null=True)),
                ('mchc', models.DecimalField(blank=True, db_column='MCHC', decimal_places=10, max_digits=19, null=True)),
                ('rdw', models.DecimalField(blank=True, db_column='RDW', decimal_places=10, max_digits=19, null=True)),
                ('platelets', models.DecimalField(blank=True, db_column='Platelets', decimal_places=10, max_digits=19, null=True)),
                ('neurophils', models.DecimalField(blank=True, db_column='Neurophils', decimal_places=10, max_digits=19, null=True)),
                ('lymphs', models.DecimalField(blank=True, db_column='Lymphs', decimal_places=10, max_digits=19, null=True)),
                ('monocytes', models.DecimalField(blank=True, db_column='Monocytes', decimal_places=10, max_digits=19, null=True)),
                ('pid', models.ForeignKey(blank=True, db_column='PID', null=True, on_delete=django.db.models.deletion.CASCADE, to='patient.patient')),
            ],
            options={
                'db_table': 'CommonBloodCount',
                'unique_together': {('pid', 'date')},
            },
        ),
        migrations.CreateModel(
            name='Basicmetabolismpanel',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('glucose', models.DecimalField(blank=True, db_column='Glucose', decimal_places=10, max_digits=19, null=True)),
                ('creatinine', models.DecimalField(blank=True, db_column='Creatinine', decimal_places=10, max_digits=19, null=True)),
                ('sodium', models.DecimalField(blank=True, db_column='Sodium', decimal_places=10, max_digits=19, null=True)),
                ('potassium', models.DecimalField(blank=True, db_column='Potassium', decimal_places=10, max_digits=19, null=True)),
                ('chloride', models.DecimalField(blank=True, db_column='Chloride', decimal_places=10, max_digits=19, null=True)),
                ('carbon_dioxide', models.DecimalField(blank=True, db_column='Carbon_Dioxide', decimal_places=10, max_digits=19, null=True)),
                ('pid', models.ForeignKey(blank=True, db_column='PID', null=True, on_delete=django.db.models.deletion.CASCADE, to='patient.patient')),
            ],
            options={
                'db_table': 'BasicMetabolismPanel',
                'unique_together': {('pid', 'date')},
            },
        ),
    ]
