# 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'),
        ('bodystructures', '0002_initial'),
        ('claims', '0004_initial'),
        ('conditions', '0004_initial'),
        ('devices', '0001_initial'),
        ('deviceusages', '0001_initial'),
        ('diagnosticreports', '0002_initial'),
        ('documentreferences', '0004_initial'),
        ('encounters', '0003_initial'),
        ('observations', '0002_initial'),
        ('organizations', '0001_initial'),
        ('patients', '0002_initial'),
        ('practitionerroles', '0002_initial'),
        ('practitioners', '0001_initial'),
        ('procedures', '0001_initial'),
        ('relatedpersons', '0001_initial'),
        ('servicerequests', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='deviceusage',
            name='based_on',
            field=models.ManyToManyField(blank=True, related_name='device_usage_based_on', to='servicerequests.servicerequestreference'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='body_site',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_body_site', to='bodystructures.bodystructurecodeablereference'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='category',
            field=models.ManyToManyField(blank=True, related_name='device_usage_category', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='context',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_context', to='encounters.encounterepisodeofcarereference'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_device', to='devices.devicedevicedefinitioncodeablereference'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='identifier',
            field=models.ManyToManyField(blank=True, related_name='device_usages_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='note',
            field=models.ManyToManyField(blank=True, related_name='device_usage_note', to='base.annotation'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_patient', to='patients.patientreference'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='timing_period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_timing_period', to='base.period'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='timing_timing',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_timing_timing', to='base.timing'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='usage_reason',
            field=models.ManyToManyField(blank=True, related_name='device_usage_usage_reason', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='usage_status',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_usage_status', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='deviceusageadherence',
            name='code',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_adherence_code', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='deviceusageadherence',
            name='reason',
            field=models.ManyToManyField(blank=True, related_name='device_usage_adherence_reason', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='adherence',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_adherence', to='deviceusages.deviceusageadherence'),
        ),
        migrations.AddField(
            model_name='deviceusagederivedfromreference',
            name='claim',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_derived_from_reference_claim', to='claims.claim'),
        ),
        migrations.AddField(
            model_name='deviceusagederivedfromreference',
            name='document_reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_derived_from_reference_document_reference', to='documentreferences.documentreference'),
        ),
        migrations.AddField(
            model_name='deviceusagederivedfromreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_derived_from_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='deviceusagederivedfromreference',
            name='observation',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_derived_from_reference_observation', to='observations.observation'),
        ),
        migrations.AddField(
            model_name='deviceusagederivedfromreference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_derived_from_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='deviceusagederivedfromreference',
            name='service_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_derived_from_reference_service_request', to='servicerequests.servicerequest'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='derived_from',
            field=models.ManyToManyField(blank=True, related_name='device_usage_derived_from', to='deviceusages.deviceusagederivedfromreference'),
        ),
        migrations.AddField(
            model_name='deviceusageinformationsourcereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='device_usage_information_source_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='deviceusageinformationsourcereference',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_information_source_reference_organization', to='organizations.organization'),
        ),
        migrations.AddField(
            model_name='deviceusageinformationsourcereference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_information_source_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='deviceusageinformationsourcereference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_information_source_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='deviceusageinformationsourcereference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_information_source_reference_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='deviceusageinformationsourcereference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_information_source_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='information_source',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_information_source', to='deviceusages.deviceusageinformationsourcereference'),
        ),
        migrations.AddField(
            model_name='deviceusagereasoncodeablereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='device_usage_reason_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='deviceusage',
            name='reason',
            field=models.ManyToManyField(blank=True, related_name='device_usage_reason', to='deviceusages.deviceusagereasoncodeablereference'),
        ),
        migrations.AddField(
            model_name='deviceusagereasonreference',
            name='condition',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_reason_reference_condition', to='conditions.condition'),
        ),
        migrations.AddField(
            model_name='deviceusagereasonreference',
            name='diagnostic_report',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_reason_reference_diagnostic_report', to='diagnosticreports.diagnosticreport'),
        ),
        migrations.AddField(
            model_name='deviceusagereasonreference',
            name='document_reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_reason_reference_document_reference', to='documentreferences.documentreference'),
        ),
        migrations.AddField(
            model_name='deviceusagereasonreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_reason_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='deviceusagereasonreference',
            name='observation',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_reason_reference_observation', to='observations.observation'),
        ),
        migrations.AddField(
            model_name='deviceusagereasonreference',
            name='procedure',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='device_usage_reason_reference_procedure', to='procedures.procedure'),
        ),
        migrations.AddField(
            model_name='deviceusagereasoncodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='device_usage_reason_codeable_reference_reference', to='deviceusages.deviceusagereasonreference'),
        ),
    ]
