Skip to content

Commit

Permalink
Merge branch 'feat/706-add-blurred-vision-death-report' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanWillitts committed Nov 7, 2023
2 parents 569a3fc + 6cd87ba commit 54ec67e
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
2 changes: 2 additions & 0 deletions effect_ae/admin/death_report_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class DeathReportAdmin(SiteModelAdminMixin, DeathReportModelAdminMixin, SimpleHi
"headache",
"drowsy_confused_altered_behaviour",
"seizures",
"blurred_vision",
"nok_narrative",
)
},
Expand All @@ -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,
Expand Down
42 changes: 42 additions & 0 deletions effect_ae/migrations/0017_deathreport_blurred_vision_and_more.py
Original file line number Diff line number Diff line change
@@ -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?",
),
),
]
Original file line number Diff line number Diff line change
@@ -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?",
),
),
]
9 changes: 9 additions & 0 deletions effect_ae/model_mixins/death_report_model_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 54ec67e

Please sign in to comment.