-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
base: master
Are you sure you want to change the base?
Surveys #454
Changes from 18 commits
2b1b098
897ece6
0e1049a
132d10a
ce490ef
8c2a642
ae5baec
3ad8ef4
29b40dc
d19dde7
362d1af
a13fba2
475badb
6a8aa18
3ce6e9a
9b15139
5a4c0e0
43b5ff9
42d28b8
86ab025
4b3ee76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
}; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Refactor enum to include to ORK: |
||
|
||
/** | ||
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. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might consider renaming |
||
|
||
NS_ASSUME_NONNULL_END |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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'.)