# 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'),
        ('organizations', '0001_initial'),
        ('practitionerroles', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Practitioner',
            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)),
                ('gender', models.CharField(blank=True, choices=[('male', 'male'), ('female', 'female'), ('other', 'other'), ('unknown', 'unknown')], max_length=20, null=True)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('deceased_boolean', models.BooleanField(default=True)),
                ('deceased_date_time', models.DateTimeField(blank=True, null=True)),
                ('address', models.ManyToManyField(blank=True, related_name='practitioner_address', to='base.address')),
                ('communication', models.ManyToManyField(blank=True, related_name='practitioner_communication', to='base.communication')),
                ('identifier', models.ManyToManyField(blank=True, related_name='practitioner_identifier', to='base.identifier')),
                ('name', models.ManyToManyField(blank=True, related_name='practitioner_name', to='base.humanname')),
                ('photo', models.ManyToManyField(blank=True, related_name='practitioner_photo', to='base.attachment')),
                ('qualification', models.ManyToManyField(blank=True, related_name='practitioner_qualification', to='base.qualification')),
                ('telecom', models.ManyToManyField(blank=True, related_name='practitioner_telecom', to='base.contactpoint')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PractitionerOrganizationPractitionerRoleReference',
            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='practitioner_organization_practitioner_role_reference_identifier', to='base.identifier')),
                ('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='practitioner_organization_practitioner_role_reference_organization', to='organizations.organization')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='practitioner_organization_practitioner_role_reference_practitioner', to='practitioners.practitioner')),
                ('practitioner_role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='practitioner_organization_practitioner_role_reference_practitioner_role', to='practitionerroles.practitionerrole')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PractitionerPractitionerRoleReference',
            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='practitioner_practitioner_role_reference_identifier', to='base.identifier')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='practitioner_practitioner_role_reference_practitioner', to='practitioners.practitioner')),
                ('practitioner_role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='practitioner_practitioner_role_reference_practitioner_role', to='practitionerroles.practitionerrole')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PractitionerReference',
            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='practitioner_reference_identifier', to='base.identifier')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='practitioner_reference_practitioner', to='practitioners.practitioner')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
