# 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 = [
        ('base', '0005_initial'),
        ('biologicallyderivedproducts', '0001_initial'),
        ('detectedissues', '0003_initial'),
        ('devices', '0001_initial'),
        ('groups', '0001_initial'),
        ('locations', '0001_initial'),
        ('medications', '0001_initial'),
        ('nutritionproducts', '0001_initial'),
        ('organizations', '0001_initial'),
        ('patients', '0002_initial'),
        ('practitionerroles', '0002_initial'),
        ('practitioners', '0001_initial'),
        ('relatedpersons', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='detectedissueauthorreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_author_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='detectedissueauthorreference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_author_reference_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='detectedissueauthorreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_author_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='detectedissue',
            name='author',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_author', to='detectedissues.detectedissueauthorreference'),
        ),
        migrations.AddField(
            model_name='detectedissuecodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='detected_issue_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='detectedissueevidence',
            name='code',
            field=models.ManyToManyField(blank=True, related_name='detected_issue_evidence_code', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='detectedissueevidence',
            name='detail',
            field=models.ManyToManyField(blank=True, related_name='detected_issue_evidence_detail', to='base.reference'),
        ),
        migrations.AddField(
            model_name='detectedissue',
            name='evidence',
            field=models.ManyToManyField(blank=True, related_name='detected_issue_evidence', to='detectedissues.detectedissueevidence'),
        ),
        migrations.AddField(
            model_name='detectedissuemitigation',
            name='action',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_mitigation_action', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='detectedissuemitigation',
            name='author',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_mitigation_author', to='practitioners.practitionerpractitionerrolereference'),
        ),
        migrations.AddField(
            model_name='detectedissuemitigation',
            name='note',
            field=models.ManyToManyField(blank=True, related_name='detected_issue_mitigation_note', to='base.annotation'),
        ),
        migrations.AddField(
            model_name='detectedissue',
            name='mitigation',
            field=models.ManyToManyField(blank=True, related_name='detected_issue_mitigation', to='detectedissues.detectedissuemitigation'),
        ),
        migrations.AddField(
            model_name='detectedissuereference',
            name='detected_issue',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='detected_issue_reference_detected_issue', to='detectedissues.detectedissue'),
        ),
        migrations.AddField(
            model_name='detectedissuereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='detected_issue_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='detectedissuecodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='detected_issue_codeable_reference_reference', to='detectedissues.detectedissuereference'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='biologically_derived_product',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_biologically_derived_product', to='biologicallyderivedproducts.biologicallyderivedproduct'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_group', to='groups.group'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='location',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_location', to='locations.location'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='medication',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_medication', to='medications.medication'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='nutrition_product',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_nutrition_product', to='nutritionproducts.nutritionproduct'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_organization', to='organizations.organization'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='detectedissuesubjectreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detected_issue_subject_reference_practitioner', to='practitioners.practitioner'),
        ),
    ]
