# 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', '0004_initial'),
        ('endpoints', '0001_initial'),
        ('healthcareservices', '0001_initial'),
        ('locations', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='PractitionerRoleCode',
            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)),
                ('display', models.CharField(max_length=255)),
                ('definition', models.TextField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PractitionerRoleReference',
            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='PractitionerRole',
            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)),
                ('active', models.BooleanField(default=True)),
                ('display', models.TextField(null=True)),
                ('availability', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='practitioner_role_availability', to='base.availability')),
                ('characteristic', models.ManyToManyField(blank=True, related_name='practitioner_role_characteristic', to='base.codeableconcept')),
                ('code', models.ManyToManyField(blank=True, related_name='practitioner_role_code', to='base.codeableconcept')),
                ('communication', models.ManyToManyField(blank=True, related_name='practitioner_role_communication', to='base.codeableconcept')),
                ('contact', models.ManyToManyField(blank=True, related_name='practitioner_role_contact', to='base.extendedcontactdetail')),
                ('endpoint', models.ManyToManyField(blank=True, related_name='practitioner_role_endpoint', to='endpoints.endpointreference')),
                ('healthcare_service', models.ManyToManyField(related_name='practitioner_role_healthcareservice', to='healthcareservices.healthcareservicereference')),
                ('identifier', models.ManyToManyField(blank=True, related_name='practitioner_role_identifier', to='base.identifier')),
                ('location', models.ManyToManyField(blank=True, related_name='practitioner_role_location', to='locations.locationreference')),
                ('network', models.ManyToManyField(blank=True, related_name='practitioner_role_network', to='base.organizationreference')),
                ('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='practitioner_role_organization', to='base.organizationreference')),
                ('period', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='base.period')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
