Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surveys #454

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2b1b098
Add the Nottingham EADL Scale and the Stroke Impact Scale (validated,…
md0u80c9 Sep 12, 2015
897ece6
Merge branch 'master' into NottinghamEADL
md0u80c9 Sep 12, 2015
0e1049a
Merged changes from master branch
md0u80c9 Sep 12, 2015
132d10a
Add the Epworth Sleep scale to surveys.
md0u80c9 Sep 12, 2015
ce490ef
Epworth sleep scale added including feedback on results.
md0u80c9 Sep 13, 2015
8c2a642
Minor tweak to improve the documentation
md0u80c9 Sep 13, 2015
ae5baec
Sleep scale responses are now fixed as compulsory (otherwise the scal…
md0u80c9 Sep 13, 2015
3ad8ef4
Added the IQCDE (Short Form of the Informant Questionnaire on Cogniti…
md0u80c9 Sep 13, 2015
29b40dc
Added the Rivermead mobility index
md0u80c9 Sep 13, 2015
d19dde7
Bugfix: StrokeImpactScale answers were not set to values - all answer…
md0u80c9 Sep 13, 2015
362d1af
Changes to reflect the RK style guide, added licensing and formatting…
md0u80c9 Sep 14, 2015
a13fba2
Merge remote-tracking branch 'ResearchKit/master' into Surveys
md0u80c9 Sep 14, 2015
475badb
PrebuiltSurvey changes to ValidatedSurvey to reflect that these are v…
md0u80c9 Sep 16, 2015
6a8aa18
Changed to ValidatedSurveys from PrebuiltSurveys
md0u80c9 Sep 16, 2015
3ce6e9a
Oops - updated the enum but not the ValidatedSurveyTask function in O…
md0u80c9 Sep 16, 2015
9b15139
Revert "Changed to ValidatedSurveys from PrebuiltSurveys"
md0u80c9 Sep 16, 2015
5a4c0e0
ValidatedSurveyTask changed to validatedSurveyTask (lowercase)
md0u80c9 Sep 16, 2015
43b5ff9
Missing end lines corrected (from review by Umer Khan).
md0u80c9 Sep 22, 2015
42d28b8
Whitespace around binary operators
md0u80c9 Sep 23, 2015
86ab025
Merge remote-tracking branch 'ResearchKit/master' into Surveys
md0u80c9 Sep 26, 2015
4b3ee76
Style changes
md0u80c9 Sep 29, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions ResearchKit.xcodeproj/project.pbxproj
Expand Up @@ -362,6 +362,16 @@
86CC8EBA1AC09383001CCD89 /* ORKResultTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 86CC8EAF1AC09383001CCD89 /* ORKResultTests.m */; };
86CC8EBB1AC09383001CCD89 /* ORKTextChoiceCellGroupTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 86CC8EB01AC09383001CCD89 /* ORKTextChoiceCellGroupTests.m */; };
86D348021AC161B0006DB02B /* ORKRecorderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 86D348001AC16175006DB02B /* ORKRecorderTests.m */; };
A201A0CB1BA1065100B7EEDC /* ORKNottinghamEADL.h in Headers */ = {isa = PBXBuildFile; fileRef = A201A0C91BA1065100B7EEDC /* ORKNottinghamEADL.h */; };
A201A0CC1BA1065100B7EEDC /* ORKNottinghamEADL.m in Sources */ = {isa = PBXBuildFile; fileRef = A201A0CA1BA1065100B7EEDC /* ORKNottinghamEADL.m */; };
A201A0CF1BA10BB400B7EEDC /* ORKStrokeImpactScale.h in Headers */ = {isa = PBXBuildFile; fileRef = A201A0CD1BA10BB400B7EEDC /* ORKStrokeImpactScale.h */; };
A201A0D01BA10BB400B7EEDC /* ORKStrokeImpactScale.m in Sources */ = {isa = PBXBuildFile; fileRef = A201A0CE1BA10BB400B7EEDC /* ORKStrokeImpactScale.m */; };
A21DD4221BA4A60300081AD0 /* ORKEpworthSleepScale.h in Headers */ = {isa = PBXBuildFile; fileRef = A21DD4201BA4A60300081AD0 /* ORKEpworthSleepScale.h */; };
A21DD4231BA4A60300081AD0 /* ORKEpworthSleepScale.m in Sources */ = {isa = PBXBuildFile; fileRef = A21DD4211BA4A60300081AD0 /* ORKEpworthSleepScale.m */; };
A2BEF23A1BA5C58D00DEC82D /* ORKIQCDE.h in Headers */ = {isa = PBXBuildFile; fileRef = A2BEF2381BA5C58D00DEC82D /* ORKIQCDE.h */; };
A2BEF23B1BA5C58D00DEC82D /* ORKIQCDE.m in Sources */ = {isa = PBXBuildFile; fileRef = A2BEF2391BA5C58D00DEC82D /* ORKIQCDE.m */; };
A2BEF23E1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = A2BEF23C1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.h */; };
A2BEF23F1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.m in Sources */ = {isa = PBXBuildFile; fileRef = A2BEF23D1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.m */; };
B11C54991A9EEF8800265E61 /* ORKConsentSharingStep.h in Headers */ = {isa = PBXBuildFile; fileRef = B11C54961A9EEF8800265E61 /* ORKConsentSharingStep.h */; settings = {ATTRIBUTES = (Public, ); }; };
B11C549B1A9EEF8800265E61 /* ORKConsentSharingStep.m in Sources */ = {isa = PBXBuildFile; fileRef = B11C54971A9EEF8800265E61 /* ORKConsentSharingStep.m */; };
B11C549F1A9EF4A700265E61 /* ORKConsentSharingStepViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B11C549C1A9EF4A700265E61 /* ORKConsentSharingStepViewController.h */; settings = {ATTRIBUTES = (Private, ); }; };
Expand Down Expand Up @@ -812,6 +822,16 @@
86CC8EAF1AC09383001CCD89 /* ORKResultTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKResultTests.m; sourceTree = "<group>"; };
86CC8EB01AC09383001CCD89 /* ORKTextChoiceCellGroupTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKTextChoiceCellGroupTests.m; sourceTree = "<group>"; };
86D348001AC16175006DB02B /* ORKRecorderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ORKRecorderTests.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
A201A0C91BA1065100B7EEDC /* ORKNottinghamEADL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ORKNottinghamEADL.h; path = ResearchKit/SurveyTasks/ORKNottinghamEADL.h; sourceTree = SOURCE_ROOT; };
A201A0CA1BA1065100B7EEDC /* ORKNottinghamEADL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ORKNottinghamEADL.m; path = ResearchKit/SurveyTasks/ORKNottinghamEADL.m; sourceTree = SOURCE_ROOT; };
A201A0CD1BA10BB400B7EEDC /* ORKStrokeImpactScale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ORKStrokeImpactScale.h; path = ResearchKit/SurveyTasks/ORKStrokeImpactScale.h; sourceTree = SOURCE_ROOT; };
A201A0CE1BA10BB400B7EEDC /* ORKStrokeImpactScale.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ORKStrokeImpactScale.m; path = ResearchKit/SurveyTasks/ORKStrokeImpactScale.m; sourceTree = SOURCE_ROOT; };
A21DD4201BA4A60300081AD0 /* ORKEpworthSleepScale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ORKEpworthSleepScale.h; path = ResearchKit/SurveyTasks/ORKEpworthSleepScale.h; sourceTree = SOURCE_ROOT; };
A21DD4211BA4A60300081AD0 /* ORKEpworthSleepScale.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ORKEpworthSleepScale.m; path = ResearchKit/SurveyTasks/ORKEpworthSleepScale.m; sourceTree = SOURCE_ROOT; };
A2BEF2381BA5C58D00DEC82D /* ORKIQCDE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ORKIQCDE.h; path = ResearchKit/SurveyTasks/ORKIQCDE.h; sourceTree = SOURCE_ROOT; };
A2BEF2391BA5C58D00DEC82D /* ORKIQCDE.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ORKIQCDE.m; path = ResearchKit/SurveyTasks/ORKIQCDE.m; sourceTree = SOURCE_ROOT; };
A2BEF23C1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ORKRivermeadMobilityIndex.h; path = ResearchKit/SurveyTasks/ORKRivermeadMobilityIndex.h; sourceTree = SOURCE_ROOT; };
A2BEF23D1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ORKRivermeadMobilityIndex.m; path = ResearchKit/SurveyTasks/ORKRivermeadMobilityIndex.m; sourceTree = SOURCE_ROOT; };
B11C54961A9EEF8800265E61 /* ORKConsentSharingStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKConsentSharingStep.h; sourceTree = "<group>"; };
B11C54971A9EEF8800265E61 /* ORKConsentSharingStep.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKConsentSharingStep.m; sourceTree = "<group>"; };
B11C549C1A9EF4A700265E61 /* ORKConsentSharingStepViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKConsentSharingStepViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1160,6 +1180,7 @@
B1B894391A00345200C5CF2D /* ResearchKit_Private.h */,
86C40B511A8D7C5B00081FAC /* Common */,
86C40AF91A8D7C5B00081FAC /* ActiveTasks */,
A201A0C81BA1060200B7EEDC /* SurveyTasks */,
259E76FB1AFFAEAC0070F786 /* Charts */,
86C40BEB1A8D7C5C00081FAC /* Consent */,
618DA0471A93D0D600E63AA8 /* Accessibility */,
Expand Down Expand Up @@ -1240,6 +1261,24 @@
path = ResearchKitTests;
sourceTree = "<group>";
};
A201A0C81BA1060200B7EEDC /* SurveyTasks */ = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should rename this group to be ValidatedSurveys?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ambivalent towards this - I am happy to do so, but I had intended to match 'ActiveTasks' with 'SurveyTasks' so that the groups flowed (you might want to add some other sort of 'Task'.)

isa = PBXGroup;
children = (
A201A0C91BA1065100B7EEDC /* ORKNottinghamEADL.h */,
A201A0CA1BA1065100B7EEDC /* ORKNottinghamEADL.m */,
A201A0CD1BA10BB400B7EEDC /* ORKStrokeImpactScale.h */,
A201A0CE1BA10BB400B7EEDC /* ORKStrokeImpactScale.m */,
A21DD4201BA4A60300081AD0 /* ORKEpworthSleepScale.h */,
A21DD4211BA4A60300081AD0 /* ORKEpworthSleepScale.m */,
A2BEF2381BA5C58D00DEC82D /* ORKIQCDE.h */,
A2BEF2391BA5C58D00DEC82D /* ORKIQCDE.m */,
A2BEF23C1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.h */,
A2BEF23D1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.m */,
);
name = SurveyTasks;
path = Localized;
sourceTree = "<group>";
};
B11DF3B21AA109C8009E76D2 /* docs */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1995,6 +2034,7 @@
86C40D8E1A8D7C5C00081FAC /* ORKStep.h in Headers */,
618DA04E1A93D0D600E63AA8 /* ORKAccessibility.h in Headers */,
86B781BB1AA668ED00688151 /* ORKTimeIntervalPicker.h in Headers */,
A201A0CF1BA10BB400B7EEDC /* ORKStrokeImpactScale.h in Headers */,
86C40C6A1A8D7C5C00081FAC /* CMDeviceMotion+ORKJSONDictionary.h in Headers */,
86C40CE41A8D7C5C00081FAC /* ORKAnswerFormat.h in Headers */,
25ECC0951AFBD68300F3D63B /* ORKReactionTimeStep.h in Headers */,
Expand Down Expand Up @@ -2030,13 +2070,15 @@
86C40DA01A8D7C5C00081FAC /* ORKSurveyAnswerCell.h in Headers */,
86C40D941A8D7C5C00081FAC /* ORKStepViewController.h in Headers */,
B8760F2B1AFBEFB0007FA16F /* ORKScaleRangeDescriptionLabel.h in Headers */,
A2BEF23A1BA5C58D00DEC82D /* ORKIQCDE.h in Headers */,
86C40C221A8D7C5C00081FAC /* ORKCountdownStep.h in Headers */,
86C40DB61A8D7C5C00081FAC /* ORKSurveyAnswerCellForText.h in Headers */,
86C40E281A8D7C5C00081FAC /* ORKSignatureView.h in Headers */,
BCB6E65D1B7D534C000D5B34 /* ORKGraphChartView_Internal.h in Headers */,
86C40C8C1A8D7C5C00081FAC /* ORKActiveStepViewController.h in Headers */,
618DA0541A93D0D600E63AA8 /* UIView+ORKAccessibility.h in Headers */,
86C40C3A1A8D7C5C00081FAC /* ORKSpatialSpanGameState.h in Headers */,
A201A0CB1BA1065100B7EEDC /* ORKNottinghamEADL.h in Headers */,
10864CA21B27146B000F4158 /* ORKPSATContentView.h in Headers */,
618DA0501A93D0D600E63AA8 /* ORKAccessibilityFunctions.h in Headers */,
86C40C721A8D7C5C00081FAC /* CMPedometerData+ORKJSONDictionary.h in Headers */,
Expand Down Expand Up @@ -2079,6 +2121,7 @@
B183A4DD1A8535D100C76870 /* ResearchKit.h in Headers */,
86C40D101A8D7C5C00081FAC /* ORKDefaultFont.h in Headers */,
86C40E301A8D7C5C00081FAC /* ORKVisualConsentStepViewController.h in Headers */,
A2BEF23E1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.h in Headers */,
86C40DCA1A8D7C5C00081FAC /* ORKTaskViewController.h in Headers */,
86C40C7E1A8D7C5C00081FAC /* ORKActiveStep.h in Headers */,
BCB6E65E1B7D534C000D5B34 /* ORKGraphChartView.h in Headers */,
Expand Down Expand Up @@ -2109,6 +2152,7 @@
86C40C841A8D7C5C00081FAC /* ORKActiveStepTimer.h in Headers */,
86B781BD1AA668ED00688151 /* ORKValuePicker.h in Headers */,
86C40DE21A8D7C5C00081FAC /* ORKVerticalContainerView_Internal.h in Headers */,
A21DD4221BA4A60300081AD0 /* ORKEpworthSleepScale.h in Headers */,
BC01B0FB1B0EB99700863803 /* ORKTintedImageView_Internal.h in Headers */,
86B89ABE1AB3BFDB001626A4 /* ORKStepHeaderView_Internal.h in Headers */,
86C40C1E1A8D7C5C00081FAC /* ORKAudioStepViewController.h in Headers */,
Expand Down Expand Up @@ -2433,6 +2477,7 @@
86C40D4C1A8D7C5C00081FAC /* ORKLabel.m in Sources */,
86C40C9E1A8D7C5C00081FAC /* ORKDeviceMotionRecorder.m in Sources */,
86C40D961A8D7C5C00081FAC /* ORKStepViewController.m in Sources */,
A21DD4231BA4A60300081AD0 /* ORKEpworthSleepScale.m in Sources */,
86C40DF81A8D7C5C00081FAC /* ORKConsentSignatureController.m in Sources */,
BCB6E6531B7D533B000D5B34 /* ORKPieChartLegendCell.m in Sources */,
86C40D8C1A8D7C5C00081FAC /* ORKSkin.m in Sources */,
Expand Down Expand Up @@ -2501,13 +2546,15 @@
86C40CA21A8D7C5C00081FAC /* ORKHealthQuantityTypeRecorder.m in Sources */,
86C40DC01A8D7C5C00081FAC /* ORKTableViewCell.m in Sources */,
BC41942A1AE8453A00073D6B /* ORKObserver.m in Sources */,
A2BEF23B1BA5C58D00DEC82D /* ORKIQCDE.m in Sources */,
86C40C681A8D7C5C00081FAC /* CMAccelerometerData+ORKJSONDictionary.m in Sources */,
86C40C701A8D7C5C00081FAC /* CMMotionActivity+ORKJSONDictionary.m in Sources */,
147503B01AEE8071004B17F3 /* ORKAudioGenerator.m in Sources */,
86C40D7E1A8D7C5C00081FAC /* ORKScaleValueLabel.m in Sources */,
B12EA01A1B0D76AD00F9F554 /* ORKToneAudiometryPracticeStepViewController.m in Sources */,
86C40D901A8D7C5C00081FAC /* ORKStep.m in Sources */,
86C40D2E1A8D7C5C00081FAC /* ORKHeadlineLabel.m in Sources */,
A2BEF23F1BA5D26C00DEC82D /* ORKRivermeadMobilityIndex.m in Sources */,
FA7A9D341B0843A9005A2BEA /* ORKConsentSignatureFormatter.m in Sources */,
86C40CFC1A8D7C5C00081FAC /* ORKCaption1Label.m in Sources */,
86C40E001A8D7C5C00081FAC /* ORKConsentDocument.m in Sources */,
Expand Down Expand Up @@ -2547,6 +2594,7 @@
86AD91151AB7B97E00361FEB /* ORKQuestionStepView.m in Sources */,
10864CA11B27146B000F4158 /* ORKPSATStepViewController.m in Sources */,
86C40C5C1A8D7C5C00081FAC /* ORKWalkingTaskStep.m in Sources */,
A201A0CC1BA1065100B7EEDC /* ORKNottinghamEADL.m in Sources */,
257FCE241B4D37A80001EF06 /* ORKTowerOfHanoiTower.m in Sources */,
86C40C3C1A8D7C5C00081FAC /* ORKSpatialSpanGameState.m in Sources */,
86C40CF41A8D7C5C00081FAC /* ORKBodyLabel.m in Sources */,
Expand All @@ -2562,6 +2610,7 @@
24898B0E1B7186C000B0E7E7 /* ORKScaleRangeImageView.m in Sources */,
86C40DD81A8D7C5C00081FAC /* ORKUnitLabel.m in Sources */,
86C40D361A8D7C5C00081FAC /* ORKHelpers.m in Sources */,
A201A0D01BA10BB400B7EEDC /* ORKStrokeImpactScale.m in Sources */,
86C40C181A8D7C5C00081FAC /* ORKAudioContentView.m in Sources */,
86C40C8E1A8D7C5C00081FAC /* ORKActiveStepViewController.m in Sources */,
B183A5011A8535D100C76870 /* (null) in Sources */,
Expand Down
31 changes: 31 additions & 0 deletions ResearchKit/Common/ORKOrderedTask.h
Expand Up @@ -501,6 +501,37 @@ typedef NS_OPTIONS(NSUInteger, ORKPredefinedTaskOption) {
seriesLength:(NSInteger)seriesLength
options:(ORKPredefinedTaskOption)options;


typedef NS_ENUM(NSUInteger, ORKValidatedSurveyType) {
ORKValidatedSurveyTypeNottinghamEADL,
ORKValidatedSurveyTypeStrokeImpactScale,
ORKValidatedSurveyTypeEpworthSleepScale,
ORKValidatedSurveyTypeIQCDE,
ORKValidatedSurveyTypeRivermeadMobilityIndex
};


/**
Returns one of a number of prebuilt validated survey tools:

The Nottingham EADL Scale is a standardised survey for measuring function in terms of which daily activities a participant can undertake.
The Stroke Impact Scale is a more comprehensive survey looking at the impact of neurological injury on an individual.
The Epworth Sleepiness Scale is a validated survey tool which screens for underlying sleep disorders (such as obstructive sleep apnoea).
The IQCDE is a validated survey for assessing longterm cognitive decline (to be completed by a long-term friend or relative).
The Rivermead Mobility Index is a validated survey quantifying everyday mobility.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these descriptions belong in the individual survey task files. Since this is an initializer, it would be hard to maintain these descriptions here if other surveys were to be added in the future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed (and there are some explanations within the task files). But the documentation here is what appears on the documentation panel when you're writing the code in the first place (ie. when you create or click on the initialiser function), whereas the information in the actual survey task files isn't displayed.

@param identifier The task identifier to use for this task, appropriate to the study.
@param prebuiltSurveyType The survey tool to be used
@param options Options that affect the features of the predefined task.

@return An active survey task that can be presented with an `ORKTaskViewController` object.

*/

+ (ORKOrderedTask *)validatedSurveyTaskWithIdentifier:(NSString *)identifier
validatedSurveyType:(ORKValidatedSurveyType)validatedSurveyType
options:(ORKPredefinedTaskOption)options;

@end

NS_ASSUME_NONNULL_END
28 changes: 28 additions & 0 deletions ResearchKit/Common/ORKOrderedTask.m
Expand Up @@ -58,6 +58,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#import "ORKPSATStep.h"
#import "ORKAccelerometerRecorder.h"
#import "ORKAudioRecorder.h"
#import "ORKNottinghamEADL.h"
#import "ORKStrokeImpactScale.h"
#import "ORKEpworthSleepScale.h"
#import "ORKIQCDE.h"
#import "ORKRivermeadMobilityIndex.h"


ORKTaskProgress ORKTaskProgressMake(NSUInteger current, NSUInteger total) {
Expand Down Expand Up @@ -1205,4 +1210,27 @@ + (ORKOrderedTask *)PSATTaskWithIdentifier:(NSString *)identifier



+ (ORKOrderedTask *)validatedSurveyTaskWithIdentifier:(NSString *)identifier
validatedSurveyType:(ORKValidatedSurveyType)validatedSurveyType
options:(ORKPredefinedTaskOption)options {
ORKOrderedTask *surveyTask;
switch (validatedSurveyType) {
case ORKValidatedSurveyTypeStrokeImpactScale:
surveyTask = [[ORKStrokeImpactScaleSurvey alloc] initWithIdentifier:identifier];
break;
case ORKValidatedSurveyTypeEpworthSleepScale:
surveyTask = [[ORKEpworthSleepScale alloc] initWithIdentifier:identifier];
break;
case ORKValidatedSurveyTypeIQCDE:
surveyTask = [[ORKIQCDE alloc] initWithIdentifier:identifier];
break;
case ORKValidatedSurveyTypeRivermeadMobilityIndex:
surveyTask = [[ORKRivermeadMobilityIndex alloc] initWithIdentifier:identifier];
break;
default:
surveyTask = [[ORKNottinghamEADLSurvey alloc] initWithIdentifier:identifier];
}
return surveyTask;
}

@end