# Generated by Django 4.2.14 on 2025-02-04 12:37

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('practitioners', '0010_practitionerrole_endpoint'),
        ('appointments', '0008_appointment_based_on_appointment_reason_and_more'),
        ('groups', '0004_group_code_group_combination_method_and_more'),
        ('base', '0010_expression_relativetime'),
        ('patients', '0007_patientorganizationreference'),
        ('locations', '0006_merge_20250129_1542'),
        ('devices', '0007_alter_device_status_and_more'),
        ('relatedpersons', '0002_relatedperson_communication_relatedperson_gender'),
        ('healthcareservices', '0006_remove_healthcareservice_endpoint'),
    ]

    operations = [
        migrations.CreateModel(
            name='AppointmentResponseActorReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('device', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor_reference_device', to='devices.device')),
                ('group', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor_reference_group', to='groups.group')),
                ('healthcare_service', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor_reference_healthcare_service', to='healthcareservices.healthcareservice')),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor_reference_identifier', to='base.identifier')),
                ('location', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor_reference_location', to='locations.location')),
                ('patient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor_reference_patient', to='patients.patient')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor_reference_practitioner', to='practitioners.practitioner')),
                ('practitioner_role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor_reference_practitioner_role', to='practitioners.practitionerrole')),
                ('related_person', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor_reference_related_person', to='relatedpersons.relatedperson')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AppointmentResponse',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('proposed_new_time', models.BooleanField(null=True)),
                ('start', models.DateTimeField(null=True)),
                ('end', models.DateTimeField(null=True)),
                ('participant_status', models.CharField(choices=[('accepted', 'Accepted'), ('declined', 'Declined'), ('tentative', 'Tentative'), ('needs-action', 'Needs Action'), ('entered-in-error', 'Entered in Error')], max_length=255, null=True)),
                ('comment', models.TextField(null=True)),
                ('recurring', models.BooleanField(null=True)),
                ('occurrence_date', models.DateTimeField(null=True)),
                ('recurrence_id', models.IntegerField(null=True)),
                ('actor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_actor', to='appointmentresponses.appointmentresponseactorreference')),
                ('appointment', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_response_appointment', to='appointments.appointmentreference')),
                ('identifier', models.ManyToManyField(blank=True, related_name='appointment_response_identifier', to='base.identifier')),
                ('participant_type', models.ManyToManyField(blank=True, related_name='appointment_response_participant_type', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
