# Generated by Django 4.2.14 on 2025-01-21 15:55

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


class Migration(migrations.Migration):

    dependencies = [
        ("base", "0007_merge_20250121_1502"),
        ("patients", "0006_patientgroupreference_group_and_more"),
        ("molecularsequences", "0001_initial"),
        ("bodystructures", "0001_initial"),
        ("observations", "0004_observation_effective_instant_and_more"),
        ('devices', '0004_alter_devicedevicemetricreference_device_and_more'),
    ]

    operations = [
        migrations.RemoveField(
            model_name="observationmolecularsequencereference",
            name="identifier",
        ),
        migrations.RemoveField(
            model_name="observationspecimenreference",
            name="group",
        ),
        migrations.RemoveField(
            model_name="observationspecimenreference",
            name="identifier",
        ),
        migrations.RemoveField(
            model_name="observationbodystructurereference",
            name="body_structure",
        ),
        migrations.AlterField(
            model_name="observation",
            name="body_structure",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="observation_body_structure",
                to="bodystructures.bodystructurereference",
            ),
        ),
        migrations.AlterField(
            model_name="observation",
            name="device",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="observation_device",
                to="devices.devicedevicemetricreference",
            ),
        ),
        migrations.RemoveField(
            model_name="observation",
            name="note",
        ),
        migrations.AlterField(
            model_name="observation",
            name="specimen",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="observation_specimen",
                to="patients.patientgroupreference",
            ),
        ),
        migrations.AlterField(
            model_name="observation",
            name="value_reference",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="molecularsequences.molecularsequencereference",
            ),
        ),
        migrations.AlterField(
            model_name="observationcomponent",
            name="value_reference",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="molecularsequences.molecularsequencereference",
            ),
        ),
        migrations.AlterField(
            model_name="observationreference",
            name="identifier",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="base.identifier",
            ),
        ),
        migrations.DeleteModel(
            name="ObservationDeviceReference",
        ),
        migrations.DeleteModel(
            name="ObservationMolecularSequenceReference",
        ),
        migrations.DeleteModel(
            name="ObservationSpecimenReference",
        ),
        migrations.AddField(
            model_name="observation",
            name="note",
            field=models.ManyToManyField(
                blank=True, related_name="observation_note", to="base.annotation"
            ),
        ),
    ]
