diff --git a/effect_ae/admin/death_report_admin.py b/effect_ae/admin/death_report_admin.py index fbd8c92..caa7ab6 100644 --- a/effect_ae/admin/death_report_admin.py +++ b/effect_ae/admin/death_report_admin.py @@ -50,6 +50,7 @@ class DeathReportAdmin(SiteModelAdminMixin, DeathReportModelAdminMixin, SimpleHi "headache", "drowsy_confused_altered_behaviour", "seizures", + "blurred_vision", "nok_narrative", ) }, @@ -63,6 +64,7 @@ class DeathReportAdmin(SiteModelAdminMixin, DeathReportModelAdminMixin, SimpleHi ) radio_fields = { + "blurred_vision": admin.VERTICAL, "cause_of_death": admin.VERTICAL, "clinical_notes_available": admin.VERTICAL, "cm_sx": admin.VERTICAL, diff --git a/effect_ae/migrations/0017_deathreport_blurred_vision_and_more.py b/effect_ae/migrations/0017_deathreport_blurred_vision_and_more.py new file mode 100644 index 0000000..17cfd0d --- /dev/null +++ b/effect_ae/migrations/0017_deathreport_blurred_vision_and_more.py @@ -0,0 +1,42 @@ +# Generated by Django 4.2.6 on 2023-11-01 12:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("effect_ae", "0016_alter_aefollowup_options_alter_aeinitial_options_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="deathreport", + name="blurred_vision", + field=models.CharField( + choices=[ + ("Yes", "Yes"), + ("No", "No"), + ("unknown", "Unknown"), + ("N/A", "Not applicable"), + ], + max_length=25, + null=True, + verbose_name="If YES, did they complain of blurred vision?", + ), + ), + migrations.AddField( + model_name="historicaldeathreport", + name="blurred_vision", + field=models.CharField( + choices=[ + ("Yes", "Yes"), + ("No", "No"), + ("unknown", "Unknown"), + ("N/A", "Not applicable"), + ], + max_length=25, + null=True, + verbose_name="If YES, did they complain of blurred vision?", + ), + ), + ] diff --git a/effect_ae/migrations/0018_alter_deathreport_blurred_vision_and_more.py b/effect_ae/migrations/0018_alter_deathreport_blurred_vision_and_more.py new file mode 100644 index 0000000..56d1147 --- /dev/null +++ b/effect_ae/migrations/0018_alter_deathreport_blurred_vision_and_more.py @@ -0,0 +1,44 @@ +# Generated by Django 4.2.6 on 2023-11-01 12:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("effect_ae", "0017_deathreport_blurred_vision_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="deathreport", + name="blurred_vision", + field=models.CharField( + choices=[ + ("Yes", "Yes"), + ("No", "No"), + ("unknown", "Unknown"), + ("N/A", "Not applicable"), + ], + default="N/A", + max_length=25, + null=True, + verbose_name="If YES, did they complain of blurred vision?", + ), + ), + migrations.AlterField( + model_name="historicaldeathreport", + name="blurred_vision", + field=models.CharField( + choices=[ + ("Yes", "Yes"), + ("No", "No"), + ("unknown", "Unknown"), + ("N/A", "Not applicable"), + ], + default="N/A", + max_length=25, + null=True, + verbose_name="If YES, did they complain of blurred vision?", + ), + ), + ] diff --git a/effect_ae/model_mixins/death_report_model_mixin.py b/effect_ae/model_mixins/death_report_model_mixin.py index b971ff5..db7b206 100644 --- a/effect_ae/model_mixins/death_report_model_mixin.py +++ b/effect_ae/model_mixins/death_report_model_mixin.py @@ -75,6 +75,15 @@ class DeathReportModelMixin(models.Model): default=NOT_APPLICABLE, ) + blurred_vision = models.CharField( + verbose_name="If YES, did they complain of blurred vision?", + max_length=25, + choices=YES_NO_UNKNOWN_NA, + null=True, + blank=False, + default=NOT_APPLICABLE, + ) + nok_narrative = models.TextField( verbose_name="Next of kin narrative", null=True,