Skip to content

Commit

Permalink
Fixed Study/Project and Enrollment choice objects
Browse files Browse the repository at this point in the history
  • Loading branch information
b32147 committed Jan 30, 2019
1 parent 6e7506d commit e217c57
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ppmutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

__title__ = 'PPM Utils'
__version__ = '0.3.2'
__version__ = '0.3.3'
__author__ = 'Bryan Larson'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2011-2018 Harvard Medical School Department of Biomedical Informatics'
Expand Down
28 changes: 16 additions & 12 deletions ppmutils/ppm.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ def title(study):
[PPM.Study.ASD.value, f'ppm-{PPM.Study.ASD.value}', 'asd']:
return 'Autism'

CHOICES = (
(NEER, 'NEER'),
(ASD, 'Autism'),
)
@staticmethod
def choices():
return (
(PPM.Study.NEER.value, PPM.Study.title(PPM.Study.NEER.value)),
(PPM.Study.ASD.value, PPM.Study.title(PPM.Study.ASD.value)),
)

# Alias Project as Study until we migrate all usages to Study
Project = Study
Expand All @@ -124,14 +126,16 @@ class Enrollment(Enum):
Ineligible = 'ineligible'
Terminated = 'terminated'

CHOICES = (
(Registered, 'Registered'),
(Consented, 'Consented'),
(Proposed, 'Proposed'),
(Accepted, 'Accepted'),
(Ineligible, 'Ineligible'),
(Terminated, 'Finished'),
)
@staticmethod
def choices():
return (
(PPM.Enrollment.Registered.value, 'Registered'),
(PPM.Enrollment.Consented.value, 'Consented'),
(PPM.Enrollment.Proposed.value, 'Proposed'),
(PPM.Enrollment.Accepted.value, 'Accepted'),
(PPM.Enrollment.Ineligible.value, 'Ineligible'),
(PPM.Enrollment.Terminated.value, 'Finished'),
)

class Questionnaire(Enum):
ASDGuardianConsentQuestionnaire = 'ppm-asd-consent-guardian-quiz'
Expand Down

0 comments on commit e217c57

Please sign in to comment.