Skip to content

Commit

Permalink
Add Death Report form validation (further to #706)
Browse files Browse the repository at this point in the history
...also:
- bump to `effect-form-validators==0.1.36`
- remove dead code
  • Loading branch information
JonathanWillitts committed Nov 7, 2023
1 parent 11037e5 commit 91922e4
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 90 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ Changes

unreleased
------
- updates to Death Report form (#706)
- add 'blurred_vision' question to Death Report (#706)
- increase trial specific form validation
- update forms reference doc
- bump to effect-form-validators 0.1.36

0.1.39
------
Expand Down
3 changes: 3 additions & 0 deletions effect_ae/forms/death_report_form.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from django import forms
from edc_adverse_event.modelform_mixins import DeathReportModelFormMixin
from effect_form_validators.effect_ae import DeathReportFormValidator

from ..models import DeathReport


class DeathReportForm(DeathReportModelFormMixin, forms.ModelForm):
form_validator_cls = DeathReportFormValidator

class Meta(DeathReportModelFormMixin.Meta):
model = DeathReport
fields = "__all__"
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Generated by Django 4.2.6 on 2023-11-07 13:06

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("effect_ae", "0018_alter_deathreport_blurred_vision_and_more"),
]

operations = [
migrations.AlterField(
model_name="deathreport",
name="clinical_notes_available",
field=models.CharField(
choices=[("Yes", "Yes"), ("No", "No"), ("N/A", "Not applicable")],
default="N/A",
help_text="If YES, include details of admission in narrative",
max_length=15,
verbose_name="If died as inpatient, are clinical notes available to study staff?",
),
),
migrations.AlterField(
model_name="historicaldeathreport",
name="clinical_notes_available",
field=models.CharField(
choices=[("Yes", "Yes"), ("No", "No"), ("N/A", "Not applicable")],
default="N/A",
help_text="If YES, include details of admission in narrative",
max_length=15,
verbose_name="If died as inpatient, are clinical notes available to study staff?",
),
),
]
2 changes: 1 addition & 1 deletion effect_ae/model_mixins/death_report_model_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DeathReportModelMixin(models.Model):
)

clinical_notes_available = models.CharField(
verbose_name="If YES, are clinical notes available to study staff?",
verbose_name="If died as inpatient, are clinical notes available to study staff?",
max_length=15,
choices=YES_NO_NA,
default=NOT_APPLICABLE,
Expand Down
2 changes: 0 additions & 2 deletions effect_prn/form_validators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
from .death_report import DeathReportFormValidator
from .end_of_study import EndOfStudyFormValidator
from .protocol_deviation_violation import ProtocolDeviationViolationFormValidator
from .study_day_form_validator_mixin import StudyDayFormValidatorMixin
29 changes: 0 additions & 29 deletions effect_prn/form_validators/death_report.py

This file was deleted.

57 changes: 0 additions & 57 deletions effect_prn/form_validators/study_day_form_validator_mixin.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ install_requires =
edc-microbiology==0.1.15
edc-csf==0.1.20
beautifulsoup4
effect-form-validators==0.1.35
effect-form-validators==0.1.36

[options.packages.find]
exclude =
Expand Down

0 comments on commit 91922e4

Please sign in to comment.