# 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', '0005_initial'),
        ('conditions', '0004_initial'),
        ('episodeofcares', '0002_initial'),
        ('healthcareservices', '0001_initial'),
        ('observations', '0002_initial'),
        ('patients', '0002_initial'),
        ('procedures', '0001_initial'),
        ('servicerequests', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='episodeofcare',
            name='referral_request',
            field=models.ManyToManyField(blank=True, related_name='episode_of_care_referral_request', to='servicerequests.servicerequestreference'),
        ),
        migrations.AddField(
            model_name='episodeofcare',
            name='subject',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_patient', to='patients.patientgroupreference'),
        ),
        migrations.AddField(
            model_name='episodeofcare',
            name='type',
            field=models.ManyToManyField(blank=True, related_name='episode_of_care_type', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='episodeofcarediagnosis',
            name='condition',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_diagnosis_condition', to='conditions.conditioncodeablereference'),
        ),
        migrations.AddField(
            model_name='episodeofcarediagnosis',
            name='use',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_diagnosis_use', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='episodeofcare',
            name='diagnosis',
            field=models.ManyToManyField(blank=True, related_name='episode_of_care_diagnosis', to='episodeofcares.episodeofcarediagnosis'),
        ),
        migrations.AddField(
            model_name='episodeofcarereason',
            name='use',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reason_use', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='episodeofcarereasonvaluecodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reason_value_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='episodeofcarereason',
            name='value',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reason_value', to='episodeofcares.episodeofcarereasonvaluecodeablereference'),
        ),
        migrations.AddField(
            model_name='episodeofcarereasonvaluereference',
            name='condition',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reason_value_reference_condition', to='conditions.condition'),
        ),
        migrations.AddField(
            model_name='episodeofcarereasonvaluereference',
            name='healthcare_service',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reason_value_reference_healthcare_service', to='healthcareservices.healthcareservice'),
        ),
        migrations.AddField(
            model_name='episodeofcarereasonvaluereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reason_value_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='episodeofcarereasonvaluereference',
            name='observation',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reason_value_reference_observation', to='observations.observation'),
        ),
        migrations.AddField(
            model_name='episodeofcarereasonvaluereference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reason_value_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='episodeofcarereasonvaluecodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reason_value_codeable_reference_reference', to='episodeofcares.episodeofcarereasonvaluereference'),
        ),
        migrations.AddField(
            model_name='episodeofcarereference',
            name='episode_of_care',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reference_episode_of_care', to='episodeofcares.episodeofcare'),
        ),
        migrations.AddField(
            model_name='episodeofcarereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='episodeofcarestatushistory',
            name='period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='episode_of_care_status_history_period', to='base.period'),
        ),
        migrations.AddField(
            model_name='episodeofcare',
            name='status_history',
            field=models.ManyToManyField(blank=True, related_name='episode_of_care_status_history', to='episodeofcares.episodeofcarestatushistory'),
        ),
    ]
