# Generated by Django 4.2.14 on 2025-01-16 11:42

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('devices', '0001_initial'),
        ('base', '0006_alter_repeat_duration_unit_alter_repeat_period_unit'),
        ('relatedpersons', '0001_initial'),
        ('careteams', '0001_initial'),
        ('groups', '0001_initial'),
        ('observations', '0003_observationbasedonreference_and_more'),
    ]

    operations = [
        migrations.AddField(
            model_name='observation',
            name='effective_instant',
            field=models.DateTimeField(null=True),
        ),
        migrations.AddField(
            model_name='observation',
            name='effective_timing',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='observation_effective_timing', to='base.timing'),
        ),
        migrations.AddField(
            model_name='observation',
            name='triggered_by',
            field=models.ManyToManyField(blank=True, related_name='observation_triggered_by', to='observations.observationtriggeredby'),
        ),
        migrations.AddField(
            model_name='observationdevicereference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='observation_device_reference_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='observationperformerreference',
            name='care_team',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='observation_performer_reference_care_team', to='careteams.careteam'),
        ),
        migrations.AddField(
            model_name='observationperformerreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='observationspecimenreference',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='observation_specimen_reference_group', to='groups.group'),
        ),
        migrations.AddField(
            model_name='observationsubjectreference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='observation_subject_reference_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='observationsubjectreference',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='observation_subject_reference_group', to='groups.group'),
        ),
        migrations.RemoveField(
            model_name='observation',
            name='interpretation',
        ),
        migrations.RemoveField(
            model_name='observationcomponent',
            name='interpretation',
        ),
        migrations.AddField(
            model_name='observation',
            name='interpretation',
            field=models.ManyToManyField(blank=True, related_name='observation_interpretation', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='observationcomponent',
            name='interpretation',
            field=models.ManyToManyField(blank=True, related_name='observation_component_interpretation', to='base.codeableconcept'),
        ),
    ]
