# Generated by Django 2.2.11 on 2020-08-08 16:35

import uuid

import django.contrib.postgres.fields.jsonb
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", "0155_auto_20200805_2312"),
    ]

    operations = [
        migrations.AddField(
            model_name="dailyround",
            name="medication_given",
            field=django.contrib.postgres.fields.jsonb.JSONField(default=dict),
        ),
        migrations.CreateModel(
            name="PrescriptionSupplier",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "external_id",
                    models.UUIDField(db_index=True, default=uuid.uuid4, unique=True),
                ),
                ("created_date", models.DateTimeField(auto_now_add=True, null=True)),
                ("modified_date", models.DateTimeField(auto_now=True, null=True)),
                ("deleted", models.BooleanField(default=False)),
                (
                    "scheme",
                    models.IntegerField(
                        choices=[
                            (10, "GOVERNMENT_SUPPLY"),
                            (30, "DONATION"),
                            (40, "PAID_BY_PATIENT"),
                        ],
                        default=10,
                    ),
                ),
                (
                    "status",
                    models.IntegerField(
                        choices=[
                            (10, "PENDING"),
                            (30, "INITIATED"),
                            (40, "COMPLETED"),
                            (50, "DEFERRED"),
                        ],
                        default=10,
                    ),
                ),
                ("supplier", models.TextField(blank=True, default="")),
                ("remarks", models.TextField(blank=True, default="")),
                (
                    "consultation",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="patient_consultation",
                        to="facility.PatientConsultation",
                    ),
                ),
                (
                    "facility",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to="facility.Facility",
                    ),
                ),
                (
                    "updated_user",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
