# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-11 16:37
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('frontend', '0042_auto_20160210_1734'),
    ]

    operations = [
        migrations.CreateModel(
            name='Measure',
            fields=[
                ('id', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=500)),
                ('title', models.CharField(max_length=500)),
                ('description', models.TextField()),
                ('numerator_description', models.CharField(blank=True, max_length=500, null=True)),
                ('denominator_description', models.CharField(blank=True, max_length=500, null=True)),
                ('start_date', models.DateField(blank=True, null=True)),
                ('end_date', models.DateField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='MeasureGlobal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('month', models.DateField()),
                ('numerator', models.FloatField(blank=True, null=True)),
                ('denominator', models.FloatField(blank=True, null=True)),
                ('value', models.FloatField(blank=True, null=True)),
                ('practice_10th', models.FloatField(blank=True, null=True)),
                ('practice_25th', models.FloatField(blank=True, null=True)),
                ('practice_75th', models.FloatField(blank=True, null=True)),
                ('practice_90th', models.FloatField(blank=True, null=True)),
                ('ccg_10th', models.FloatField(blank=True, null=True)),
                ('ccg_25th', models.FloatField(blank=True, null=True)),
                ('ccg_75th', models.FloatField(blank=True, null=True)),
                ('ccg_90th', models.FloatField(blank=True, null=True)),
                ('measure', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='frontend.Measure')),
            ],
        ),
        migrations.CreateModel(
            name='MeasureValue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('month', models.DateField()),
                ('numerator', models.FloatField(blank=True, null=True)),
                ('denominator', models.FloatField(blank=True, null=True)),
                ('value', models.FloatField(blank=True, null=True)),
                ('percentile', models.FloatField(blank=True, null=True)),
                ('cost_saving', models.FloatField(blank=True, null=True)),
                ('measure', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='frontend.Measure')),
                ('pct', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='frontend.PCT')),
                ('practice', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='frontend.Practice')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='measurevalue',
            unique_together=set([('measure', 'pct', 'practice', 'month')]),
        ),
        migrations.AlterUniqueTogether(
            name='measureglobal',
            unique_together=set([('measure', 'month')]),
        ),
    ]
