# Generated by Django 2.0.9 on 2019-03-28 20:57

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('healthnet', '0006_note'),
    ]

    operations = [
        migrations.CreateModel(
            name='Script',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('notes', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scripts', to=settings.AUTH_USER_MODEL)),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scripts', to='healthnet.Patient')),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='ScriptItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('drug', models.CharField(max_length=150)),
                ('duration', models.IntegerField()),
                ('refills', models.IntegerField()),
                ('script', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scripts', to='healthnet.Script')),
            ],
        ),
        migrations.AlterModelOptions(
            name='note',
            options={'ordering': ['-created']},
        ),
        migrations.AlterField(
            model_name='admission',
            name='date',
            field=models.DateField(default=datetime.date(2019, 3, 28)),
        ),
        migrations.AlterField(
            model_name='note',
            name='patient',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='healthnet.Patient'),
        ),
    ]
