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

    operations = [
        migrations.CreateModel(
            name='ClinicalSpecialty',
            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.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ServiceCategory',
            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.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ServiceType',
            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, null=True)),
                ('description', models.TextField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='HealthcareServiceEligibility',
            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)),
                ('comment', models.TextField(null=True)),
                ('code', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='healthcareserviceeligibility_code', to='base.codeableconcept')),
                ('period', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='base.period')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HealthcareService',
            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)),
                ('name', models.CharField(max_length=255)),
                ('comment', models.TextField(null=True)),
                ('extra_details', models.TextField(null=True)),
                ('referral_required', models.BooleanField(default=False)),
                ('appointment_required', models.BooleanField(default=False)),
                ('availability', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='healthcareservice_availability', to='base.availability')),
                ('category', models.ManyToManyField(blank=True, related_name='healthcareservice_category', to='base.codeableconcept')),
                ('characteristic', models.ManyToManyField(blank=True, related_name='healthcareservice_characteristics', to='base.codeableconcept')),
                ('communication', models.ManyToManyField(blank=True, related_name='healthcareservice_communication', to='base.codeableconcept')),
                ('contact', models.ManyToManyField(blank=True, related_name='healthcareservice_contact', to='base.extendedcontactdetail')),
                ('coverage_area', models.ManyToManyField(blank=True, related_name='healthcareservice_coverage_area', to='locations.locationreference')),
                ('endpoint', models.ManyToManyField(blank=True, related_name='healthcareservice_endpoint', to='endpoints.endpoint')),
                ('identifier', models.ManyToManyField(blank=True, related_name='healthcareservice_identifier', to='base.identifier')),
                ('location', models.ManyToManyField(blank=True, related_name='healthcare_service_location', to='locations.locationreference')),
                ('photo', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='base.attachment')),
                ('program', models.ManyToManyField(blank=True, related_name='healthcareservice_program', to='base.codeableconcept')),
                ('provided_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='base.organizationreference')),
                ('referral_method', models.ManyToManyField(blank=True, related_name='healthcareservice_referral_method', to='base.codeableconcept')),
                ('service_provision_code', models.ManyToManyField(blank=True, related_name='healthcareservice_service_provision_code', to='base.codeableconcept')),
                ('specialty', models.ManyToManyField(blank=True, related_name='healthcareservice_specialty', to='base.codeableconcept')),
                ('type', models.ManyToManyField(blank=True, related_name='healthcareservice_type', to='base.codeableconcept')),
                ('eligibility', models.ManyToManyField(blank=True, related_name='healthcareservice_eligibility', to='healthcareservices.healthcareserviceeligibility')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HealthCareServiceEligibilityValue',
            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_boolean', models.BooleanField(null=True)),
                ('value_codeable_concept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='base.codeableconcept')),
                ('value_quantity', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='base.quantity')),
                ('value_range', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='base.range')),
                ('value_reference', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='base.reference')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='healthcareserviceeligibility',
            name='value',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='healthcareservices.healthcareserviceeligibilityvalue'),
        ),
        migrations.CreateModel(
            name='HealthCareServiceReference',
            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)),
                ('healthcare_service', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='healthcareservice_reference', to='healthcareservices.healthcareservice')),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='healthcareservice_reference_identifier', to='base.identifier')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HealthCareServiceCodeableReference',
            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)),
                ('concept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='healthcareservice_codeableconcept', to='base.codeableconcept')),
                ('reference', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='codeable_reference', to='healthcareservices.healthcareservicereference')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='healthcareservice',
            name='offered_in',
            field=models.ManyToManyField(blank=True, related_name='healthcareservice_offered_in', to='healthcareservices.healthcareservicereference'),
        ),
    ]
