# Generated by Django 4.2.14 on 2025-01-27 13:40

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


class Migration(migrations.Migration):

    dependencies = [
        ('organizations', '0001_initial'),
        ('base', '0007_merge_20250121_1502'),
    ]

    operations = [
        migrations.AlterField(
            model_name='extendedcontactdetail',
            name='address',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='extended_contact_detail_address', to='base.address'),
        ),
        migrations.AlterField(
            model_name='extendedcontactdetail',
            name='name',
            field=models.ManyToManyField(blank=True, related_name='extended_contact_detail_name', to='base.humanname'),
        ),
        migrations.AlterField(
            model_name='extendedcontactdetail',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='extended_contact_detail_organization', to='organizations.organization'),
        ),
        migrations.AlterField(
            model_name='extendedcontactdetail',
            name='period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='extended_contact_detail_period', to='base.period'),
        ),
        migrations.AlterField(
            model_name='extendedcontactdetail',
            name='purpose',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='extended_contact_detail_purpose', to='base.codeableconcept'),
        ),
        migrations.AlterField(
            model_name='extendedcontactdetail',
            name='telecom',
            field=models.ManyToManyField(blank=True, related_name='extended_contact_detail_telecom', to='base.contactpoint'),
        ),
        migrations.CreateModel(
            name='UsageContext',
            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)),
                ('code', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='usage_context_code', to='base.coding')),
                ('value_codeable_concept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='usage_context_value', to='base.codeableconcept')),
                ('value_quantity', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='usage_context_value_quantity', to='base.quantity')),
                ('value_range', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='usage_context_value_range', to='base.range')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='RelatedArtifact',
            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=[('documentation', 'documentation'), ('justification', 'justification'), ('citation', 'citation'), ('predecessor', 'predecessor'), ('successor', 'successor'), ('derived-from', 'derived-from'), ('depends-on', 'depends-on'), ('composed-of', 'composed-of'), ('part-of', 'part-of'), ('replaces', 'replaces'), ('amends', 'amends'), ('appends', 'appends'), ('transforms', 'transforms'), ('amended-with', 'amended-with'), ('appended-with', 'appended-with'), ('cites', 'cites'), ('cited-by', 'cited-by'), ('comments-on', 'comments-on'), ('comments-in', 'comments-in'), ('contains', 'contains'), ('contained-in', 'contained-in'), ('corrects', 'corrects'), ('correction-in', 'correction-in'), ('replaced-with', 'replaced-with'), ('retracts', 'retracts'), ('retracted-by', 'retracted-by'), ('signs', 'signs'), ('similar-to', 'similar-to'), ('supports', 'supports'), ('supported-with', 'supported-with'), ('transformed-into', 'transformed-into'), ('transformed-with', 'transformed-with'), ('documents', 'documents'), ('specification-of', 'specification-of'), ('created-with', 'created-with'), ('cite-as', 'cite-as')], max_length=255, null=True)),
                ('label', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('citation', models.TextField(null=True)),
                ('publication_status', models.CharField(choices=[('draft', 'draft'), ('active', 'active'), ('retired', 'retired'), ('unknown', 'unknown')], max_length=255, null=True)),
                ('publication_date', models.DateTimeField(null=True)),
                ('classifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='related_artifact_classifier', to='base.codeableconcept')),
                ('document', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='related_artifact_document', to='base.attachment')),
                ('resource_reference', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='related_artifact_resource', to='base.reference')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProductShelfLife',
            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)),
                ('period_string', models.CharField(max_length=255, null=True)),
                ('period_duration', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='product_shelf_life_period_duration', to='base.quantity')),
                ('special_precautions_for_storage', models.ManyToManyField(blank=True, related_name='product_shelf_life_special_precautions_for_storage', to='base.codeableconcept')),
                ('type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='product_shelf_life_type', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ContactDetail',
            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)),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('telecom', models.ManyToManyField(blank=True, related_name='contact_detail_telecom', to='base.contactpoint')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
