# Generated by Django 2.2.7 on 2019-11-30 17:14

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CLINICS',
            fields=[
                ('clinicID', models.IntegerField(primary_key=True, serialize=False)),
                ('clinicName', models.CharField(max_length=100)),
                ('location', models.CharField(max_length=100)),
                ('phoneNumber', models.IntegerField()),
                ('emailID', models.EmailField(max_length=254)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='DIALYZER_MODELS',
            fields=[
                ('dialyzerID', models.IntegerField(primary_key=True, serialize=False)),
                ('dialyzerName', models.CharField(max_length=100)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='MACHINES',
            fields=[
                ('machineID', models.IntegerField(primary_key=True, serialize=False)),
                ('chair', models.PositiveSmallIntegerField()),
                ('dialysateFlow', models.DecimalField(decimal_places=2, max_digits=6)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='MEDICINE_INVENTORY',
            fields=[
                ('medicationID', models.IntegerField(primary_key=True, serialize=False)),
                ('medicationName', models.CharField(max_length=100)),
                ('quantity', models.PositiveSmallIntegerField()),
                ('strength', models.PositiveSmallIntegerField()),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='PATIENTS',
            fields=[
                ('patientID', models.IntegerField(primary_key=True, serialize=False)),
                ('firstName', models.CharField(max_length=100)),
                ('lastName', models.CharField(max_length=100)),
                ('dob', models.DateField()),
                ('phoneNo', models.IntegerField()),
                ('address', models.CharField(max_length=100)),
                ('gender', models.CharField(max_length=10)),
                ('dialysisType', models.CharField(max_length=100)),
                ('height', models.PositiveSmallIntegerField()),
                ('weight', models.PositiveSmallIntegerField()),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'patients',
            },
        ),
        migrations.CreateModel(
            name='PRESCRIPTIONS',
            fields=[
                ('prescriptionID', models.IntegerField(primary_key=True, serialize=False)),
                ('bfr', models.IntegerField()),
                ('dfr', models.IntegerField()),
                ('bufferSetting', models.IntegerField()),
                ('dialysateTemp', models.DecimalField(decimal_places=2, max_digits=6)),
                ('doseOrdered', models.IntegerField()),
                ('edw', models.DecimalField(decimal_places=2, max_digits=6)),
                ('frequency', models.IntegerField()),
                ('heparinBolus', models.IntegerField()),
                ('instruction', models.CharField(max_length=100)),
                ('lastGivenDate', models.DateTimeField()),
                ('lastGivenDose', models.IntegerField()),
                ('sodiumSetting', models.PositiveSmallIntegerField()),
                ('strength', models.IntegerField()),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('treatmentTime', models.DateTimeField()),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.PATIENTS')),
            ],
        ),
        migrations.CreateModel(
            name='STAFF',
            fields=[
                ('staffID', models.IntegerField(primary_key=True, serialize=False)),
                ('firstName', models.CharField(max_length=100)),
                ('lastName', models.CharField(max_length=100)),
                ('dateOfBirth', models.DateField()),
                ('dateOfHire', models.DateField()),
                ('emailID', models.EmailField(max_length=254)),
                ('address', models.CharField(max_length=100)),
                ('phoneNo', models.CharField(max_length=10)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('type', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='TRAININGS',
            fields=[
                ('trainingID', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=100)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='ADMINS',
            fields=[
                ('salary', models.IntegerField()),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='hd.STAFF')),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='DOCTORS',
            fields=[
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='hd.STAFF')),
                ('degree', models.CharField(max_length=100)),
                ('doctorType', models.CharField(max_length=100)),
                ('onCall', models.BooleanField()),
                ('salary', models.DecimalField(decimal_places=2, max_digits=6)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='HELPERS',
            fields=[
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='hd.STAFF')),
                ('helperType', models.CharField(max_length=100)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='TECHNICIANS',
            fields=[
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='hd.STAFF')),
                ('perHourWage', models.DecimalField(decimal_places=3, max_digits=5)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='PRESCRIBED_DOSAGES',
            fields=[
                ('dosageID', models.IntegerField(primary_key=True, serialize=False)),
                ('dosageNo', models.IntegerField()),
                ('dosageOrdered', models.IntegerField()),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('medication', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.MEDICINE_INVENTORY')),
                ('prescription', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.PRESCRIPTIONS')),
            ],
        ),
        migrations.CreateModel(
            name='MEDICAL_DEVICES',
            fields=[
                ('medicalDeviceID', models.IntegerField(primary_key=True, serialize=False)),
                ('medicalDeviceType', models.CharField(max_length=100)),
                ('name', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=100)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('clinic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.CLINICS')),
            ],
        ),
        migrations.CreateModel(
            name='DIALYZER_UNITS',
            fields=[
                ('dialyzerUnitID', models.IntegerField(primary_key=True, serialize=False)),
                ('dialyzerReuseNumber', models.PositiveSmallIntegerField()),
                ('dialyzerTest', models.CharField(max_length=100)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('dialyzer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.DIALYZER_MODELS')),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.PATIENTS')),
            ],
        ),
        migrations.CreateModel(
            name='APPOINTMENTS',
            fields=[
                ('appointID', models.IntegerField(primary_key=True, serialize=False)),
                ('appointDate', models.DateField()),
                ('appointTime', models.TimeField()),
                ('mobilityType', models.CharField(max_length=100)),
                ('runNumber', models.IntegerField()),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.PATIENTS')),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.ADMINS')),
            ],
        ),
        migrations.CreateModel(
            name='CARETAKERS',
            fields=[
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='hd.HELPERS')),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.PATIENTS')),
            ],
        ),
        migrations.CreateModel(
            name='NURSES',
            fields=[
                ('degree', models.CharField(max_length=100)),
                ('seniority', models.CharField(max_length=100)),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='hd.HELPERS')),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='TREATMENTS',
            fields=[
                ('treatmentID', models.IntegerField(primary_key=True, serialize=False)),
                ('arterialAccess', models.CharField(max_length=100)),
                ('arterialPressure', models.DecimalField(decimal_places=2, max_digits=6)),
                ('dialyzate1', models.CharField(max_length=100)),
                ('dialysisEndWeight', models.DecimalField(decimal_places=2, max_digits=6)),
                ('duration', models.TimeField()),
                ('heparinUnitsActual', models.CharField(max_length=100)),
                ('orderedBloodflow', models.DecimalField(decimal_places=2, max_digits=6)),
                ('targetBloodprocessed', models.DecimalField(decimal_places=2, max_digits=6)),
                ('totalFluidRemoval', models.DecimalField(decimal_places=2, max_digits=6)),
                ('treatmentDate', models.DateTimeField()),
                ('treatmentStarttime', models.DateTimeField()),
                ('ufr', models.CharField(max_length=100)),
                ('venousAccess', models.CharField(max_length=100)),
                ('venousPressure', models.CharField(max_length=100)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('prescription', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.PRESCRIPTIONS')),
                ('dialyzedBy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.HELPERS')),
            ],
        ),
        migrations.CreateModel(
            name='RUNS',
            fields=[
                ('hdRunID', models.IntegerField(primary_key=True, serialize=False)),
                ('doseGiven', models.DecimalField(decimal_places=2, max_digits=6)),
                ('medicationName', models.CharField(max_length=100)),
                ('route', models.CharField(max_length=100)),
                ('strength', models.DecimalField(decimal_places=2, max_digits=6)),
                ('runID', models.IntegerField()),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('medication', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.MEDICINE_INVENTORY')),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.PATIENTS')),
                ('treatment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.TREATMENTS')),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.HELPERS')),
            ],
        ),
        migrations.CreateModel(
            name='RUN_VITALS',
            fields=[
                ('hdRunVitalsID', models.IntegerField(primary_key=True, serialize=False)),
                ('bfr', models.DecimalField(decimal_places=2, max_digits=6)),
                ('bpSitting', models.DecimalField(decimal_places=2, max_digits=6)),
                ('bpStanding', models.DecimalField(decimal_places=2, max_digits=6)),
                ('dfr', models.DecimalField(decimal_places=2, max_digits=6)),
                ('pulse', models.DecimalField(decimal_places=2, max_digits=6)),
                ('temp', models.DecimalField(decimal_places=2, max_digits=6)),
                ('time', models.DateTimeField()),
                ('weight', models.DecimalField(decimal_places=2, max_digits=6)),
                ('runVitalID', models.IntegerField()),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('treatment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.TREATMENTS')),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.HELPERS')),
            ],
        ),
        migrations.CreateModel(
            name='RUN_EVENTS',
            fields=[
                ('hdRunEventID', models.IntegerField(primary_key=True, serialize=False)),
                ('comments', models.CharField(max_length=100)),
                ('event', models.CharField(max_length=100)),
                ('severity', models.CharField(max_length=100)),
                ('time', models.DateTimeField()),
                ('treatmentname', models.CharField(max_length=100)),
                ('runEventID', models.IntegerField()),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('treatment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.TREATMENTS')),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.HELPERS')),
            ],
        ),
        migrations.AddField(
            model_name='prescriptions',
            name='prescribedBy',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.DOCTORS'),
        ),
        migrations.CreateModel(
            name='PRE_POST',
            fields=[
                ('hdPrePostID', models.IntegerField(primary_key=True, serialize=False)),
                ('bpSitting', models.DecimalField(decimal_places=2, max_digits=6)),
                ('bpStanding', models.DecimalField(decimal_places=2, max_digits=6)),
                ('catheterInstillation', models.CharField(max_length=100)),
                ('dateTimeOfVitals', models.DateTimeField()),
                ('dialyzerAppearance', models.CharField(max_length=100)),
                ('noOfDressings', models.IntegerField()),
                ('orderedSaline', models.DecimalField(decimal_places=2, max_digits=6)),
                ('pulseRate', models.DecimalField(decimal_places=2, max_digits=6)),
                ('respirationRate', models.DecimalField(decimal_places=2, max_digits=6)),
                ('targetWeight', models.DecimalField(decimal_places=2, max_digits=6)),
                ('temperature', models.DecimalField(decimal_places=2, max_digits=6)),
                ('vitalComments', models.CharField(max_length=100)),
                ('vitalFlag', models.CharField(max_length=100)),
                ('weight', models.DecimalField(decimal_places=2, max_digits=6)),
                ('weightChange', models.DecimalField(decimal_places=2, max_digits=6)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('treatment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.TREATMENTS')),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.HELPERS')),
            ],
        ),
        migrations.CreateModel(
            name='OUTCLINICS',
            fields=[
                ('treatment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='hd.TREATMENTS')),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('machine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.CLINICS')),
            ],
        ),
        migrations.CreateModel(
            name='MACHINE_VERIFICATIONS',
            fields=[
                ('machineVerificationID', models.IntegerField(primary_key=True, serialize=False)),
                ('RORejectionActual', models.IntegerField(blank=True, null=True)),
                ('dialysisFluidTemperature', models.CharField(max_length=100)),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('machine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.MACHINES')),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.CLINICS')),
                ('treatment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.TREATMENTS')),
            ],
            options={
                'unique_together': {('machine', 'staff', 'treatment')},
            },
        ),
        migrations.CreateModel(
            name='INCLINICS',
            fields=[
                ('treatment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='hd.TREATMENTS')),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('appoint', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.APPOINTMENTS')),
                ('clinic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.CLINICS')),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.ADMINS')),
            ],
        ),
        migrations.CreateModel(
            name='TRAINING_DETAILS',
            fields=[
                ('trainingDetailsID', models.IntegerField(primary_key=True, serialize=False)),
                ('date', models.DateTimeField()),
                ('duration', models.IntegerField()),
                ('cost', models.IntegerField()),
                ('createts', models.DateTimeField(auto_now_add=True)),
                ('modifyts', models.DateTimeField(auto_now=True)),
                ('training', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.TRAININGS')),
                ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hd.CARETAKERS')),
            ],
            options={
                'unique_together': {('training', 'staff')},
            },
        ),
    ]
