# Generated by Django 5.2 on 2025-04-10 13:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('base', '0003_initial'),
        ('enrollmentrequests', '0001_initial'),
        ('organizations', '0001_initial'),
        ('practitioners', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='EnrollmentResponseRequestProviderReference',
            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)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='enrollment_response_request_provider_reference_identifier', to='base.identifier')),
                ('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='enrollment_response_request_provider_reference_organization', to='organizations.organization')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='enrollment_response_request_provider_reference_practitioner', to='practitioners.practitioner')),
                ('practitioner_role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='enrollment_response_request_provider_reference_practitioner_role', to='practitioners.practitionerrole')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EnrollmentResponse',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_created=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('status', models.CharField(choices=[('active', 'Active'), ('cancelled', 'Cancelled'), ('draft', 'Draft'), ('entered-in-error', 'Entered in Error')], max_length=50, null=True)),
                ('outcome', models.CharField(choices=[('queued', 'Queued'), ('complete', 'Complete'), ('error', 'Error'), ('partial', 'Partial')], max_length=50, null=True)),
                ('disposition', models.TextField(null=True)),
                ('identifier', models.ManyToManyField(blank=True, related_name='enrollment_response_identifier', to='base.identifier')),
                ('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='enrollment_response_organization', to='base.organizationreference')),
                ('request', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='enrollment_response_request', to='enrollmentrequests.enrollmentrequest')),
                ('request_provider', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='enrollment_response_request_provider', to='enrollmentresponses.enrollmentresponserequestproviderreference')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
