# 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 = [
        ('appointments', '0003_initial'),
        ('base', '0005_initial'),
        ('careteams', '0004_initial'),
        ('communications', '0003_initial'),
        ('devices', '0001_initial'),
        ('documentreferences', '0004_initial'),
        ('groups', '0002_initial'),
        ('healthcareservices', '0001_initial'),
        ('locations', '0001_initial'),
        ('observations', '0002_initial'),
        ('patients', '0002_initial'),
        ('practitioners', '0001_initial'),
        ('servicerequests', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='appointmentbasedonreference',
            name='service_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_based_on_reference_service_request', to='servicerequests.servicerequest'),
        ),
        migrations.AddField(
            model_name='appointment',
            name='based_on',
            field=models.ManyToManyField(blank=True, related_name='appointment_based_on', to='appointments.appointmentbasedonreference'),
        ),
        migrations.AddField(
            model_name='appointmentparticipant',
            name='period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_participant_period', to='base.period'),
        ),
        migrations.AddField(
            model_name='appointmentparticipant',
            name='type',
            field=models.ManyToManyField(blank=True, related_name='appointment_participant_type', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='appointment',
            name='participant',
            field=models.ManyToManyField(blank=True, related_name='appointment_participant', to='appointments.appointmentparticipant'),
        ),
        migrations.AddField(
            model_name='appointmentparticipantactor',
            name='care_team',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_participant_actor_care_team', to='careteams.careteam'),
        ),
        migrations.AddField(
            model_name='appointmentparticipantactor',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_participant_actor_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='appointmentparticipantactor',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_participant_actor_group', to='groups.group'),
        ),
        migrations.AddField(
            model_name='appointmentparticipantactor',
            name='healthcareservice',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_participant_actor_healthcareservice', to='healthcareservices.healthcareservice'),
        ),
        migrations.AddField(
            model_name='appointmentparticipantactor',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_participant_actor_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='appointmentparticipantactor',
            name='location',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_participant_actor_location', to='locations.location'),
        ),
        migrations.AddField(
            model_name='appointmentparticipantactor',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_participant_actor_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='appointmentparticipantactor',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_participant_actor_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='appointmentparticipant',
            name='actor',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_participant_actor', to='appointments.appointmentparticipantactor'),
        ),
        migrations.AddField(
            model_name='appointmentreasoncodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_reason_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='appointment',
            name='reason',
            field=models.ManyToManyField(blank=True, related_name='appointment_reason', to='appointments.appointmentreasoncodeablereference'),
        ),
        migrations.AddField(
            model_name='appointmentreasonreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_reason_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='appointmentreasonreference',
            name='observation',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_reason_observation', to='observations.observation'),
        ),
        migrations.AddField(
            model_name='appointmentreasoncodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_reason_reference', to='appointments.appointmentreasonreference'),
        ),
        migrations.AddField(
            model_name='appointmentreference',
            name='appointment',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_reference_appointment', to='appointments.appointment'),
        ),
        migrations.AddField(
            model_name='appointmentreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='appointment',
            name='originating_appointment',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_originating_appointment', to='appointments.appointmentreference'),
        ),
        migrations.AddField(
            model_name='appointment',
            name='previous_appointment',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='appointment_previous_appointment', to='appointments.appointmentreference'),
        ),
        migrations.AddField(
            model_name='appointment',
            name='replaces',
            field=models.ManyToManyField(blank=True, related_name='appointment_replaces', to='appointments.appointmentreference'),
        ),
        migrations.AddField(
            model_name='documentreferencebinarycommunicationreference',
            name='communication',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_binary_communication_reference_communication', to='communications.communication'),
        ),
        migrations.AddField(
            model_name='documentreferencebinarycommunicationreference',
            name='document_reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_binary_communication_reference_document_reference', to='documentreferences.documentreference'),
        ),
        migrations.AddField(
            model_name='documentreferencebinarycommunicationreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_binary_communication_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='appointment',
            name='patient_instruction',
            field=models.ManyToManyField(blank=True, related_name='appointment_patient_instruction', to='appointments.documentreferencebinarycommunicationreference'),
        ),
        migrations.AddField(
            model_name='monthlytemplate',
            name='day_of_week',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='monthly_template_day_of_week', to='base.coding'),
        ),
        migrations.AddField(
            model_name='monthlytemplate',
            name='nth_week_of_month',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='monthly_template_nth_week_of_month', to='base.coding'),
        ),
        migrations.AddField(
            model_name='recurrencetemplate',
            name='monthly_template',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='appointments.monthlytemplate'),
        ),
        migrations.AddField(
            model_name='recurrencetemplate',
            name='recurrence_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='recurrence_type', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='recurrencetemplate',
            name='time_zone',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='recurrence_time_zone', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='recurrencetemplate',
            name='weekly_template',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='appointments.weeklytemplate'),
        ),
        migrations.AddField(
            model_name='recurrencetemplate',
            name='yearly_template',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='appointments.yearlytemplate'),
        ),
    ]
