# Generated by Django 5.2 on 2025-04-23 12:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('base', '0003_initial'),
        ('encounters', '0002_initial'),
        ('medications', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='MedicationStatementAdherence',
            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='MedicationStatementInformationSourceReference',
            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='MedicationStatementPartOfReference',
            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='MedicationStatementReasonReference',
            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='MedicationStatement',
            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=[('recorded', 'Recorded'), ('entered-in-error', 'Entered in error'), ('draft', 'Draft')], max_length=255, null=True)),
                ('effective_date_time', models.DateTimeField(null=True)),
                ('date_asserted', models.DateTimeField(null=True)),
                ('related_clinical_information', models.TextField(null=True)),
                ('category', models.ManyToManyField(blank=True, related_name='medication_statement_category', to='base.codeableconcept')),
                ('derived_from', models.ManyToManyField(blank=True, related_name='medication_statement_derived_from', to='base.reference')),
                ('effective_period', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_statement_effective_period', to='base.period')),
                ('effective_timing', models.ForeignKey(null=True, on_delete=django.db.models.fields.related.ForeignKey, related_name='medication_statement_effective_timing', to='base.timing')),
                ('encounter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_statement_encounter', to='encounters.encounterreference')),
                ('identifier', models.ManyToManyField(blank=True, related_name='medication_statement_identifier', to='base.identifier')),
                ('medication', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='medication_statement_medication', to='medications.medicationcodeablereference')),
                ('note', models.ManyToManyField(blank=True, related_name='medication_statement_note', to='base.annotation')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
