# Generated by Django 4.1.2 on 2022-11-29 05:12

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


class Migration(migrations.Migration):
    dependencies = [
        ("intecomm_lists", "0002_delete_reasonsfortesting_and_more"),
        ("intecomm_prn", "0001_initial"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="endofstudy",
            name="delivery_date",
        ),
        migrations.RemoveField(
            model_name="endofstudy",
            name="pregnancy_date",
        ),
        migrations.RemoveField(
            model_name="endofstudy",
            name="toxicity_withdrawal_reason",
        ),
        migrations.RemoveField(
            model_name="endofstudy",
            name="toxicity_withdrawal_reason_other",
        ),
        migrations.RemoveField(
            model_name="endofstudy",
            name="transferred_consent",
        ),
        migrations.RemoveField(
            model_name="historicalendofstudy",
            name="delivery_date",
        ),
        migrations.RemoveField(
            model_name="historicalendofstudy",
            name="pregnancy_date",
        ),
        migrations.RemoveField(
            model_name="historicalendofstudy",
            name="toxicity_withdrawal_reason",
        ),
        migrations.RemoveField(
            model_name="historicalendofstudy",
            name="toxicity_withdrawal_reason_other",
        ),
        migrations.RemoveField(
            model_name="historicalendofstudy",
            name="transferred_consent",
        ),
        migrations.RemoveField(
            model_name="historicallosstofollowup",
            name="number_consecutive_missed_visits",
        ),
        migrations.RemoveField(
            model_name="losstofollowup",
            name="number_consecutive_missed_visits",
        ),
        migrations.AlterField(
            model_name="endofstudy",
            name="offstudy_reason",
            field=models.ForeignKey(
                limit_choices_to={
                    "name__in": [
                        "completed_followup",
                        "consent_withdrawal",
                        "clinical_withdrawal",
                        "LTFU",
                        "transferred",
                        "dead",
                        "OTHER",
                    ]
                },
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="intecomm_lists.offstudyreasons",
                verbose_name="Reason patient was terminated from the study",
            ),
        ),
        migrations.AlterField(
            model_name="historicalendofstudy",
            name="offstudy_reason",
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                limit_choices_to={
                    "name__in": [
                        "completed_followup",
                        "consent_withdrawal",
                        "clinical_withdrawal",
                        "LTFU",
                        "transferred",
                        "dead",
                        "OTHER",
                    ]
                },
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to="intecomm_lists.offstudyreasons",
                verbose_name="Reason patient was terminated from the study",
            ),
        ),
    ]
