# 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'),
        ('conditions', '0004_initial'),
        ('devices', '0001_initial'),
        ('diagnosticreports', '0003_initial'),
        ('encounters', '0003_initial'),
        ('episodeofcares', '0002_initial'),
        ('groups', '0002_initial'),
        ('healthcareservices', '0001_initial'),
        ('immunizationrecommendations', '0002_initial'),
        ('locations', '0001_initial'),
        ('observations', '0002_initial'),
        ('patients', '0002_initial'),
        ('practitionerroles', '0002_initial'),
        ('practitioners', '0001_initial'),
        ('procedures', '0001_initial'),
        ('relatedpersons', '0001_initial'),
        ('servicerequests', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='encounterbasedonreference',
            name='service_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_based_on_reference_service_request', to='servicerequests.servicerequest'),
        ),
        migrations.AddField(
            model_name='encounter',
            name='based_on',
            field=models.ManyToManyField(blank=True, related_name='encounter_based_on', to='encounters.encounterbasedonreference'),
        ),
        migrations.AddField(
            model_name='encounterdiagnosis',
            name='condition',
            field=models.ManyToManyField(blank=True, related_name='encounter_diagnosis_condition', to='conditions.conditioncodeablereference'),
        ),
        migrations.AddField(
            model_name='encounterdiagnosis',
            name='use',
            field=models.ManyToManyField(blank=True, related_name='encounter_diagnosis_use', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='encounter',
            name='diagnosis',
            field=models.ManyToManyField(blank=True, related_name='encounter_diagnosis', to='encounters.encounterdiagnosis'),
        ),
        migrations.AddField(
            model_name='encounterepisodeofcarereference',
            name='encounter',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_episode_of_care_reference_encounter', to='encounters.encounter'),
        ),
        migrations.AddField(
            model_name='encounterepisodeofcarereference',
            name='episode_of_care',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_episode_of_care_reference_episode_of_care', to='episodeofcares.episodeofcare'),
        ),
        migrations.AddField(
            model_name='encounterepisodeofcarereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_episode_of_care_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='encounterlocation',
            name='form',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_location_form', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='encounterlocation',
            name='location',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_location_location', to='locations.locationreference'),
        ),
        migrations.AddField(
            model_name='encounterlocation',
            name='period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_location_period', to='base.period'),
        ),
        migrations.AddField(
            model_name='encounter',
            name='location',
            field=models.ManyToManyField(blank=True, related_name='encounter_location', to='encounters.encounterlocation'),
        ),
        migrations.AddField(
            model_name='encounterparticipant',
            name='period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_participant_period', to='base.period'),
        ),
        migrations.AddField(
            model_name='encounterparticipant',
            name='type',
            field=models.ManyToManyField(blank=True, related_name='encounter_participant_type', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='encounter',
            name='participant',
            field=models.ManyToManyField(blank=True, related_name='encounter_participant', to='encounters.encounterparticipant'),
        ),
        migrations.AddField(
            model_name='encounterparticipantactorreference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_participant_actor_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='encounterparticipantactorreference',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_participant_actor_group', to='groups.group'),
        ),
        migrations.AddField(
            model_name='encounterparticipantactorreference',
            name='healthcareservice',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_participant_actor_healthcareservice', to='healthcareservices.healthcareservice'),
        ),
        migrations.AddField(
            model_name='encounterparticipantactorreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_participant_actor_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='encounterparticipantactorreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_participant_actor_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='encounterparticipantactorreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_participant_actor_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='encounterparticipantactorreference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_participant_actor_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='encounterparticipantactorreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_participant_actor_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='encounterparticipant',
            name='actor',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='participant_actor', to='encounters.encounterparticipantactorreference'),
        ),
        migrations.AddField(
            model_name='encounterreason',
            name='use',
            field=models.ManyToManyField(blank=True, related_name='encounter_reason_use', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='encounter',
            name='reason',
            field=models.ManyToManyField(blank=True, related_name='encounter_reason', to='encounters.encounterreason'),
        ),
        migrations.AddField(
            model_name='encounterreasonvaluecodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_reason_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='encounterreason',
            name='value',
            field=models.ManyToManyField(blank=True, related_name='encounter_reason_value', to='encounters.encounterreasonvaluecodeablereference'),
        ),
        migrations.AddField(
            model_name='encounterreasonvaluereference',
            name='condition',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_reason_value_reference_condition', to='conditions.condition'),
        ),
        migrations.AddField(
            model_name='encounterreasonvaluereference',
            name='diagnostic_report',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_reason_value_reference_diagnostic_report', to='diagnosticreports.diagnosticreport'),
        ),
        migrations.AddField(
            model_name='encounterreasonvaluereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_reason_value_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='encounterreasonvaluereference',
            name='immunization_recommendation',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_reason_value_reference_immunization_recommendation', to='immunizationrecommendations.immunizationrecommendation'),
        ),
        migrations.AddField(
            model_name='encounterreasonvaluereference',
            name='observation',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_reason_value_reference_observation', to='observations.observation'),
        ),
        migrations.AddField(
            model_name='encounterreasonvaluereference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_reason_value_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='encounterreasonvaluecodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='encounter_reason_codeable_reference_reference', to='encounters.encounterreasonvaluereference'),
        ),
        migrations.AddField(
            model_name='encounterreference',
            name='encounter',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='encounter_reference_encounter', to='encounters.encounter'),
        ),
        migrations.AddField(
            model_name='encounterreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='encounter_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='encounter',
            name='part_of',
            field=models.ManyToManyField(blank=True, related_name='encounter_part_of', to='encounters.encounterreference'),
        ),
    ]
