# 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 = [
        ('base', '0003_initial'),
        ('bodystructures', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='DocumentReferenceAttesterPartyReference',
            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='DocumentReferenceAuthorReference',
            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='DocumentReferenceBasedOnReference',
            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='DocumentReferenceCodeableReference',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DocumentReferenceContent',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DocumentReferenceContentProfile',
            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)),
                ('value_uri', models.URLField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DocumentReferenceContextReference',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DocumentReferenceReference',
            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='DocumentReferenceRelatesTo',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DocumentReferenceAttester',
            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)),
                ('time', models.DateTimeField(null=True)),
                ('mode', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_attesters_mode', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DocumentReference',
            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)),
                ('version', models.CharField(max_length=255, null=True)),
                ('status', models.CharField(choices=[('current', 'Current'), ('suppressed', 'Suppressed'), ('entered-in-error', 'Entered in error')], max_length=255, null=True)),
                ('doc_status', models.CharField(choices=[('registered', 'Registered'), ('partial', 'Partial'), ('preliminary', 'Preliminary'), ('final', 'Final'), ('amended', 'Amended'), ('corrected', 'Corrected'), ('appended', 'Appended'), ('cancelled', 'Cancelled'), ('entered-in-error', 'Entered in error'), ('deprecated', 'Deprecated'), ('unknown', 'Unknown')], max_length=255, null=True)),
                ('date', models.DateTimeField(null=True)),
                ('description', models.TextField(null=True)),
                ('body_site', models.ManyToManyField(blank=True, related_name='document_reference_body_sites', to='bodystructures.bodystructurecodeablereference')),
                ('category', models.ManyToManyField(blank=True, related_name='document_reference_categories', to='base.codeableconcept')),
                ('custodian', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_custodian', to='base.organizationreference')),
                ('event', models.ManyToManyField(blank=True, related_name='document_reference_events', to='base.codeablereference')),
                ('facility_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_facility_type', to='base.codeableconcept')),
                ('identifier', models.ManyToManyField(blank=True, related_name='document_reference_identifier', to='base.identifier')),
                ('modality', models.ManyToManyField(blank=True, related_name='document_reference_modalities', to='base.codeableconcept')),
                ('period', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_source_patient_infos', to='base.period')),
                ('practice_setting', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_practice_setting', to='base.codeableconcept')),
                ('related', models.ManyToManyField(blank=True, related_name='document_reference_related', to='base.reference')),
                ('security_label', models.ManyToManyField(blank=True, related_name='document_reference_security_labels', to='base.codeableconcept')),
                ('subject', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_subject', to='base.reference')),
                ('type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_type', to='base.codeableconcept')),
                ('attester', models.ManyToManyField(blank=True, related_name='document_reference_attesters', to='documentreferences.documentreferenceattester')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
