Skip to content
This repository has been archived by the owner on Mar 15, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/0.1.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 18, 2020
2 parents ad19bad + 53e6f4d commit 4111037
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.12
0.1.13
1 change: 1 addition & 0 deletions meta_prn/admin/end_of_study_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class EndOfStudyAdmin(ModelAdminSubjectDashboardMixin, SimpleHistoryAdmin):
"subject_identifier",
"offschedule_datetime",
"offschedule_reason",
"other_offschedule_reason",
"death_date",
)
},
Expand Down
16 changes: 11 additions & 5 deletions meta_prn/form_validators/end_of_study.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from edc_consent.constants import CONSENT_WITHDRAWAL
from edc_constants.constants import DEAD
from edc_constants.constants import DEAD, OTHER
from edc_form_validators import FormValidator


Expand All @@ -11,22 +11,28 @@ def clean(self):

self.validate_death_report_if_deceased()

self.required_if(DEAD, field="termination_reason", field_required="death_date")
self.validate_other_specify(
field="offschedule_reason",
other_specify_field="other_offschedule_reason",
other_stored_value=OTHER,
)

self.required_if(DEAD, field="offschedule_reason", field_required="death_date")

self.required_if(
CONSENT_WITHDRAWAL,
field="termination_reason",
field="offschedule_reason",
field_required="consent_withdrawal_reason",
)

self.required_if(
"included_in_error",
field="termination_reason",
field="offschedule_reason",
field_required="included_in_error",
)

self.required_if(
"included_in_error",
field="termination_reason",
field="offschedule_reason",
field_required="included_in_error_date",
)

0 comments on commit 4111037

Please sign in to comment.