# Generated by Django 2.2.11 on 2021-07-10 17:35

import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models

import care.utils.models.validators


class Migration(migrations.Migration):
    dependencies = [
        ("facility", "0260_auto_20210710_1742"),
    ]

    operations = [
        migrations.AddField(
            model_name="dailyround",
            name="base_excess",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(-20),
                    django.core.validators.MaxValueValidator(20),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="bilateral_air_entry",
            field=models.BooleanField(blank=True, default=None, null=True),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="blood_sugar_level",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(700),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="bp",
            field=django.contrib.postgres.fields.jsonb.JSONField(
                default=dict,
                validators=[
                    care.utils.models.validators.JSONFieldSchemaValidator(
                        {
                            "$schema": "http://json-schema.org/draft-07/schema#",
                            "additionalProperties": False,
                            "properties": {
                                "diastolic": {"type": "number"},
                                "mean": {"type": "number"},
                                "systolic": {"type": "number"},
                            },
                            "type": "array",
                        }
                    )
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="consciousness_level",
            field=models.IntegerField(
                choices=[
                    (0, "UNKNOWN"),
                    (5, "ALERT"),
                    (10, "DROWSY"),
                    (15, "STUPOROUS"),
                    (20, "COMATOSE"),
                    (25, "CANNOT_BE_ASSESSED"),
                ],
                default=0,
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="consciousness_level_detail",
            field=models.TextField(blank=True, default=None, null=True),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="dialysis_fluid_balance",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(700),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="dialysis_net_balance",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(700),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="etco2",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(200),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="feeds",
            field=django.contrib.postgres.fields.jsonb.JSONField(
                default=list,
                validators=[
                    care.utils.models.validators.JSONFieldSchemaValidator(
                        {
                            "$schema": "http://json-schema.org/draft-07/schema#",
                            "items": [
                                {
                                    "additionalProperties": False,
                                    "properties": {
                                        "name": {"type": "string"},
                                        "quantity": {"type": "number"},
                                    },
                                    "required": ["name", "quantity"],
                                    "type": "object",
                                }
                            ],
                            "type": "array",
                        }
                    )
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="glasgow_eye_open",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(1),
                    django.core.validators.MaxValueValidator(4),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="glasgow_motor_response",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(1),
                    django.core.validators.MaxValueValidator(6),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="glasgow_total_calculated",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(3),
                    django.core.validators.MaxValueValidator(15),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="glasgow_verbal_response",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(1),
                    django.core.validators.MaxValueValidator(5),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="hco3",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                default=None,
                max_digits=4,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(5),
                    django.core.validators.MaxValueValidator(80),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="infusions",
            field=django.contrib.postgres.fields.jsonb.JSONField(
                default=list,
                validators=[
                    care.utils.models.validators.JSONFieldSchemaValidator(
                        {
                            "$schema": "http://json-schema.org/draft-07/schema#",
                            "items": [
                                {
                                    "additionalProperties": False,
                                    "properties": {
                                        "name": {"type": "string"},
                                        "quantity": {"type": "number"},
                                    },
                                    "required": ["name", "quantity"],
                                    "type": "object",
                                }
                            ],
                            "type": "array",
                        }
                    )
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="insulin_intake_dose",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                default=None,
                max_digits=5,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(100),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="insulin_intake_frequency",
            field=models.IntegerField(
                choices=[(0, "UNKNOWN"), (5, "OD"), (10, "BD"), (15, "TD")], default=0
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="iv_fluids",
            field=django.contrib.postgres.fields.jsonb.JSONField(
                default=list,
                validators=[
                    care.utils.models.validators.JSONFieldSchemaValidator(
                        {
                            "$schema": "http://json-schema.org/draft-07/schema#",
                            "items": [
                                {
                                    "additionalProperties": False,
                                    "properties": {
                                        "name": {"type": "string"},
                                        "quantity": {"type": "number"},
                                    },
                                    "required": ["name", "quantity"],
                                    "type": "object",
                                }
                            ],
                            "type": "array",
                        }
                    )
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="lactate",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                default=None,
                max_digits=4,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(20),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="left_pupil_light_reaction",
            field=models.IntegerField(
                choices=[
                    (0, "UNKNOWN"),
                    (5, "BRISK"),
                    (10, "SLUGGISH"),
                    (15, "FIXED"),
                    (20, "CANNOT_BE_ASSESSED"),
                ],
                default=0,
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="left_pupil_light_reaction_detail",
            field=models.TextField(blank=True, default=None, null=True),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="left_pupil_size",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(8),
                ],
                verbose_name="Left Pupil Size",
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="left_pupil_size_detail",
            field=models.TextField(blank=True, default=None, null=True),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="limb_response_lower_extremity_left",
            field=models.IntegerField(
                choices=[
                    (0, "UNKNOWN"),
                    (5, "STRONG"),
                    (10, "MODERATE"),
                    (15, "WEAK"),
                    (20, "FLEXION"),
                    (25, "EXTENSION"),
                    (30, "NONE"),
                ],
                default=0,
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="limb_response_upper_extremity_left",
            field=models.IntegerField(
                choices=[
                    (0, "UNKNOWN"),
                    (5, "STRONG"),
                    (10, "MODERATE"),
                    (15, "WEAK"),
                    (20, "FLEXION"),
                    (25, "EXTENSION"),
                    (30, "NONE"),
                ],
                default=0,
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="limb_response_upper_extremity_right",
            field=models.IntegerField(
                choices=[
                    (0, "UNKNOWN"),
                    (5, "STRONG"),
                    (10, "MODERATE"),
                    (15, "WEAK"),
                    (20, "FLEXION"),
                    (25, "EXTENSION"),
                    (30, "NONE"),
                ],
                default=0,
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="nursing",
            field=django.contrib.postgres.fields.jsonb.JSONField(
                default=list,
                validators=[
                    care.utils.models.validators.JSONFieldSchemaValidator(
                        {
                            "$schema": "http://json-schema.org/draft-07/schema#",
                            "items": [
                                {
                                    "additionalProperties": False,
                                    "properties": {
                                        "description": {"type": "string"},
                                        "procedure": {"type": "string"},
                                    },
                                    "required": ["procedure", "description"],
                                    "type": "object",
                                }
                            ],
                            "type": "array",
                        }
                    )
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="output",
            field=django.contrib.postgres.fields.jsonb.JSONField(
                default=list,
                validators=[
                    care.utils.models.validators.JSONFieldSchemaValidator(
                        {
                            "$schema": "http://json-schema.org/draft-07/schema#",
                            "items": [
                                {
                                    "additionalProperties": False,
                                    "properties": {
                                        "name": {"type": "string"},
                                        "quantity": {"type": "number"},
                                    },
                                    "required": ["name", "quantity"],
                                    "type": "object",
                                }
                            ],
                            "type": "array",
                        }
                    )
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="pco2",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(10),
                    django.core.validators.MaxValueValidator(200),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ph",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                default=None,
                max_digits=4,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(10),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="po2",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(10),
                    django.core.validators.MaxValueValidator(400),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="potassium",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                default=None,
                max_digits=4,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(1),
                    django.core.validators.MaxValueValidator(10),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="pressure_sore",
            field=django.contrib.postgres.fields.jsonb.JSONField(
                default=list,
                validators=[
                    care.utils.models.validators.JSONFieldSchemaValidator(
                        {
                            "$schema": "http://json-schema.org/draft-07/schema#",
                            "items": [
                                {
                                    "additionalProperties": False,
                                    "properties": {
                                        "region": {"type": "string"},
                                        "scale": {
                                            "maximum": 5,
                                            "minimum": 1,
                                            "type": "number",
                                        },
                                    },
                                    "required": ["region", "scale"],
                                    "type": "object",
                                }
                            ],
                            "type": "array",
                        }
                    )
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="pulse",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(200),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="resp",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(10),
                    django.core.validators.MaxValueValidator(50),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="rhythm",
            field=models.IntegerField(
                choices=[(0, "UNKNOWN"), (5, "REGULAR"), (10, "IRREGULAR")], default=0
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="rhythm_detail",
            field=models.TextField(blank=True, default=None, null=True),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="right_pupil_light_reaction",
            field=models.IntegerField(
                choices=[
                    (0, "UNKNOWN"),
                    (5, "BRISK"),
                    (10, "SLUGGISH"),
                    (15, "FIXED"),
                    (20, "CANNOT_BE_ASSESSED"),
                ],
                default=0,
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="right_pupil_light_reaction_detail",
            field=models.TextField(blank=True, default=None, null=True),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="right_pupil_size",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(8),
                ],
                verbose_name="Right Pupil Size",
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="right_pupil_size_detail",
            field=models.TextField(blank=True, default=None, null=True),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="rounds_type",
            field=models.IntegerField(
                choices=[(0, "NORMAL"), (100, "VENTILATOR"), (200, "ICU")], default=0
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="sodium",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                default=None,
                max_digits=5,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(100),
                    django.core.validators.MaxValueValidator(170),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="taken_at",
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="total_intake_calculated",
            field=models.DecimalField(
                blank=True, decimal_places=2, default=None, max_digits=6, null=True
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="total_output",
            field=models.DecimalField(
                blank=True, decimal_places=2, default=None, max_digits=6, null=True
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_fi02",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(21),
                    django.core.validators.MaxValueValidator(100),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_interface",
            field=models.IntegerField(
                choices=[(0, "UNKNOWN"), (5, "INVASIVE"), (10, "NON_INVASIVE")],
                default=0,
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_mean_airway_pressure",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(40),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_mode",
            field=models.IntegerField(
                choices=[
                    (0, "UNKNOWN"),
                    (5, "VCV"),
                    (10, "PCV"),
                    (15, "PRVC"),
                    (20, "APRV"),
                    (25, "VC_SIMV"),
                    (30, "PC_SIMV"),
                    (40, "PRVC_SIMV"),
                    (45, "ASV"),
                    (50, "PSV"),
                ],
                default=0,
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_oxygen_modality",
            field=models.IntegerField(
                choices=[
                    (0, "UNKNOWN"),
                    (5, "NASAL_PRONGS"),
                    (10, "SIMPLE_FACE_MASK"),
                    (15, "NON_REBREATHING_MASK"),
                    (20, "HIGH_FLOW_NASAL_CANNULA"),
                ],
                default=0,
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_oxygen_modality_flow_rate",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(70),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_oxygen_modality_oxygen_rate",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(50),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_peep",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                default=None,
                max_digits=4,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(30),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_pip",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(100),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_pressure_support",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(40),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_resp_rate",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(100),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_spo2",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(100),
                ],
            ),
        ),
        migrations.AddField(
            model_name="dailyround",
            name="ventilator_tidal_volume",
            field=models.IntegerField(
                default=None,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(0),
                    django.core.validators.MaxValueValidator(1000),
                ],
            ),
        ),
        migrations.AlterField(
            model_name="dailyround",
            name="temperature",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                default=None,
                max_digits=5,
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(95),
                    django.core.validators.MaxValueValidator(106),
                ],
            ),
        ),
        migrations.AlterField(
            model_name="patientconsultation",
            name="lines",
            field=django.contrib.postgres.fields.jsonb.JSONField(
                default=list,
                validators=[
                    care.utils.models.validators.JSONFieldSchemaValidator(
                        {
                            "$schema": "http://json-schema.org/draft-07/schema#",
                            "items": [
                                {
                                    "additionalProperties": False,
                                    "properties": {
                                        "site": {"type": "string"},
                                        "start_date": {
                                            "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)((-(\\d{2}):(\\d{2})|Z)?)$",
                                            "type": "string",
                                        },
                                        "type": {"type": "string"},
                                    },
                                    "required": ["start_date", "type", "site"],
                                    "type": "object",
                                }
                            ],
                            "type": "array",
                        }
                    )
                ],
            ),
        ),
    ]
