# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-10-08 01:12
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Diagnosis_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Date of exam')),
                ('Diagnosis', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Doctor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Practice_Name', models.CharField(max_length=200)),
                ('Practice_Address', models.CharField(max_length=200)),
                ('Recovery_Phrase', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('username', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Doctor_Exam_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Date of exam')),
                ('Notes', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Doctor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Insurance_Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Company_Name', models.CharField(max_length=200)),
                ('Company_Address', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('username', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Insurance_Claim_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Date of exam')),
                ('Amount', models.FloatField(default=0.0)),
                ('Status', models.CharField(choices=[('Filed', 'Filed'), ('Examining', 'Examining'), ('Rejected', 'Rejected'), ('Accepted', 'Accepted'), ('Paid', 'Paid')], max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Medical_Administrator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Medical_Administrator_handling_claim_for_doctor', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Medical_Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Practice_Name', models.CharField(max_length=200)),
                ('Practice_Address', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Associated_Doctors', models.ManyToManyField(to='smirk.Doctor')),
            ],
        ),
        migrations.CreateModel(
            name='Note',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Note Date')),
                ('Text', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
            ],
        ),
        migrations.CreateModel(
            name='Nurse',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Practice_Name', models.CharField(max_length=200)),
                ('Practice_Address', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Associated_Doctors', models.ManyToManyField(to='smirk.Doctor')),
                ('username', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('SSN', models.CharField(max_length=200)),
                ('Address', models.CharField(max_length=200)),
                ('DOB', models.DateTimeField(verbose_name='Date')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('username', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Patient_Doctor_Correspondence_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Doctor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Doctor', to=settings.AUTH_USER_MODEL)),
                ('Notes', models.ManyToManyField(to='smirk.Note')),
            ],
        ),
        migrations.CreateModel(
            name='Raw_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Description', models.CharField(max_length=200)),
                ('File', models.FileField(upload_to='documents')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
            ],
        ),
        migrations.CreateModel(
            name='Record',
            fields=[
                ('Record_ID', models.AutoField(primary_key=True, serialize=False)),
                ('Record_Type', models.CharField(choices=[(b'Doctor Exam', b'Doctor Exam'), (b'Test Result', b'Test Result'), (b'Diagnosis', b'Diagnosis'), (b'Insurance Claim', b'Insurance Claim'), (b'Patient Doctor Correspondence', b'Patient Doctor Correspondence'), (b'Raw', b'Raw')], default='Doctor Exam', max_length=200)),
                ('Record_Date', models.DateTimeField(auto_now=True, verbose_name='Record_Date')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Edit_Permissions', models.ManyToManyField(related_name='Edit_Permissions', to=settings.AUTH_USER_MODEL)),
                ('Owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Owner', to=settings.AUTH_USER_MODEL)),
                ('Patient', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Patient', to=settings.AUTH_USER_MODEL)),
                ('View_Permissions', models.ManyToManyField(related_name='View_Permissions', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='System_Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(verbose_name='Date')),
            ],
        ),
        migrations.CreateModel(
            name='Test_Results_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Date of exam')),
                ('Lab', models.CharField(max_length=200)),
                ('Notes', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Doctor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('Record', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record')),
            ],
        ),
        migrations.AddField(
            model_name='raw_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
        migrations.AddField(
            model_name='patient_doctor_correspondence_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
        migrations.AddField(
            model_name='note',
            name='Patient_Doctor_Correspondence',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Patient_Doctor_Correspondence_Record'),
        ),
        migrations.AddField(
            model_name='medical_administrator',
            name='Associated_Nurses',
            field=models.ManyToManyField(to='smirk.Nurse'),
        ),
        migrations.AddField(
            model_name='medical_administrator',
            name='username',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='insurance_claim_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
        migrations.AddField(
            model_name='doctor_exam_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
        migrations.AddField(
            model_name='diagnosis_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-10-08 01:12
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Diagnosis_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Date of exam')),
                ('Diagnosis', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Doctor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Practice_Name', models.CharField(max_length=200)),
                ('Practice_Address', models.CharField(max_length=200)),
                ('Recovery_Phrase', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('username', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Doctor_Exam_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Date of exam')),
                ('Notes', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Doctor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Insurance_Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Company_Name', models.CharField(max_length=200)),
                ('Company_Address', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('username', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Insurance_Claim_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Date of exam')),
                ('Amount', models.FloatField(default=0.0)),
                ('Status', models.CharField(choices=[('Filed', 'Filed'), ('Examining', 'Examining'), ('Rejected', 'Rejected'), ('Accepted', 'Accepted'), ('Paid', 'Paid')], max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Medical_Administrator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Medical_Administrator_handling_claim_for_doctor', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Medical_Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Practice_Name', models.CharField(max_length=200)),
                ('Practice_Address', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Associated_Doctors', models.ManyToManyField(to='smirk.Doctor')),
            ],
        ),
        migrations.CreateModel(
            name='Note',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Note Date')),
                ('Text', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
            ],
        ),
        migrations.CreateModel(
            name='Nurse',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Practice_Name', models.CharField(max_length=200)),
                ('Practice_Address', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Associated_Doctors', models.ManyToManyField(to='smirk.Doctor')),
                ('username', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('SSN', models.CharField(max_length=200)),
                ('Address', models.CharField(max_length=200)),
                ('DOB', models.DateTimeField(verbose_name='Date')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('username', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Patient_Doctor_Correspondence_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Doctor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Doctor', to=settings.AUTH_USER_MODEL)),
                ('Notes', models.ManyToManyField(to='smirk.Note')),
            ],
        ),
        migrations.CreateModel(
            name='Raw_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Description', models.CharField(max_length=200)),
                ('File', models.FileField(upload_to='documents')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
            ],
        ),
        migrations.CreateModel(
            name='Record',
            fields=[
                ('Record_ID', models.AutoField(primary_key=True, serialize=False)),
                ('Record_Type', models.CharField(choices=[(b'Doctor Exam', b'Doctor Exam'), (b'Test Result', b'Test Result'), (b'Diagnosis', b'Diagnosis'), (b'Insurance Claim', b'Insurance Claim'), (b'Patient Doctor Correspondence', b'Patient Doctor Correspondence'), (b'Raw', b'Raw')], default='Doctor Exam', max_length=200)),
                ('Record_Date', models.DateTimeField(auto_now=True, verbose_name='Record_Date')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Edit_Permissions', models.ManyToManyField(related_name='Edit_Permissions', to=settings.AUTH_USER_MODEL)),
                ('Owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Owner', to=settings.AUTH_USER_MODEL)),
                ('Patient', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Patient', to=settings.AUTH_USER_MODEL)),
                ('View_Permissions', models.ManyToManyField(related_name='View_Permissions', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='System_Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(verbose_name='Date')),
            ],
        ),
        migrations.CreateModel(
            name='Test_Results_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now=True, verbose_name='Date of exam')),
                ('Lab', models.CharField(max_length=200)),
                ('Notes', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Date')),
                ('Doctor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('Record', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record')),
            ],
        ),
        migrations.AddField(
            model_name='raw_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
        migrations.AddField(
            model_name='patient_doctor_correspondence_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
        migrations.AddField(
            model_name='note',
            name='Patient_Doctor_Correspondence',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Patient_Doctor_Correspondence_Record'),
        ),
        migrations.AddField(
            model_name='medical_administrator',
            name='Associated_Nurses',
            field=models.ManyToManyField(to='smirk.Nurse'),
        ),
        migrations.AddField(
            model_name='medical_administrator',
            name='username',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='insurance_claim_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
        migrations.AddField(
            model_name='doctor_exam_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
        migrations.AddField(
            model_name='diagnosis_record',
            name='Record',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='smirk.Record'),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-10-08 01:12