# Generated by Django 4.2.2 on 2023-11-12 20:20

import datetime
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import medic.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('baseapp', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='medic_inhouse',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('drug_name', models.CharField(help_text='Enter the drug name', max_length=50, null=True, verbose_name='Drug Name')),
                ('drug_tamil', models.CharField(blank=True, help_text='மருந்தின் பெயரை உள்ளிடவும்', max_length=75, null=True, verbose_name='மருந்து பெயர்')),
                ('drug_details', models.TextField(blank=True, help_text='Enter the drug in details', max_length=150, null=True, verbose_name='Details')),
                ('Preparations_type', models.CharField(help_text='Enter the drug preparation', max_length=50, null=True, verbose_name='Preparation Type')),
                ('group', models.CharField(blank=True, help_text='Enter the group (optional)', max_length=50, null=True, verbose_name='Drug Group')),
                ('source_type', models.CharField(blank=True, help_text='the details of how it is made', max_length=50, null=True, verbose_name='Source Type')),
                ('packaging', models.CharField(blank=True, help_text='Packing Size', max_length=25, null=True, verbose_name='Packing Size')),
                ('unit_amount', models.FloatField(blank=True, help_text='Unit Price ', null=True, verbose_name='Unit Price')),
                ('date_modified', models.DateTimeField(default=django.utils.timezone.now)),
                ('date_created', models.DateTimeField(auto_now_add=True, null=True)),
                ('fk_GST', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='baseapp.master_gst')),
                ('fk_employee', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='baseapp.employee')),
                ('fk_system', models.ForeignKey(help_text='Enter the drug system', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='baseapp.zone_system', verbose_name='System')),
            ],
        ),
        migrations.CreateModel(
            name='medications',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('drug_name', models.CharField(blank=True, help_text='Enter the drug name', max_length=50, null=True, verbose_name=' Drug Name (optional)- apart from listed medicine')),
                ('accept', models.BooleanField(blank=True, null=True, verbose_name='Accept')),
                ('dose', models.IntegerField(blank=True, help_text='Enter the unit of dosage', null=True, verbose_name='Dose')),
                ('units', models.CharField(blank=True, choices=[('Capsule', 'Capsule'), ('Tablet', 'Tablet'), ('ml', 'ml'), ('mg', 'mg'), ('IU', 'IU'), ('Drop', 'Drop'), ('Tablespoon', 'Tablespoon'), ('Teaspoon', 'Teaspoon'), ('Unit(s)', 'Unit(s)'), ('Others', 'Others')], help_text='Select unit for dosage ', max_length=20, null=True, verbose_name=' Units')),
                ('frequency', models.CharField(blank=True, choices=[('Immediately', 'Immediately'), ('Once a day', 'Once a day'), ('Twice a day', 'Twice a day'), ('Thrice a day', 'Thrice a day'), ('Four times a day', 'Four times a day'), ('Every Hour', 'Every Hour'), ('Every 2 hours', 'Every 2 hours'), ('Every 3 hours', 'Every 3 hours'), ('Every 4 hours', 'Every 4 hours'), ('Every 6 hours', 'Every 6 hours'), ('Every 8 hours', 'Every 8 hours'), ('Every 12 hours', 'Every 12 hours'), ('On alternate days', 'On alternate days'), ('Once a week', 'Once a week'), ('Twice a week', 'Twice a week'), ('  Once a month', '  Once a month'), ('Six days a week', 'Six days a week'), ('Every 2 weeks', 'Every 2 weeks'), ('Every 3 weeks', 'Every 3 weeks'), ('Five times a day', 'Five times a day'), ('Four days a week', 'Four days a week'), ('Five days a week', 'Five days a week')], help_text='Select frequency', max_length=20, null=True, verbose_name='Frequency')),
                ('route', models.CharField(blank=True, choices=[('Intramuscular', 'Intramuscular'), ('Nasal', 'Nasal'), ('Topical', 'Topical'), ('Intraosseous', 'Intraosseous'), ('Intrathecalan', 'Intrathecalan'), ('Intraperitoneal', 'Intraperitoneal'), ('Intradermal', 'Intradermal'), ('Nasogastric', 'Nasogastric'), ('Sub Lingual', 'Sub Lingual'), ('Per Rectum', 'Per Rectum'), ('Sub Cutaneous', 'Sub Cutaneous'), ('Per Vaginal', 'Per Vaginal'), ('Oral', 'Oral'), ('Intravenous', 'Intravenous'), ('Inhalation', 'Inhalation')], help_text='Select route of drug ', max_length=20, null=True, verbose_name='Route')),
                ('starting_date', models.DateField(default=datetime.datetime.today, help_text='Enter start date', verbose_name=' Start Date')),
                ('duration', models.IntegerField(blank=True, help_text='Duration of dosage', null=True, verbose_name='Duration')),
                ('days_unit', models.CharField(blank=True, choices=[('Days', 'Days'), ('Weeks', 'Weeks'), ('Months', 'Months')], help_text='Select duration of dose ', max_length=20, null=True, verbose_name='Maximum duration')),
                ('Ttl_qunaty', models.FloatField(blank=True, default=0.0, help_text='Total qunatity of dosage', null=True, verbose_name='Total Quantity')),
                ('ttl_units', models.CharField(blank=True, choices=[('Capsule', 'Capsule'), ('Tablet', 'Tablet'), ('ml', 'ml'), ('mg', 'mg'), ('IU', 'IU'), ('Drop', 'Drop'), ('Tablespoon', 'Tablespoon'), ('Teaspoon', 'Teaspoon'), ('Unit(s)', 'Unit(s)'), ('Others', 'Others')], help_text='Select unit for total quantity', max_length=20, null=True, verbose_name='Units')),
                ('additional_notes', models.TextField(blank=True, max_length=250, null=True, verbose_name='Additional Notes')),
                ('date_modified', models.DateTimeField(default=django.utils.timezone.now)),
                ('date_created', models.DateTimeField(auto_now_add=True, null=True)),
                ('fk_employee', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='baseapp.employee')),
                ('fk_med', models.ForeignKey(blank=True, help_text='Select the medicine - available in stock', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='medic.medic_inhouse', verbose_name='Medicine')),
                ('fk_patient', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='baseapp.patient')),
            ],
            options={
                'verbose_name_plural': 'Medications',
            },
        ),
        migrations.CreateModel(
            name='inventory_entry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dosage_unit', models.FloatField(help_text='Enter the dosage unit', validators=[medic.models.validate_InventoryUnit], verbose_name='Dosage Unit')),
                ('entry_type', models.CharField(choices=[('Billed', 'Billed'), ('Goods Recieved', 'Goods Recieved'), ('Damaged', 'Damaged'), ('Expired', 'Expired')], default='Goods Recieved', help_text='Select entry type from the list', max_length=20, verbose_name='Entry Type')),
                ('entry_details', models.TextField(blank=True, help_text='Entry details like lot # or Batch # can be mentioned here.', max_length=250, null=True, verbose_name='Details')),
                ('date_modified', models.DateTimeField(default=django.utils.timezone.now)),
                ('date_created', models.DateTimeField(auto_now_add=True, null=True)),
                ('fk_employee', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='baseapp.employee')),
                ('fk_med', models.ForeignKey(help_text='Select the medicine', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='medic.medic_inhouse', verbose_name='Medicine')),
                ('fk_patient', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='baseapp.patient')),
            ],
        ),
    ]
