# Generated by Django 5.1.2 on 2025-01-15 23:45

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


class Migration(migrations.Migration):

    dependencies = [
        ("meta_lists", "0018_missedreferralreasons"),
        ("meta_prn", "0061_auto_20250115_2025"),
    ]

    operations = [
        migrations.AlterField(
            model_name="endofstudy",
            name="offstudy_reason",
            field=models.ForeignKey(
                limit_choices_to={
                    "name__in": [
                        "completed_followup",
                        "completed_followup_48",
                        "diabetes",
                        "delivery",
                        "pregnancy",
                        "clinical_withdrawal",
                        "dead",
                        "LTFU",
                        "toxicity",
                        "transferred",
                        "withdrawal",
                        "late_exclusion",
                        "OTHER",
                    ]
                },
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="meta_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",
                        "completed_followup_48",
                        "diabetes",
                        "delivery",
                        "pregnancy",
                        "clinical_withdrawal",
                        "dead",
                        "LTFU",
                        "toxicity",
                        "transferred",
                        "withdrawal",
                        "late_exclusion",
                        "OTHER",
                    ]
                },
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to="meta_lists.offstudyreasons",
                verbose_name="Reason patient was terminated from the study",
            ),
        ),
    ]
