# Generated by Django 5.2 on 2025-05-05 14:45

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


class Migration(migrations.Migration):

    dependencies = [
        ('activitydefinitions', '0010_activityplandefinitionreference'),
        ('biologicallyderivedproducts', '0002_initial'),
        ('coverages', '0002_initial'),
        ('detectedissues', '0005_initial'),
        ('devicerequests', '0004_initial'),
        ('documentreferences', '0005_initial'),
        ('nutritionorders', '0004_nutritionorder_allergy_intolerance'),
        ('plandefinitions', '0003_initial'),
        ('servicerequests', '0001_initial'),
        ('specimens', '0001_initial'),
        ('substances', '0001_initial'),
        ('supplyrequests', '0001_initial'),
    ]

    operations = [
        migrations.RenameField(
            model_name='servicerequestbasedonreference',
            old_name='medicatoin_request',
            new_name='medication_request',
        ),
        migrations.AddField(
            model_name='orderdetailparameterfocusreference',
            name='biological_derived_product',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='order_detail_parameter_focus_reference_biological_derived_product', to='biologicallyderivedproducts.biologicallyderivedproduct'),
        ),
        migrations.AddField(
            model_name='orderdetailparameterfocusreference',
            name='device_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='order_detail_parameter_focus_device_request', to='devicerequests.devicerequest'),
        ),
        migrations.AddField(
            model_name='orderdetailparameterfocusreference',
            name='substance',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='order_detail_parameter_focus_substance', to='substances.substance'),
        ),
        migrations.AddField(
            model_name='orderdetailparameterfocusreference',
            name='supply_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='order_detail_parameter_focus_supply_request', to='supplyrequests.supplyrequest'),
        ),
        migrations.AddField(
            model_name='servicerequest',
            name='code',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='service_request_code', to='activitydefinitions.activityplandefinitionreference'),
        ),
        migrations.AddField(
            model_name='servicerequest',
            name='insurance',
            field=models.ManyToManyField(blank=True, related_name='service_request_insurance', to='coverages.coverageclaimresponsereference'),
        ),
        migrations.AddField(
            model_name='servicerequest',
            name='specimen',
            field=models.ManyToManyField(blank=True, related_name='service_request_specimen', to='specimens.specimenreference'),
        ),
        migrations.AddField(
            model_name='servicerequestbasedonreference',
            name='nutrition_order',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='service_request_based_on_nutrition_order', to='nutritionorders.nutritionorder'),
        ),
        migrations.AddField(
            model_name='servicerequestpatientinstruction',
            name='instruction_reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patient_instruction_document_reference', to='documentreferences.documentreference'),
        ),
        migrations.AddField(
            model_name='servicerequestplandefinitionreference',
            name='plan_definition',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='service_request_plan_definition_plan_definition', to='plandefinitions.plandefinition'),
        ),
        migrations.AddField(
            model_name='servicerequestreasonreference',
            name='detected_issue',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='service_request_reason_detected_issue', to='detectedissues.detectedissue'),
        ),
        migrations.AddField(
            model_name='servicerequestreasonreference',
            name='document_reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='service_request_reason_document_reference', to='documentreferences.documentreference'),
        ),
    ]
