-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Death Report form validation (further to #706)
...also: - bump to `effect-form-validators==0.1.36` - remove dead code
- Loading branch information
1 parent
11037e5
commit 91922e4
Showing
8 changed files
with
43 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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__" |
34 changes: 34 additions & 0 deletions
34
effect_ae/migrations/0019_alter_deathreport_clinical_notes_available_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
effect_prn/form_validators/study_day_form_validator_mixin.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters