# Generated by Django 4.2.14 on 2025-01-20 11:51

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


class Migration(migrations.Migration):

    dependencies = [
        ("conditions", "0002_alter_conditioncodeablereference_concept_and_more"),
        ("devices", "0001_initial"),
        ("encounters", "0008_alter_encounterlocation_location"),
        ("communications", "0002_communicationsenderreference_and_more"),
        ("diagnosticreports", "0003_communicationreference_and_more"),
    ]

    operations = [
        migrations.RenameModel(
            old_name="Media",
            new_name="DiagnosticReportMedia",
        ),
        migrations.RemoveField(
            model_name="encounterreference",
            name="encounter",
        ),
        migrations.RemoveField(
            model_name="encounterreference",
            name="identifier",
        ),
        migrations.AddField(
            model_name="conclusioncodereference",
            name="condition",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="conclusion_code_condition",
                to="conditions.condition",
            ),
        ),
        migrations.AddField(
            model_name="diagnosticreportsubjectreference",
            name="device",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to="devices.device",
            ),
        ),
        migrations.AlterField(
            model_name="diagnosticreport",
            name="communication",
            field=models.ManyToManyField(
                blank=True,
                related_name="diagnostic_report_communication",
                to="communications.communicationreference",
            ),
        ),
        migrations.AlterField(
            model_name="diagnosticreport",
            name="encounter",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="diagnostic_encounter",
                to="encounters.encounterreference",
            ),
        ),
        migrations.DeleteModel(
            name="CommunicationReference",
        ),
        migrations.DeleteModel(
            name="EncounterReference",
        ),
    ]
