# Generated by Django 5.2 on 2025-04-23 12:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('base', '0005_initial'),
        ('groups', '0001_initial'),
        ('organizations', '0001_initial'),
        ('patients', '0001_initial'),
        ('practitioners', '0001_initial'),
        ('relatedpersons', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='patient',
            name='general_practitioner',
            field=models.ManyToManyField(blank=True, related_name='patient_general_practitioner', to='practitioners.practitionerorganizationpractitionerrolereference'),
        ),
        migrations.AddField(
            model_name='patient',
            name='identifier',
            field=models.ManyToManyField(blank=True, related_name='patient_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='patient',
            name='managing_organization',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='patient_managing_organization', to='base.organizationreference'),
        ),
        migrations.AddField(
            model_name='patient',
            name='marital_status',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='patient_marital_status', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='patient',
            name='name',
            field=models.ManyToManyField(blank=True, related_name='patient_name', to='base.humanname'),
        ),
        migrations.AddField(
            model_name='patient',
            name='photo',
            field=models.ManyToManyField(blank=True, related_name='patient_photo', to='base.attachment'),
        ),
        migrations.AddField(
            model_name='patient',
            name='telecom',
            field=models.ManyToManyField(blank=True, related_name='patient_telecom', to='base.contactpoint'),
        ),
        migrations.AddField(
            model_name='patientcontact',
            name='address',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_contact_address', to='base.address'),
        ),
        migrations.AddField(
            model_name='patientcontact',
            name='name',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_contact_name', to='base.humanname'),
        ),
        migrations.AddField(
            model_name='patientcontact',
            name='organization',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='patient_contact_organization', to='base.organizationreference'),
        ),
        migrations.AddField(
            model_name='patientcontact',
            name='period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_contact_period', to='base.period'),
        ),
        migrations.AddField(
            model_name='patientcontact',
            name='relationship',
            field=models.ManyToManyField(blank=True, related_name='patient_contact_relationship', to='base.codeableconcept'),
        ),
        migrations.AddField(
            model_name='patientcontact',
            name='telecom',
            field=models.ManyToManyField(blank=True, related_name='patient_contact_telecom', to='base.contactpoint'),
        ),
        migrations.AddField(
            model_name='patient',
            name='contact',
            field=models.ManyToManyField(blank=True, related_name='patient_contact', to='patients.patientcontact'),
        ),
        migrations.AddField(
            model_name='patientgroupreference',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_group_reference_group', to='groups.group'),
        ),
        migrations.AddField(
            model_name='patientgroupreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_group_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='patientgroupreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_group_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='patientorganizationreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patient_organization_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='patientorganizationreference',
            name='organization',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patient_organization_reference_organization', to='organizations.organization'),
        ),
        migrations.AddField(
            model_name='patientorganizationreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patient_organization_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='patientpractitionerreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patient_practitioner_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='patientpractitionerreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patient_practitioner_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='patientpractitionerreference',
            name='practitioner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patient_practitioner_reference_practitioner', to='practitioners.practitioner'),
        ),
        migrations.AddField(
            model_name='patientreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='patientreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='patientrelatedpersonreference',
            name='identifier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_related_person_reference_identifier', to='base.identifier'),
        ),
        migrations.AddField(
            model_name='patientrelatedpersonreference',
            name='patient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_related_person_reference_patient', to='patients.patient'),
        ),
        migrations.AddField(
            model_name='patientrelatedpersonreference',
            name='related_person',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_related_person_reference_related_person', to='relatedpersons.relatedperson'),
        ),
        migrations.AddField(
            model_name='patientlink',
            name='other',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patient_link_other', to='patients.patientrelatedpersonreference'),
        ),
    ]
