# Generated by Django 2.2.11 on 2020-03-25 03:11

import django.core.validators
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("facility", "0023_merge_20200324_1959"),
    ]

    operations = [
        migrations.AddField(
            model_name="patientregistration",
            name="deleted",
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name="patientregistration",
            name="is_active",
            field=models.BooleanField(
                default=True,
                help_text="Not active when discharged, or removed from the watchlist",
            ),
        ),
        migrations.AddField(
            model_name="patientteleconsultation",
            name="created_date",
            field=models.DateTimeField(
                auto_now_add=True, default=django.utils.timezone.now
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="patientteleconsultation",
            name="patient",
            field=models.ForeignKey(
                default=None,
                on_delete=django.db.models.deletion.PROTECT,
                to="facility.PatientRegistration",
            ),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name="patientregistration",
            name="created_by",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        migrations.AlterField(
            model_name="patientregistration",
            name="phone_number",
            field=models.CharField(
                db_index=True,
                max_length=14,
                validators=[
                    django.core.validators.RegexValidator(
                        code="invalid_mobile",
                        message="Please Enter 10/11 digit mobile number or landline as 0<std code><phone number>",
                        regex="^((\\+91|91|0)[\\- ]{0,1})?[456789]\\d{9}$",
                    )
                ],
            ),
        ),
        migrations.AlterField(
            model_name="patientteleconsultation",
            name="created_by",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL,
            ),
        ),
    ]
