# 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'),
        ('devices', '0001_initial'),
        ('diagnosticreports', '0003_initial'),
        ('medicationadministrations', '0003_initial'),
        ('observations', '0002_initial'),
        ('patients', '0002_initial'),
        ('practitionerroles', '0002_initial'),
        ('practitioners', '0001_initial'),
        ('procedures', '0001_initial'),
        ('relatedpersons', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='medicationadministrationpartof',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_part_of_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='medicationadministration',
            name='part_of',
            field=models.ManyToManyField(blank=True, related_name='medication_administration_part_of', to='medicationadministrations.medicationadministrationpartof'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformer',
            name='function',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_function', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='medicationadministration',
            name='performer',
            field=models.ManyToManyField(blank=True, related_name='medication_administration_performer', to='medicationadministrations.medicationadministrationperformer'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformeractorcodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_actor_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformer',
            name='actor',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_actor', to='medicationadministrations.medicationadministrationperformeractorcodeablereference'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformeractorreference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_actor_device', to='devices.device'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformeractorreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_actor_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformeractorreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_actor_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformeractorreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_actor_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformeractorreference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_actor_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformeractorreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_actor_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='medicationadministrationperformeractorcodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_performer_actor_codeable_reference_reference', to='medicationadministrations.medicationadministrationperformeractorreference'),
        ),
        migrations.AddField(
            model_name='medicationadministrationreasoncodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_reason_codeable_reference_codeable_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='medicationadministration',
            name='reason',
            field=models.ManyToManyField(blank=True, related_name='medication_administration_reason_codeable_reference', to='medicationadministrations.medicationadministrationreasoncodeablereference'),
        ),
        migrations.AddField(
            model_name='medicationadministrationreasonreference',
            name='condition',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_reason_reference_condition', to='conditions.condition'),
        ),
        migrations.AddField(
            model_name='medicationadministrationreasonreference',
            name='diagnostic_report',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_reason_reference_diagnostic_report', to='diagnosticreports.diagnosticreport'),
        ),
        migrations.AddField(
            model_name='medicationadministrationreasonreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_reason_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationadministrationreasonreference',
            name='observation',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_reason_reference_observation', to='observations.observation'),
        ),
        migrations.AddField(
            model_name='medicationadministrationreasonreference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_reason_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='medicationadministrationreasoncodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_reason_codeable_reference_reference', to='medicationadministrations.medicationadministrationreasonreference'),
        ),
    ]
