# 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'),
        ('careteams', '0004_initial'),
        ('conditions', '0004_initial'),
        ('devices', '0001_initial'),
        ('diagnosticreports', '0003_initial'),
        ('healthcareservices', '0001_initial'),
        ('medicationrequests', '0002_initial'),
        ('observations', '0002_initial'),
        ('organizations', '0001_initial'),
        ('patients', '0002_initial'),
        ('practitionerroles', '0002_initial'),
        ('practitioners', '0001_initial'),
        ('relatedpersons', '0001_initial'),
        ('servicerequests', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='medicationrequestbasedonreference',
            name='service_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_based_on_service_request', to='servicerequests.servicerequest'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='based_on',
            field=models.ManyToManyField(blank=True, related_name='medication_request_based_on', to='medicationrequests.medicationrequestbasedonreference'),
        ),
        migrations.AddField(
            model_name='medicationrequestinformationsourcereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationrequestinformationsourcereference',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_organization', to='organizations.organization'),
        ),
        migrations.AddField(
            model_name='medicationrequestinformationsourcereference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='medicationrequestinformationsourcereference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='medicationrequestinformationsourcereference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='medicationrequestinformationsourcereference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='information_source',
            field=models.ManyToManyField(blank=True, related_name='medication_request_information_source', to='medicationrequests.medicationrequestinformationsourcereference'),
        ),
        migrations.AddField(
            model_name='medicationrequestinsurancereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_insurance_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='insurance',
            field=models.ManyToManyField(blank=True, related_name='medication_request_insurance', to='medicationrequests.medicationrequestinsurancereference'),
        ),
        migrations.AddField(
            model_name='medicationrequestperformerreference',
            name='care_team',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='careteams.careteam'),
        ),
        migrations.AddField(
            model_name='medicationrequestperformerreference',
            name='healthcare_service',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_healthcare_service', to='healthcareservices.healthcareservice'),
        ),
        migrations.AddField(
            model_name='medicationrequestperformerreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationrequestperformerreference',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_organization', to='organizations.organization'),
        ),
        migrations.AddField(
            model_name='medicationrequestperformerreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='medicationrequestperformerreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='medicationrequestperformerreference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='medicationrequestperformerreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='performer',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_performer', to='medicationrequests.medicationrequestperformerreference'),
        ),
        migrations.AddField(
            model_name='medicationrequestprovinancereference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_provinance_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationrequestreasonreference',
            name='condition',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='conditions.condition'),
        ),
        migrations.AddField(
            model_name='medicationrequestreasonreference',
            name='diagnostic_report',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_reason_reference_diagnostic_report', to='diagnosticreports.diagnosticreport'),
        ),
        migrations.AddField(
            model_name='medicationrequestreasonreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_codeble_reason_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationrequestreasonreference',
            name='observation',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_reason_reference_observation', to='observations.observation'),
        ),
        migrations.AddField(
            model_name='medicationrequestreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationrequestreference',
            name='medication_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_reference', to='medicationrequests.medicationrequest'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='prior_prescription',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_prior_prescription', to='medicationrequests.medicationrequestreference'),
        ),
        migrations.AddField(
            model_name='medicationrequestrequesterreference',
            name='device',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='devices.device'),
        ),
        migrations.AddField(
            model_name='medicationrequestrequesterreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationrequestrequesterreference',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_organization', to='organizations.organization'),
        ),
        migrations.AddField(
            model_name='medicationrequestrequesterreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='medicationrequestrequesterreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='medicationrequestrequesterreference',
            name='practitioner_role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_practitioner_role', to='practitionerroles.practitionerrole'),
        ),
        migrations.AddField(
            model_name='medicationrequestrequesterreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='requester',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester', to='medicationrequests.medicationrequestrequesterreference'),
        ),
        migrations.AddField(
            model_name='medicationrequestsubstitution',
            name='allowed_codeable_concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_substitution_allowed_codeable_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='medicationrequestsubstitution',
            name='reason',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_substitution_reason', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='substitution',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_substitution', to='medicationrequests.medicationrequestsubstitution'),
        ),
        migrations.AddField(
            model_name='medicatonrequestreasoncodealblereference',
            name='concept',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_reason_codeable_reference_concept', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='medicatonrequestreasoncodealblereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_reason_codeable_reference_reference', to='medicationrequests.medicationrequestreasonreference'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='reason',
            field=models.ManyToManyField(blank=True, related_name='medication_request_reason', to='medicationrequests.medicatonrequestreasoncodealblereference'),
        ),
    ]
