# Generated by Django 4.2.14 on 2025-03-05 08:24

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


class Migration(migrations.Migration):

    dependencies = [
        (
            "immunizationrecommendations",
            "0002_immunizationrecommendationsupportingimmunizationreference_and_more",
        ),
        ("base", "0015_delete_monetarycomponent"),
        ("chargeitems", "0001_initial"),
    ]

    operations = [
        migrations.AddField(
            model_name="chargeitem",
            name="total_price_component",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="charge_item_total_price_component",
                to="base.monetarycomponent",
            ),
        ),
        migrations.AddField(
            model_name="chargeitem",
            name="unit_price_component",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="charge_item_unit_price_component",
                to="base.monetarycomponent",
            ),
        ),
        migrations.AddField(
            model_name="chargeitementererreference",
            name="immunization_recommendation",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="charge_item_enterer_reference_immunization_recommendation",
                to="immunizationrecommendations.immunizationrecommendation",
            ),
        ),
        migrations.AddField(
            model_name="chargeitemreasonreference",
            name="immunization_recommendation",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="charge_item_reason_reference_immunization_recommendation",
                to="immunizationrecommendations.immunizationrecommendation",
            ),
        ),
        migrations.AlterField(
            model_name="chargeitem",
            name="body_site",
            field=models.ManyToManyField(
                blank=True,
                related_name="charge_item_body_site",
                to="base.codeableconcept",
            ),
        ),
        migrations.RemoveField(
            model_name="chargeitem",
            name="part_of",
        ),
        migrations.CreateModel(
            name="ChargeItemServiceCodealbeReference",
            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="charge_item_service_codeable_reference_concept",
                        to="base.codeableconcept",
                    ),
                ),
                (
                    "reference",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.DO_NOTHING,
                        related_name="charge_item_service_codeable_reference_reference",
                        to="chargeitems.chargeitemservicereference",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="ChargeItemReasonCodeableReference",
            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="charge_item_reason_codeable_reference_concept",
                        to="base.codeableconcept",
                    ),
                ),
                (
                    "reference",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.DO_NOTHING,
                        related_name="charge_item_reason_codeable_reference_reference",
                        to="chargeitems.chargeitemreasonreference",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="ChargeItemProductCodeableReference",
            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="charge_item_product_codeable_reference_concept",
                        to="base.codeableconcept",
                    ),
                ),
                (
                    "reference",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.DO_NOTHING,
                        related_name="charge_item_product_codeable_reference_reference",
                        to="chargeitems.chargeitemproductreference",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="chargeitem",
            name="part_of",
            field=models.ManyToManyField(
                blank=True,
                related_name="charge_item_reference_part_of",
                to="chargeitems.charitemreference",
            ),
        ),
        migrations.AlterField(
            model_name="chargeitem",
            name="product",
            field=models.ManyToManyField(
                blank=True,
                related_name="charge_item_product",
                to="chargeitems.chargeitemproductcodeablereference",
            ),
        ),
        migrations.AlterField(
            model_name="chargeitem",
            name="reason",
            field=models.ManyToManyField(
                blank=True,
                related_name="charge_item_reason",
                to="chargeitems.chargeitemreasoncodeablereference",
            ),
        ),
        migrations.AlterField(
            model_name="chargeitem",
            name="service",
            field=models.ManyToManyField(
                blank=True,
                related_name="charge_item_service",
                to="chargeitems.chargeitemservicecodealbereference",
            ),
        ),
    ]
