# 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', '0008_initial'),
        ('allergyintolerances', '0005_initial'),
        ('base', '0005_initial'),
        ('biologicallyderivedproducts', '0001_initial'),
        ('careteams', '0004_initial'),
        ('conditions', '0004_initial'),
        ('devices', '0001_initial'),
        ('documentreferences', '0004_initial'),
        ('familymemberhistories', '0003_initial'),
        ('groups', '0002_initial'),
        ('immunizations', '0002_initial'),
        ('medicationadministrations', '0003_initial'),
        ('medicationrequests', '0002_initial'),
        ('medications', '0001_initial'),
        ('medicationstatements', '0003_initial'),
        ('observations', '0002_initial'),
        ('organizations', '0001_initial'),
        ('patients', '0002_initial'),
        ('practitionerroles', '0002_initial'),
        ('practitioners', '0001_initial'),
        ('procedures', '0001_initial'),
        ('relatedpersons', '0001_initial'),
        ('substances', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='adverseeventcontributingfactorreference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_contributing_factor_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='adverseeventcontributingfactorcodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_contributing_factor_codeable_reference_reference', to='adverseevents.adverseeventcontributingfactorreference'),
        ),
        migrations.AddField(
            model_name='adverseeventmitigatingactioncodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_mitigating_action_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='mitigating_action',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_mitigating_action', to='adverseevents.adverseeventmitigatingactioncodeablereference'),
        ),
        migrations.AddField(
            model_name='adverseeventmitigatingactionreference',
            name='document_reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_mitigating_action_reference_document_reference', to='documentreferences.documentreference'),
        ),
        migrations.AddField(
            model_name='adverseeventmitigatingactionreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_mitigating_action_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='adverseeventmitigatingactionreference',
            name='medication_administration',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_mitigating_action_reference_medication_administration', to='medicationadministrations.medicationadministration'),
        ),
        migrations.AddField(
            model_name='adverseeventmitigatingactionreference',
            name='medication_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_mitigating_action_reference_medication_request', to='medicationrequests.medicationrequest'),
        ),
        migrations.AddField(
            model_name='adverseeventmitigatingactionreference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_mitigating_action_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='adverseeventmitigatingactioncodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_mitigating_action_codeable_reference_reference', to='adverseevents.adverseeventmitigatingactionreference'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipant',
            name='function',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='adverse_event_participant_function', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='participant',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_participant', to='adverseevents.adverseeventparticipant'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipantactorreference',
            name='care_team',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_participant_actor_reference_care_team', to='careteams.careteam'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipantactorreference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_participant_actor_reference_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipantactorreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_participant_actor_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipantactorreference',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_participant_actor_reference_organization', to='organizations.organization'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipantactorreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_participant_actor_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipantactorreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_participant_actor_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipantactorreference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_participant_actor_reference_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipantactorreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_participant_actor_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='adverseeventparticipant',
            name='actor',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='adverse_event_participant_actor', to='adverseevents.adverseeventparticipantactorreference'),
        ),
        migrations.AddField(
            model_name='adverseeventpreventiveactioncodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_preventive_action_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='preventive_action',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_preventive_action', to='adverseevents.adverseeventpreventiveactioncodeablereference'),
        ),
        migrations.AddField(
            model_name='adverseeventpreventiveactionreference',
            name='document_reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_preventive_action_reference_document_reference', to='documentreferences.documentreference'),
        ),
        migrations.AddField(
            model_name='adverseeventpreventiveactionreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_preventive_action_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='adverseeventpreventiveactionreference',
            name='immunization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_preventive_action_reference_immunization', to='immunizations.immunization'),
        ),
        migrations.AddField(
            model_name='adverseeventpreventiveactionreference',
            name='medication_administration',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_preventive_action_reference_medication_administration', to='medicationadministrations.medicationadministration'),
        ),
        migrations.AddField(
            model_name='adverseeventpreventiveactionreference',
            name='medication_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_preventive_action_reference_medication_request', to='medicationrequests.medicationrequest'),
        ),
        migrations.AddField(
            model_name='adverseeventpreventiveactionreference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_preventive_action_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='adverseeventpreventiveactioncodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_preventive_action_codeable_reference_reference', to='adverseevents.adverseeventpreventiveactionreference'),
        ),
        migrations.AddField(
            model_name='adverseeventrecorderreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_recorder_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='adverseeventrecorderreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_recorder_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='adverseeventrecorderreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_recorder_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='adverseeventrecorderreference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_recorder_reference_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='adverseeventrecorderreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_recorder_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='recorder',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='adverse_event_recorder', to='adverseevents.adverseeventrecorderreference'),
        ),
        migrations.AddField(
            model_name='adverseeventsubjectreference',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_subject_reference_group', to='groups.group'),
        ),
        migrations.AddField(
            model_name='adverseeventsubjectreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_subject_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='adverseeventsubjectreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_subject_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='adverseeventsubjectreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_subject_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='adverseeventsubjectreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_subject_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='subject',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='adverse_event_subject', to='adverseevents.adverseeventsubjectreference'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginfocodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='supporting_info',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_supporting_info', to='adverseevents.adverseeventsupportinginfocodeablereference'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='allergy_intolerance',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_allergy_intolerance', to='allergyintolerances.allergyintolerance'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='condition',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_condition', to='conditions.condition'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='document_reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_document_reference', to='documentreferences.documentreference'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='family_member_history',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_family_member_history', to='familymemberhistories.familymemberhistory'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='immunization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_immunization', to='immunizations.immunization'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='medication_administration',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_medication_administration', to='medicationadministrations.medicationadministration'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='medication_statement',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_medication_statement', to='medicationstatements.medicationstatement'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='observation',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_observation', to='observations.observation'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginforeference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='adverseeventsupportinginfocodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_supporting_info_codeable_reference_reference', to='adverseevents.adverseeventsupportinginforeference'),
        ),
        migrations.AddField(
            model_name='adverseevent',
            name='suspect_entity',
            field=models.ManyToManyField(blank=True, related_name='adverse_event_suspect_entity', to='adverseevents.adverseeventsuspectentity'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityauthorreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_author_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityauthorreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_author_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityauthorreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_author_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityauthorreference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_author_reference_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityauthorreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_author_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentitycausality',
            name='assessment_method',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_causality_assessment', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentitycausality',
            name='author',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_causality_author', to='adverseevents.adverseeventsuspectentityauthorreference'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentitycausality',
            name='entity_relatedness',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_causality_entity_relatedness', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentity',
            name='causality',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='adverse_event_suspect_entity_causality', to='adverseevents.adverseeventsuspectentitycausality'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancecodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentity',
            name='instance',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='adverse_event_suspect_entity_instance', to='adverseevents.adverseeventsuspectentityinstancecodeablereference'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancereference',
            name='biollogically_derived_product',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_reference_biologically_derived_product', to='biologicallyderivedproducts.biologicallyderivedproduct'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancereference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_reference_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancereference',
            name='immunization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_reference_immunization', to='immunizations.immunization'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancereference',
            name='medication',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_reference_medication', to='medications.medication'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancereference',
            name='medication_administration',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_reference_medication_administration', to='medicationadministrations.medicationadministration'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancereference',
            name='medication_statement',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_reference_medication_statement', to='medicationstatements.medicationstatement'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancereference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancereference',
            name='substance',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_reference_substance', to='substances.substance'),
        ),
        migrations.AddField(
            model_name='adverseeventsuspectentityinstancecodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adverse_event_suspect_entity_instance_codeable_reference_reference', to='adverseevents.adverseeventsuspectentityinstancereference'),
        ),
    ]
