# Generated by Django 4.1.2 on 2022-11-22 19:59

import django.core.validators
from django.db import migrations, models
import django_crypto_fields.fields.encrypted_char_field
import edc_model.models.fields.other_charfield


class Migration(migrations.Migration):
    dependencies = [
        ("intecomm_screening", "0007_historicalpatientlog_last_4_contact_number_and_more"),
    ]

    operations = [
        migrations.RenameField(
            model_name="historicalpatientlog",
            old_name="last_routine_appt_date",
            new_name="last_appt_date",
        ),
        migrations.RenameField(
            model_name="historicalpatientlog",
            old_name="next_routine_appt_date",
            new_name="next_appt_date",
        ),
        migrations.RenameField(
            model_name="patientlog",
            old_name="last_routine_appt_date",
            new_name="last_appt_date",
        ),
        migrations.RenameField(
            model_name="patientlog",
            old_name="next_routine_appt_date",
            new_name="next_appt_date",
        ),
        migrations.RemoveField(
            model_name="historicalpatientcall",
            name="attend_date",
        ),
        migrations.RemoveField(
            model_name="patientcall",
            name="attend_date",
        ),
        migrations.AddField(
            model_name="historicalpatientcall",
            name="last_appt_date",
            field=models.DateField(
                blank=True,
                help_text="This may be helpful when updating health records",
                null=True,
                verbose_name="When did the patient last seek care",
            ),
        ),
        migrations.AddField(
            model_name="historicalpatientcall",
            name="last_attend_clinic",
            field=models.CharField(
                blank=True,
                choices=[],
                help_text="This may be helpful when updating health records",
                max_length=25,
                null=True,
                verbose_name="Where did the patient last seek care",
            ),
        ),
        migrations.AddField(
            model_name="historicalpatientcall",
            name="last_attend_clinic_other",
            field=edc_model.models.fields.other_charfield.OtherCharField(
                blank=True,
                max_length=35,
                null=True,
                verbose_name="If other, please specify ...",
            ),
        ),
        migrations.AddField(
            model_name="historicalpatientcall",
            name="next_appt_date",
            field=models.DateField(
                blank=True, null=True, verbose_name="When will the patient next attend"
            ),
        ),
        migrations.AddField(
            model_name="patientcall",
            name="last_appt_date",
            field=models.DateField(
                blank=True,
                help_text="This may be helpful when updating health records",
                null=True,
                verbose_name="When did the patient last seek care",
            ),
        ),
        migrations.AddField(
            model_name="patientcall",
            name="last_attend_clinic",
            field=models.CharField(
                blank=True,
                choices=[],
                help_text="This may be helpful when updating health records",
                max_length=25,
                null=True,
                verbose_name="Where did the patient last seek care",
            ),
        ),
        migrations.AddField(
            model_name="patientcall",
            name="last_attend_clinic_other",
            field=edc_model.models.fields.other_charfield.OtherCharField(
                blank=True,
                max_length=35,
                null=True,
                verbose_name="If other, please specify ...",
            ),
        ),
        migrations.AddField(
            model_name="patientcall",
            name="next_appt_date",
            field=models.DateField(
                blank=True, null=True, verbose_name="When will the patient next attend"
            ),
        ),
        migrations.AlterField(
            model_name="historicalpatientlog",
            name="familiar_name",
            field=django_crypto_fields.fields.encrypted_char_field.EncryptedCharField(
                blank=True,
                help_text=" (Encryption: RSA local)",
                max_length=71,
                validators=[
                    django.core.validators.RegexValidator(
                        message="Ensure name consists of letters only in upper case separated by single spaces",
                        regex="^(([A-Z]+ )*[A-Z]+)?$",
                    )
                ],
                verbose_name="How should we refer to you? (if we speak to you)",
            ),
        ),
        migrations.AlterField(
            model_name="historicalpatientlog",
            name="legal_name",
            field=django_crypto_fields.fields.encrypted_char_field.EncryptedCharField(
                blank=True,
                db_index=True,
                help_text=" (Encryption: RSA local)",
                max_length=71,
                validators=[
                    django.core.validators.RegexValidator(
                        message="Ensure full name consists of letters only in upper case separated by single spaces",
                        regex="^(([A-Z]+ )*[A-Z]+)?$",
                    )
                ],
                verbose_name="Full name",
            ),
        ),
        migrations.AlterField(
            model_name="patientlog",
            name="familiar_name",
            field=django_crypto_fields.fields.encrypted_char_field.EncryptedCharField(
                blank=True,
                help_text=" (Encryption: RSA local)",
                max_length=71,
                validators=[
                    django.core.validators.RegexValidator(
                        message="Ensure name consists of letters only in upper case separated by single spaces",
                        regex="^(([A-Z]+ )*[A-Z]+)?$",
                    )
                ],
                verbose_name="How should we refer to you? (if we speak to you)",
            ),
        ),
        migrations.AlterField(
            model_name="patientlog",
            name="legal_name",
            field=django_crypto_fields.fields.encrypted_char_field.EncryptedCharField(
                blank=True,
                help_text=" (Encryption: RSA local)",
                max_length=71,
                unique=True,
                validators=[
                    django.core.validators.RegexValidator(
                        message="Ensure full name consists of letters only in upper case separated by single spaces",
                        regex="^(([A-Z]+ )*[A-Z]+)?$",
                    )
                ],
                verbose_name="Full name",
            ),
        ),
    ]
