# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-05-19 10:42
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('user_profile', '0020_doctor_title'),
    ]

    operations = [
        migrations.CreateModel(
            name='Icd10',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=5)),
                ('desc', models.CharField(max_length=200)),
            ],
            options={
                'verbose_name': 'Rozpoznanie',
                'verbose_name_plural': 'Rozpoznania',
            },
        ),
        migrations.CreateModel(
            name='Tab',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='Tytu\u0142')),
                ('order', models.IntegerField(blank=True, null=True, unique=True)),
                ('enabled', models.BooleanField(default=True, verbose_name='W\u0142\u0105czona')),
                ('doctor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tabs', to='user_profile.Doctor')),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='TabParent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('template', models.CharField(default='default.html', max_length=100, verbose_name='Szablon')),
                ('obligatory', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Template',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Nazwa')),
                ('text', models.CharField(max_length=1000, verbose_name='Tekst')),
                ('key', models.CharField(blank=True, choices=[('CTRL+F1', 'ctrl+f1'), ('CTRL+F2', 'ctrl+f2'), ('CTRL+F3', 'ctrl+f3'), ('CTRL+F4', 'ctrl+f4'), ('CTRL+F5', 'ctrl+f5'), ('CTRL+F6', 'ctrl+f6'), ('CTRL+F7', 'ctrl+f7'), ('CTRL+F8', 'ctrl+f8'), ('CTRL+F9', 'ctrl+f9'), ('CTRL+F10', 'ctrl+f10'), ('alt+f1', 'ALT+F1'), ('alt+f2', 'ALT+F2'), ('alt+f3', 'ALT+F3'), ('alt+f4', 'ALT+F4'), ('alt+f5', 'ALT+F5'), ('alt+f6', 'ALT+F6'), ('alt+f7', 'ALT+F7'), ('alt+f8', 'ALT+F8'), ('alt+f9', 'ALT+F9'), ('alt+f10', 'ALT+F10')], max_length=8, null=True, verbose_name='Skr\xf3t')),
                ('doctor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='templates', to='user_profile.Doctor')),
                ('tab', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='templates', to='visit.Tab', verbose_name='Sekcja')),
            ],
        ),
        migrations.CreateModel(
            name='Visit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('visit_pdf', models.FileField(blank=True, null=True, upload_to='visits/')),
                ('in_progress', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='VisitTab',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('body', models.TextField(default='')),
                ('json', models.TextField(default='null')),
                ('order', models.IntegerField(blank=True, null=True, unique=True)),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.AddField(
            model_name='visit',
            name='tabs',
            field=models.ManyToManyField(related_name='tabs', to='visit.VisitTab'),
        ),
        migrations.AddField(
            model_name='tab',
            name='parent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='children', to='visit.TabParent'),
        ),
    ]
