# 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'),
        ('deviceassociations', '0003_initial'),
        ('devices', '0001_initial'),
        ('groups', '0001_initial'),
        ('patients', '0001_initial'),
        ('practitioners', '0001_initial'),
        ('relatedpersons', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='deviceassociationoperationoperatorreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='device_association_operation_operator_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='deviceassociationoperationoperatorreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='device_association_operation_operator_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='deviceassociationoperation',
            name='operator',
            field=models.ManyToManyField(blank=True, related_name='device_association_operation_operator', to='deviceassociations.deviceassociationoperationoperatorreference'),
        ),
        migrations.AddField(
            model_name='deviceassociationsubjectreference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_association_subject_reference_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='deviceassociationsubjectreference',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_association_subject_reference_group', to='groups.group'),
        ),
        migrations.AddField(
            model_name='deviceassociationsubjectreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='device_association_subject_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='deviceassociationsubjectreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_association_subject_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='deviceassociationsubjectreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_association_subject_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='deviceassociationsubjectreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_association_subject_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='deviceassociation',
            name='subject',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='device_association_subject', to='deviceassociations.deviceassociationsubjectreference'),
        ),
    ]
