# Generated by Django 2.1.7 on 2019-03-07 16:32

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),
        ('hnet', '0005_groupmeasurements'),
    ]

    operations = [
        migrations.CreateModel(
            name='GroupMeasurement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(default=datetime.datetime(2019, 3, 7, 16, 32, 32, 293716))),
                ('comments', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='GroupMeasurementRecording',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.DecimalField(decimal_places=2, max_digits=5)),
                ('groupMeasurement', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='groupMeasurementRecording', to='hnet.GroupMeasurement')),
            ],
        ),
        migrations.CreateModel(
            name='GroupMeasurementTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('frequency', models.IntegerField(choices=[(1, 'Daily'), (7, 'Weekly'), (30, 'Monthly'), (90, 'Quarterly')], default=1)),
                ('msmtType', models.ManyToManyField(to='hnet.MeasurementType')),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pt_grpmsmt', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.RemoveField(
            model_name='groupmeasurements',
            name='msmtType',
        ),
        migrations.RemoveField(
            model_name='groupmeasurements',
            name='patient',
        ),
        migrations.DeleteModel(
            name='GroupMeasurements',
        ),
        migrations.AddField(
            model_name='groupmeasurement',
            name='groupMeasurement',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='groupMeasurement', to='hnet.GroupMeasurementTemplate'),
        ),
    ]
