# Generated by Django 4.2.14 on 2025-01-26 13:42

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('locations', '0003_alter_locationorganizationreference_location_and_more'),
        ('base', '0007_merge_20250121_1502'),
        ('encounters', '0008_alter_encounterlocation_location'),
    ]

    operations = [
        migrations.CreateModel(
            name='Procedure',
            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)),
                ('body_site', models.ManyToManyField(blank=True, related_name='procedure_body_site', to='base.codeableconcept')),
                ('category', models.ManyToManyField(blank=True, related_name='procedure_category', to='base.codeableconcept')),
                ('code', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='procedure_code', to='base.codeableconcept')),
                ('encounter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='procedure_encounter', to='encounters.encounterreference')),
                ('identifier', models.ManyToManyField(blank=True, related_name='procedure_identifier', to='base.identifier')),
                ('location', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='procedure_location', to='locations.locationreference')),
                ('status', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='procedure_status', to='base.codeableconcept')),
                ('status_reason', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='procedure_status_reason', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProcedureReference',
            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.DO_NOTHING, related_name='procedure_reference_identifier', to='base.identifier')),
                ('procedure', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='procedure_reference', to='procedures.procedure')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
