# Generated by Django 2.2.11 on 2020-03-29 06:23

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


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("facility", "0043_populate_facility_district"),
    ]

    operations = [
        migrations.CreateModel(
            name="PatientSample",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_date", models.DateTimeField(auto_now_add=True)),
                ("modified_date", models.DateTimeField(auto_now=True)),
                ("deleted", models.BooleanField(default=False)),
                (
                    "status",
                    models.IntegerField(
                        choices=[
                            (1, "REQUEST_SUBMITTED"),
                            (2, "APPROVED"),
                            (3, "DENIED"),
                            (4, "SENT_TO_COLLECTON_CENTRE"),
                            (5, "RECEIVED_AND_FORWARED"),
                            (6, "RECEIVED_AT_LAB"),
                            (7, "COMPLETED"),
                        ],
                        default=1,
                    ),
                ),
                (
                    "result",
                    models.IntegerField(
                        choices=[
                            (1, "POSITIVE"),
                            (2, "NEGATIVE"),
                            (3, "AWAITING"),
                            (4, "INVALID"),
                        ],
                        default=3,
                    ),
                ),
                ("date_of_sample", models.DateTimeField(blank=True, null=True)),
                ("date_of_result", models.DateTimeField(blank=True, null=True)),
                (
                    "consultation",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to="facility.PatientConsultation",
                    ),
                ),
                (
                    "patient",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to="facility.PatientRegistration",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="PatientSampleFlow",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_date", models.DateTimeField(auto_now_add=True)),
                ("modified_date", models.DateTimeField(auto_now=True)),
                ("deleted", models.BooleanField(default=False)),
                (
                    "status",
                    models.IntegerField(
                        choices=[
                            (1, "REQUEST_SUBMITTED"),
                            (2, "APPROVED"),
                            (3, "DENIED"),
                            (4, "SENT_TO_COLLECTON_CENTRE"),
                            (5, "RECEIVED_AND_FORWARED"),
                            (6, "RECEIVED_AT_LAB"),
                            (7, "COMPLETED"),
                        ]
                    ),
                ),
                ("notes", models.CharField(max_length=255)),
                (
                    "created_by",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "patient_sample",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to="facility.PatientSample",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
