# 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'),
        ('careteams', '0002_initial'),
        ('patients', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='careteam',
            name='subject',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='care_teams_subject', to='patients.patientgroupreference'),
        ),
        migrations.AddField(
            model_name='careteam',
            name='telecom',
            field=models.ManyToManyField(blank=True, related_name='care_teams_telecom', to='base.contactpoint'),
        ),
        migrations.AddField(
            model_name='careteamparticipant',
            name='effective_period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='care_team_participants_effective_period', to='base.period'),
        ),
        migrations.AddField(
            model_name='careteamparticipant',
            name='effective_timing',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='care_team_participants_effective_timing', to='base.timing'),
        ),
        migrations.AddField(
            model_name='careteamparticipant',
            name='role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='care_team_participants_role', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='careteam',
            name='participant',
            field=models.ManyToManyField(blank=True, related_name='care_teams_participant', to='careteams.careteamparticipant'),
        ),
        migrations.CreateModel(
            name='CareTeamParticipantMemberReference',
            fields=[
                ('careteamparticipantonbehalfofreference_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='careteams.careteamparticipantonbehalfofreference')),
            ],
            options={
                'abstract': False,
            },
            bases=('careteams.careteamparticipantonbehalfofreference',),
        ),
        migrations.AddField(
            model_name='careteamparticipantonbehalfofreference',
            name='care_team',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='careteams.careteam'),
        ),
        migrations.AddField(
            model_name='careteamparticipantonbehalfofreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='care_team_participant_on_behalf_of_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='careteamparticipantonbehalfofreference',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='care_team_participant_on_behalf_of_reference_organization', to='base.organizationreference'),
        ),
        migrations.AddField(
            model_name='careteamparticipantonbehalfofreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='patients.patient'),
        ),
    ]
