# Generated by Django 4.2.14 on 2025-01-13 15:23

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


class Migration(migrations.Migration):

    dependencies = [
        ('healthcareservices', '0005_remove_healthcareservicecodeablereference_healthcare_service'),
        ('practitioners', '0007_remove_practitionerrole_availability_and_more'),
        ('observations', '0002_initial'),
        ('base', '0004_ratio'),
        ('encounters', '0008_alter_encounterlocation_location'),
        ('servicerequests', '0001_initial'),
        ('diagnosticreports', '0002_initial'),
        ('patients', '0004_patientgroupreference'),
        ('medications', '0003_remove_ratio_denominator_remove_ratio_numerator_and_more'),
        ('organizations', '0001_initial'),
        ('medicationrequests', '0002_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='DeviceDefinitionReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='device_definition_reference_identifier', to='base.identifier')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DispenseRequest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('number_of_repeats_allowed', models.IntegerField(null=True)),
                ('dispense_instruction', models.ManyToManyField(blank=True, related_name='dispense_request_instruction', to='base.annotation')),
                ('dispense_interval', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dispense_request_dispense_interval', to='base.quantity')),
                ('dispenser', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dispense_request_dispenser', to='base.organizationreference')),
                ('dose_administration_aid', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dispense_request_dose_administration_aid', to='base.codeableconcept')),
                ('expected_supply_duration', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='base.quantity')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DispenseRequestInitialFill',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('duration', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dispense_request_initial_fill_duration', to='base.quantity')),
                ('quantity', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dispense_request_initial_fill_quantity', to='base.quantity')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestBasedOnReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_based_on_identifier', to='base.identifier')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestDeviceDefinitionCodeableReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('concept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='device_definition_codeable_reference_concept', to='base.codeableconcept')),
                ('reference', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='device_definition_codeable_reference_reference', to='medicationrequests.devicedefinitionreference')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestEncounterReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('encounter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_encounter_reference_encounter', to='encounters.encounter')),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_encounter_reference_identifier', to='base.identifier')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='medicationRequestInformationSourceReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_identifier', to='base.identifier')),
                ('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_organization', to='organizations.organization')),
                ('patient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_patient', to='patients.patient')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_practitioner', to='practitioners.practitioner')),
                ('practitioner_role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_information_source_reference_practitioner_role', to='practitioners.practitionerrole')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestInsuranceReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_insurance_reference_identifier', to='base.identifier')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestMedicationCodeableReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('concept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_medication_codeable_reference_codeable_concept', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestMedicationReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_medication_reference_identifier', to='base.identifier')),
                ('medication', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_medication_reference_medication', to='medications.medication')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestPerformerReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('healthcare_service', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_healthcare_service', to='healthcareservices.healthcareservice')),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_identifier', to='base.identifier')),
                ('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_organization', to='organizations.organization')),
                ('patient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_patient', to='patients.patient')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_practitioner', to='practitioners.practitioner')),
                ('practitioner_role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_performer_reference_practitioner_role', to='practitioners.practitionerrole')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestProvinanceReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_provinance_reference_identifier', to='base.identifier')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestReasonReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('diagnostic_report', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_reason_reference_diagnostic_report', to='diagnosticreports.diagnosticreport')),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_codeble_reason_reference_identifier', to='base.identifier')),
                ('observation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_reason_reference_observation', to='observations.observation')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestRecorderReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_recorder_reference_identifier', to='base.identifier')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_recorder_reference_practitioner', to='practitioners.practitioner')),
                ('practitioner_role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_recorder_reference_practitioner_role', to='practitioners.practitionerrole')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_reference_identifier', to='base.identifier')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestRequesterReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_identifier', to='base.identifier')),
                ('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_organization', to='organizations.organization')),
                ('patient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_patient', to='patients.patient')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_practitioner', to='practitioners.practitioner')),
                ('practitioner_role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_requester_reference_practitioner_role', to='practitioners.practitionerrole')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestSubjectReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_subject_reference_identifier', to='base.identifier')),
                ('patient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_subject_reference_patient', to='patients.patient')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationRequestSubstitution',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('allowed_boolean', models.BooleanField(default=True)),
                ('allowed_codeable_concept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_substitution_allowed_codeable_concept', to='base.codeableconcept')),
                ('reason', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_substitution_reason', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicatonRequestReasonCodealbleReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('concept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_reason_codeable_reference_concept', to='base.codeableconcept')),
                ('reference', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_request_reason_codeable_reference_reference', to='medicationrequests.medicationrequestreasonreference')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.RemoveField(
            model_name='medicationrequestbasedon',
            name='medication_request',
        ),
        migrations.RemoveField(
            model_name='medicationrequestbasedon',
            name='service_request',
        ),
        migrations.RemoveField(
            model_name='medicationrequestdosage',
            name='additional_illustrations',
        ),
        migrations.RemoveField(
            model_name='medicationrequestdosage',
            name='as_needed_for',
        ),
        migrations.RemoveField(
            model_name='medicationrequestdosage',
            name='medication_request',
        ),
        migrations.RemoveField(
            model_name='medicationrequestdosage',
            name='method',
        ),
        migrations.RemoveField(
            model_name='medicationrequestdosage',
            name='route',
        ),
        migrations.RemoveField(
            model_name='medicationrequestdosage',
            name='site',
        ),
        migrations.RemoveField(
            model_name='medicationrequestdoseandrate',
            name='dosage',
        ),
        migrations.RemoveField(
            model_name='medicationrequestsupportinginformation',
            name='medication_request',
        ),
        migrations.RemoveField(
            model_name='medicationrequestsupportinginformation',
            name='reference_type',
        ),
        migrations.RemoveField(
            model_name='requester',
            name='medication_request',
        ),
        migrations.RemoveField(
            model_name='requester',
            name='organization',
        ),
        migrations.RemoveField(
            model_name='requester',
            name='practitioner',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='allowed',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='dispense_instruction',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='dispense_interval',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='dispenser',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='dose_administration_aid',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='duration',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='effective_dose_period_end',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='effective_dose_period_start',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='expected_supply_duration',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='number_of_repeats_allowed',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='patient',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='quantity',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='validity_period',
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='effective_dose_period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_effective_dose_period', to='base.period'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='identifier',
            field=models.ManyToManyField(blank=True, related_name='medication_request_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='supporting_information',
            field=models.ManyToManyField(blank=True, related_name='medication_request_supporting_information', to='base.reference'),
        ),
        migrations.AlterField(
            model_name='medicationrequest',
            name='category',
            field=models.ManyToManyField(blank=True, related_name='medication_request_category', to='base.codeableconcept'),
        ),
        migrations.AlterField(
            model_name='medicationrequest',
            name='course_of_therapy_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_course_of_therapy_type', to='base.codeableconcept'),
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='device',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='event_history',
        ),
        migrations.AlterField(
            model_name='medicationrequest',
            name='group_identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_group_identifier', to='base.identifier'),
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='insurance',
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='note',
        ),
        migrations.AlterField(
            model_name='medicationrequest',
            name='performer_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_performer_type', to='base.codeableconcept'),
        ),
        migrations.RemoveField(
            model_name='medicationrequest',
            name='reason',
        ),
        migrations.AlterField(
            model_name='medicationrequest',
            name='rendered_dosage_instruction',
            field=models.TextField(null=True),
        ),
        migrations.AlterField(
            model_name='medicationrequest',
            name='status_reason',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_status_reason', to='base.codeableconcept'),
        ),
        migrations.DeleteModel(
            name='InformationSource',
        ),
        migrations.DeleteModel(
            name='MedicationRequestBasedOn',
        ),
        migrations.DeleteModel(
            name='MedicationRequestDosage',
        ),
        migrations.DeleteModel(
            name='MedicationRequestDoseAndRate',
        ),
        migrations.DeleteModel(
            name='MedicationRequestSupportingInformation',
        ),
        migrations.DeleteModel(
            name='Requester',
        ),
        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='medicationrequestmedicationcodeablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_medication_codeable_reference', to='medicationrequests.medicationrequestmedicationreference'),
        ),
        migrations.AddField(
            model_name='medicationrequestbasedonreference',
            name='medication_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_based_on_reference', to='medicationrequests.medicationrequest'),
        ),
        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='dispenserequest',
            name='initial_fill',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dispense_request_initial_fill', to='medicationrequests.dispenserequestinitialfill'),
        ),
        migrations.AddField(
            model_name='dispenserequest',
            name='quantity',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dispense_request_quantity', to='base.quantity'),
        ),
        migrations.AddField(
            model_name='dispenserequest',
            name='validity_period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dispense_request_validity_period', to='base.period'),
        ),
        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='medicationrequest',
            name='dispense_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_dispense_request', to='medicationrequests.dispenserequest'),
        ),
        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='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='medicationrequest',
            name='subject',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_subject', to='medicationrequests.medicationrequestsubjectreference'),
        ),
        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='medicationrequest',
            name='device',
            field=models.ManyToManyField(blank=True, related_name='medication_request_device', to='medicationrequests.medicationrequestdevicedefinitioncodeablereference'),
        ),
        migrations.AlterField(
            model_name='medicationrequest',
            name='encounter',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_encounter', to='medicationrequests.medicationrequestencounterreference'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='event_history',
            field=models.ManyToManyField(blank=True, related_name='medication_request_event_history', to='medicationrequests.medicationrequestprovinancereference'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='insurance',
            field=models.ManyToManyField(blank=True, related_name='medication_request_insurance', to='medicationrequests.medicationrequestinsurancereference'),
        ),
        migrations.AlterField(
            model_name='medicationrequest',
            name='medication',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_mepatientdication', to='medicationrequests.medicationrequestmedicationcodeablereference'),
        ),
        migrations.AddField(
            model_name='medicationrequest',
            name='note',
            field=models.ManyToManyField(blank=True, related_name='medication_request_note', to='base.annotation'),
        ),
        migrations.AlterField(
            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.AlterField(
            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='medicationrequest',
            name='reason',
            field=models.ManyToManyField(blank=True, related_name='medication_request_reason', to='medicationrequests.medicatonrequestreasoncodealblereference'),
        ),
        migrations.AlterField(
            model_name='medicationrequest',
            name='recorder',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_request_recorder', to='medicationrequests.medicationrequestrecorderreference'),
        ),
    ]
