# 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 = [
        ('accounts', '0003_initial'),
        ('base', '0004_initial'),
        ('claimresponses', '0003_initial'),
        ('encounters', '0003_initial'),
        ('locations', '0001_initial'),
        ('organizations', '0001_initial'),
        ('patients', '0001_initial'),
        ('relatedpersons', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='PaymentReconciliationAllocationTargetReference',
            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='PaymentReconciliationPaymentIssuerReference',
            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='PaymentReconciliationProcessNote',
            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)),
                ('type', models.CharField(choices=[('display', 'Display'), ('print', 'Print'), ('printoper', 'Print Oper')], max_length=255, null=True)),
                ('text', models.CharField(max_length=255, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PaymentReconciliationReference',
            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='OrganizationPractitionerPractitionerRoleReference',
            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='organization_practitioner_practitioner_role_reference_identifier', to='base.identifier')),
                ('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='organization_practitioner_practitioner_role_reference_organization', to='organizations.organization')),
                ('patient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='organization_practitioner_practitioner_role_reference_patient', to='patients.patientreference')),
                ('related_person', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='organization_practitioner_practitioner_role_reference_related_person', to='relatedpersons.relatedperson')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PaymentReconciliation',
            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')], max_length=255, null=True)),
                ('created', models.DateTimeField(null=True)),
                ('outcome', models.CharField(choices=[('queued', 'Queued'), ('complete', 'Complete'), ('error', 'Error'), ('partial', 'Partial')], max_length=255, null=True)),
                ('disposition', models.CharField(max_length=255, null=True)),
                ('date', models.DateField(null=True)),
                ('card_brand', models.CharField(max_length=255, null=True)),
                ('account_number', models.CharField(max_length=255, null=True)),
                ('expiration_date', models.DateField(null=True)),
                ('processor', models.CharField(max_length=255, null=True)),
                ('reference_number', models.CharField(max_length=255, null=True)),
                ('authorization', models.DateField(null=True)),
                ('amount', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_amount', to='base.money')),
                ('enterer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_enterer', to='paymentreconciliations.organizationpractitionerpractitionerrolereference')),
                ('form_code', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_form_code', to='base.codeableconcept')),
                ('identifier', models.ManyToManyField(blank=True, related_name='payment_reconciliation_identifier', to='base.identifier')),
                ('issuer_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_issuer_type', to='base.codeableconcept')),
                ('kind', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_kind', to='base.codeableconcept')),
                ('location', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_location', to='locations.locationreference')),
                ('method', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_method', to='base.codeableconcept')),
                ('payment_identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_payment_identifier', to='base.identifier')),
                ('period', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_period', to='base.period')),
                ('requestor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_requestor', to='paymentreconciliations.organizationpractitionerpractitionerrolereference')),
                ('returned_amount', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_returned_amount', to='base.money')),
                ('tendered_amount', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_tendered_amount', to='base.money')),
                ('type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_type', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PaymentReconciliationAllocation',
            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)),
                ('target_item_string', models.CharField(max_length=255, null=True)),
                ('target_item_positive_int', models.PositiveIntegerField(null=True)),
                ('date', models.DateField(null=True)),
                ('account', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_allocation_account', to='accounts.accountreference')),
                ('amount', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_allocation_amount', to='base.money')),
                ('encounter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_allocation_encounter', to='encounters.encounterreference')),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_allocation_identifier', to='base.identifier')),
                ('payee', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_allocation_payee', to='paymentreconciliations.organizationpractitionerpractitionerrolereference')),
                ('predecessor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_allocation_predecessor', to='base.identifier')),
                ('response', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_reconciliation_allocation_response', to='claimresponses.claimresponse')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
