# 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', '0003_initial'),
        ('careplans', '0003_initial'),
        ('devices', '0001_initial'),
        ('encounters', '0002_initial'),
        ('medications', '0001_initial'),
        ('provenances', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='MedicationAdministrationDosage',
            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)),
                ('text', models.TextField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationAdministrationPartOf',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationAdministrationPerformer',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationAdministrationPerformerActorCodeableReference',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationAdministrationPerformerActorReference',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationAdministrationReasonCodeableReference',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationAdministrationReasonReference',
            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)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationAdministration',
            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)),
                ('status', models.CharField(choices=[('in-progress', 'In Progress'), ('not-done', 'Not Done'), ('on-hold', 'On Hold'), ('completed', 'Completed'), ('entered-in-error', 'Entered in Error'), ('stopped', 'Stopped'), ('unknown', 'Unknown')], max_length=200, null=True)),
                ('occurrence_date_time', models.DateTimeField(null=True)),
                ('recorded', models.DateTimeField(null=True)),
                ('is_sub_potent', models.BooleanField(null=True)),
                ('based_on', models.ManyToManyField(blank=True, related_name='medication_administration_based_on', to='careplans.careplanreference')),
                ('category', models.ManyToManyField(blank=True, related_name='medication_administration_category', to='base.codeableconcept')),
                ('device', models.ManyToManyField(blank=True, related_name='medication_administration_device', to='devices.devicecodeablereference')),
                ('encounter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_encounter', to='encounters.encounterreference')),
                ('event_history', models.ManyToManyField(blank=True, related_name='medication_administration_event_history', to='provenances.provenancereference')),
                ('identifier', models.ManyToManyField(blank=True, related_name='medication_administration_identifier', to='base.identifier')),
                ('medication', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_medication_codeable_reference', to='medications.medicationcodeablereference')),
                ('note', models.ManyToManyField(blank=True, related_name='medication_administration_note', to='base.annotation')),
                ('occurrence_period', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_occurrence_period', to='base.period')),
                ('occurrence_timing', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='medication_administration_occurrence_timing', to='base.timing')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
