# Generated by Django 4.2.14 on 2025-01-08 11:41

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


class Migration(migrations.Migration):

    dependencies = [
        ('healthcareservices', '0003_alter_healthcareservicereference_healthcare_service'),
        ('locations', '0001_initial'),
        ('medicationrequests', '0002_initial'),
        ('patients', '0003_alter_patient_communication_and_more'),
        ('servicerequests', '0001_initial'),
        ('observations', '0002_initial'),
        ('practitioners', '0007_remove_practitionerrole_availability_and_more'),
        ('base', '0003_communication'),
        ('appointments', '0004_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AppointmentReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CPlanDRqstMRqstSRqstROrchNOrderVPrescIRecomRef',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='cplan_drqst_mrqst_srqst_rorch_norder_vpresc_irecom_identifier', to='base.identifier')),
                ('medication_request', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='cplan_drqst_mrqst_srqst_rorch_norder_vpresc_irecom_medication_request', to='medicationrequests.medicationrequest')),
                ('service_request', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='cplan_drqst_mrqst_srqst_rorch_norder_vpresc_irecom_service_request', to='servicerequests.servicerequest')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CProcObImmunRecCodedableReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('concept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='cproc_ob_immun_rec_codedable_concept', to='base.codeableconcept')),
                ('observation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='cproc_ob_immun_rec_codedable_observation', to='observations.observation')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CProcObImmunRecReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='cproc_ob_immun_rec_reference_identifier', to='base.identifier')),
                ('observation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='cproc_ob_immun_rec_reference_observation', to='observations.observation')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DocumentReferenceBinaryCommunicationReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='document_reference_binary_communication_reference_identifier', to='base.identifier')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PatGrpPrctPrctRlCareTmRelPerDvHlCaSerLocRef',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('healthcareservice', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='pat_grp_prct_prct_rl_care_tm_rel_per_dv_hl_ca_ser_loc_ref_healthcareservice', to='healthcareservices.healthcareservice')),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='pat_grp_prct_prct_rl_care_tm_rel_per_dv_hl_ca_ser_loc_ref_identifier', to='base.identifier')),
                ('location', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='pat_grp_prct_prct_rl_care_tm_rel_per_dv_hl_ca_ser_loc_ref_location', to='locations.location')),
                ('patient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='pat_grp_prct_prct_rl_care_tm_rel_per_dv_hl_ca_ser_loc_ref_patient', to='patients.patient')),
                ('practitioner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='pat_grp_prct_prct_rl_care_tm_rel_per_dv_hl_ca_ser_loc_ref_practitioner', to='practitioners.practitioner')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.RemoveField(
            model_name='appointmentactor',
            name='healthcareservice',
        ),
        migrations.RemoveField(
            model_name='appointmentactor',
            name='location',
        ),
        migrations.RemoveField(
            model_name='appointmentactor',
            name='patient',
        ),
        migrations.RemoveField(
            model_name='appointmentactor',
            name='practitioner',
        ),
        migrations.DeleteModel(
            name='AppointmentCancellationReason',
        ),
        migrations.DeleteModel(
            name='AppointmentPatientInstructionReference',
        ),
        migrations.RemoveField(
            model_name='appointmentsubject',
            name='patient',
        ),
        migrations.RemoveField(
            model_name='patientinstructioncodeablereference',
            name='codeable_concept',
        ),
        migrations.RemoveField(
            model_name='patientinstructioncodeablereference',
            name='reference',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='account',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='based_on',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='identifier',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='klass',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='note',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='originating_appointment',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='participant',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='patient_instruction',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='previous_appointment',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='reason',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='replaces',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='requested_period',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='service_category',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='service_type',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='slot',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='specialty',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='subject',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='supporting_information',
        ),
        migrations.RemoveField(
            model_name='appointment',
            name='virtual_service_details',
        ),
        migrations.AlterField(
            model_name='monthlytemplate',
            name='day_of_week',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='monthly_template_day_of_week', to='base.coding'),
        ),
        migrations.AlterField(
            model_name='monthlytemplate',
            name='nth_week_of_month',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='monthly_template_nth_week_of_month', to='base.coding'),
        ),
        migrations.DeleteModel(
            name='AppointmentBasedOn',
        ),
        migrations.DeleteModel(
            name='AppointmentSubject',
        ),
        migrations.DeleteModel(
            name='PatientInstructionCodeableReference',
        ),
        migrations.AddField(
            model_name='cprocobimmunreccodedablereference',
            name='reference',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='cproc_ob_immun_rec_codedable', to='appointments.cprocobimmunrecreference'),
        ),
        migrations.AddField(
            model_name='appointmentreference',
            name='appointment',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_reference_appointment', to='appointments.appointment'),
        ),
        migrations.AddField(
            model_name='appointmentreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='appointment_reference_identifier', to='base.identifier'),
        ),
        migrations.AlterField(
            model_name='appointmentparticipant',
            name='actor',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='participant_actor', to='appointments.patgrpprctprctrlcaretmrelperdvhlcaserlocref'),
        ),
        migrations.DeleteModel(
            name='AppointmentActor',
        ),
    ]
