# Generated by Django 5.2 on 2025-04-23 12:46

import django.contrib.postgres.fields
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('base', '0002_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CoverageEligibilityResponseError',
            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)),
                ('expression', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=255), null=True, size=None)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CoverageEligibilityResponseEvent',
            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)),
                ('when_date_time', models.DateTimeField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CoverageEligibilityResponseInsurance',
            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)),
                ('inforce', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CoverageEligibilityResponseInsuranceItem',
            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)),
                ('excluded', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=255, null=True)),
                ('description', models.TextField(null=True)),
                ('authorization_required', models.BooleanField(default=False)),
                ('authorization_url', models.URLField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CoverageEligibilityResponseInsuranceItemBenefit',
            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)),
                ('allowed_string', models.CharField(max_length=255, null=True)),
                ('allowed_unsigned_int', models.PositiveIntegerField(null=True)),
                ('used_string', models.CharField(max_length=255, null=True)),
                ('used_unsigned_int', models.PositiveIntegerField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CoverageEligibilityResponseRequesterReference',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CoverageEligibilityResponse',
            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)),
                ('status', models.CharField(choices=[('active', 'Active'), ('cancelled', 'Cancelled'), ('draft', 'Draft'), ('entered-in-error', 'Entered in Error')], default='active', max_length=255)),
                ('purpose', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(choices=[('auth-requirements', 'Auth Requirements'), ('benefits', 'Benefits'), ('discovery', 'Discovery'), ('validation', 'Validation')], default='auth-requirements', max_length=255), size=None)),
                ('serviced_date', models.DateField(null=True)),
                ('created', models.DateTimeField(null=True)),
                ('outcome', models.CharField(choices=[('queued', 'Queued'), ('complete', 'Complete'), ('error', 'Error'), ('partial', 'Partial')], default='queued', max_length=255)),
                ('disposition', models.TextField(null=True)),
                ('pre_auth_ref', models.CharField(max_length=255, null=True)),
                ('form', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='coverage_eligibility_response_form', to='base.codeableconcept')),
                ('identifier', models.ManyToManyField(blank=True, related_name='coverage_eligibility_response_identifier', to='base.identifier')),
                ('insurer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='coverage_eligibility_response_insurer', to='base.organizationreference')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
