# Generated by Django 2.2.28 on 2025-06-08 01:14

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


class Migration(migrations.Migration):

    dependencies = [
        ('reservation', '0005_auto_20250605_0944'),
    ]

    operations = [
        migrations.CreateModel(
            name='LabReport',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('normal_count', models.IntegerField(default=0)),
                ('abnormal_count', models.IntegerField(default=0)),
                ('critical_count', models.IntegerField(default=0)),
                ('pending_count', models.IntegerField(default=0)),
                ('surgical_clearance', models.CharField(choices=[('cleared', 'Cleared for Surgery'), ('conditional', 'Conditional - Requires Review'), ('not_cleared', 'Not Cleared - Critical Values')], default='conditional', max_length=15)),
                ('physician_notes', models.TextField(blank=True, null=True)),
                ('recommendations', models.TextField(blank=True, null=True)),
                ('report_date', models.DateField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reservation', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='lab_report', to='reservation.Reservation')),
            ],
        ),
        migrations.CreateModel(
            name='LabTest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('panel_type', models.CharField(choices=[('CBC', 'Complete Blood Count'), ('HORMONES', 'Hormonal Tests'), ('COAGULATION', 'Coagulation Studies'), ('BLOOD_TYPE', 'Blood Typing'), ('VIRAL_MARKERS', 'Viral Screening'), ('BIOCHEMISTRY', 'Clinical Chemistry'), ('GLUCOSE', 'Glucose Metabolism'), ('LIPID_PROFILE', 'Lipid Profile'), ('PREGNANCY', 'Pregnancy Test')], max_length=20)),
                ('test_name', models.CharField(max_length=100)),
                ('test_code', models.CharField(max_length=20)),
                ('result_value', models.CharField(blank=True, max_length=50, null=True)),
                ('unit', models.CharField(blank=True, max_length=20, null=True)),
                ('normal_range_min', models.FloatField(blank=True, null=True)),
                ('normal_range_max', models.FloatField(blank=True, null=True)),
                ('status', models.CharField(choices=[('normal', 'Normal'), ('abnormal', 'Abnormal'), ('critical', 'Critical'), ('pending', 'Pending')], default='pending', max_length=10)),
                ('is_critical', models.BooleanField(default=False)),
                ('notes', models.TextField(blank=True, null=True)),
                ('test_date', models.DateField(auto_now_add=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reservation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lab_tests', to='reservation.Reservation')),
            ],
            options={
                'ordering': ['panel_type', 'test_code'],
                'unique_together': {('reservation', 'test_code')},
            },
        ),
    ]
