# Generated by Django 5.2 on 2025-04-23 12:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('adverseevents', '0002_initial'),
        ('allergyintolerances', '0002_initial'),
        ('base', '0003_initial'),
        ('conditions', '0001_initial'),
        ('devices', '0001_initial'),
        ('deviceusages', '0001_initial'),
        ('documentreferences', '0001_initial'),
        ('encounters', '0001_initial'),
        ('locations', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='adverseevent',
            name='encounter',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='adverse_event_encounter', to='encounters.encounterreference'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='identifier',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='location',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='adverse_event_location', to='locations.locationreference'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='note',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_note', to='base.annotation'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='outcome',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_outcome', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='resulting_effect',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_resulting_effect', to='conditions.conditionobservationcodeablereference'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='seriousness',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='adverse_event_seriousness', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseeventcontributingfactorcodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_contributing_factor_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='contributing_factor',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_contributing_factor', to='adverseevents.adverseeventcontributingfactorcodeablereference'),
        ),
        migrations.AddField(
            model_name='adverseeventcontributingfactorreference',
            name='allergy_intolerance',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_contributing_factor_reference_allergy_intolerance', to='allergyintolerances.allergyintolerance'),
        ),
        migrations.AddField(
            model_name='adverseeventcontributingfactorreference',
            name='condition',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_contributing_factor_reference_condition', to='conditions.condition'),
        ),
        migrations.AddField(
            model_name='adverseeventcontributingfactorreference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_contributing_factor_reference_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='adverseeventcontributingfactorreference',
            name='device_usage',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_contributing_factor_reference_device_usage', to='deviceusages.deviceusage'),
        ),
        migrations.AddField(
            model_name='adverseeventcontributingfactorreference',
            name='document_reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_contributing_factor_reference_document_reference', to='documentreferences.documentreference'),
        ),
    ]
