Skip to content

Commit fe2ea1e

Browse files
author
Yuan Zhu
committed
Merge branch 'eligFix' into 'convergence'
Removed eligibility module. As per HI, the eligibility module should re-use the text choice answer format look and feel. This PR removes the current `ORKEligbilityAnswerFormat` and updates `ORKTest` and `ORKCatalog` examples of eligibility using `ORKTextChoiceAnswerFormat`. See merge request !17
2 parents eedcff0 + d9c005a commit fe2ea1e

14 files changed

+53
-671
lines changed

ResearchKit.xcodeproj/project.pbxproj

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@
7777
2441034F1B966D4C00EEAB0C /* ORKPasscodeViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2441034D1B966D4C00EEAB0C /* ORKPasscodeViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
7878
244103501B966D4C00EEAB0C /* ORKPasscodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2441034E1B966D4C00EEAB0C /* ORKPasscodeViewController.m */; };
7979
244EFAD21BCEFD83001850D9 /* ORKAnswerFormat_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 244EFAD11BCEFD83001850D9 /* ORKAnswerFormat_Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
80-
246D15D81BA3438A009C99FC /* ORKEligibilitySelectionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 246D15D61BA3438A009C99FC /* ORKEligibilitySelectionView.h */; };
81-
246D15D91BA3438A009C99FC /* ORKEligibilitySelectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 246D15D71BA3438A009C99FC /* ORKEligibilitySelectionView.m */; };
82-
246D15E21BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 246D15E01BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h */; };
83-
246D15E31BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m in Sources */ = {isa = PBXBuildFile; fileRef = 246D15E11BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m */; };
8480
24850E191BCDA9C7006E91FB /* ORKLoginStepViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 24850E171BCDA9C7006E91FB /* ORKLoginStepViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
8581
24850E1A1BCDA9C7006E91FB /* ORKLoginStepViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24850E181BCDA9C7006E91FB /* ORKLoginStepViewController.m */; };
8682
248604061B4C98760010C8A0 /* ORKAnswerFormatTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 248604051B4C98760010C8A0 /* ORKAnswerFormatTests.m */; };
@@ -587,10 +583,6 @@
587583
2441034D1B966D4C00EEAB0C /* ORKPasscodeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKPasscodeViewController.h; sourceTree = "<group>"; };
588584
2441034E1B966D4C00EEAB0C /* ORKPasscodeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKPasscodeViewController.m; sourceTree = "<group>"; };
589585
244EFAD11BCEFD83001850D9 /* ORKAnswerFormat_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKAnswerFormat_Private.h; sourceTree = "<group>"; };
590-
246D15D61BA3438A009C99FC /* ORKEligibilitySelectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKEligibilitySelectionView.h; sourceTree = "<group>"; };
591-
246D15D71BA3438A009C99FC /* ORKEligibilitySelectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKEligibilitySelectionView.m; sourceTree = "<group>"; };
592-
246D15E01BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKSurveyAnswerCellForEligibility.h; sourceTree = "<group>"; };
593-
246D15E11BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKSurveyAnswerCellForEligibility.m; sourceTree = "<group>"; };
594586
24850E171BCDA9C7006E91FB /* ORKLoginStepViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ORKLoginStepViewController.h; path = Onboarding/ORKLoginStepViewController.h; sourceTree = "<group>"; };
595587
24850E181BCDA9C7006E91FB /* ORKLoginStepViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ORKLoginStepViewController.m; path = Onboarding/ORKLoginStepViewController.m; sourceTree = "<group>"; };
596588
248604051B4C98760010C8A0 /* ORKAnswerFormatTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKAnswerFormatTests.m; sourceTree = "<group>"; };
@@ -1737,8 +1729,6 @@
17371729
86C40BCE1A8D7C5C00081FAC /* ORKSurveyAnswerCellForText.m */,
17381730
865EA16A1ABA1BE20037C68E /* ORKSurveyAnswerCellForPicker.h */,
17391731
865EA16B1ABA1BE20037C68E /* ORKSurveyAnswerCellForPicker.m */,
1740-
246D15E01BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h */,
1741-
246D15E11BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m */,
17421732
CBD34A581BB207FC00F204EA /* ORKSurveyAnswerCellForLocation.h */,
17431733
CBD34A591BB207FC00F204EA /* ORKSurveyAnswerCellForLocation.m */,
17441734
);
@@ -1768,8 +1758,6 @@
17681758
865EA1611AB8DF750037C68E /* ORKDateTimePicker.m */,
17691759
865EA1661ABA1AA10037C68E /* ORKPicker.h */,
17701760
865EA1671ABA1AA10037C68E /* ORKPicker.m */,
1771-
246D15D61BA3438A009C99FC /* ORKEligibilitySelectionView.h */,
1772-
246D15D71BA3438A009C99FC /* ORKEligibilitySelectionView.m */,
17731761
);
17741762
name = "Control Views";
17751763
sourceTree = "<group>";
@@ -2467,7 +2455,6 @@
24672455
86C40C5E1A8D7C5C00081FAC /* ORKWalkingTaskStepViewController.h in Headers */,
24682456
BCB6E66C1B7D537B000D5B34 /* ORKRangedPoint.h in Headers */,
24692457
86C40D2C1A8D7C5C00081FAC /* ORKHeadlineLabel.h in Headers */,
2470-
246D15E21BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h in Headers */,
24712458
86C40D1C1A8D7C5C00081FAC /* ORKFormSectionTitleLabel.h in Headers */,
24722459
86C40CBC1A8D7C5C00081FAC /* UITouch+ORKJSONDictionary.h in Headers */,
24732460
241A2E871B94FD8800ED3B39 /* ORKPasscodeStepViewController_Internal.h in Headers */,
@@ -2485,7 +2472,6 @@
24852472
106FF2A21B665B86004EACF2 /* ORKHolePegTestPlaceStepViewController.h in Headers */,
24862473
24A4DA101B8D0F21009C797A /* ORKPasscodeStepView.h in Headers */,
24872474
86C40C9A1A8D7C5C00081FAC /* ORKDataLogger_Private.h in Headers */,
2488-
246D15D81BA3438A009C99FC /* ORKEligibilitySelectionView.h in Headers */,
24892475
861D11AD1AA7951F003C98A7 /* ORKChoiceAnswerFormatHelper.h in Headers */,
24902476
86C40C461A8D7C5C00081FAC /* ORKSpatialSpanMemoryStepViewController.h in Headers */,
24912477
86C40C521A8D7C5C00081FAC /* ORKTappingIntervalStep.h in Headers */,
@@ -2770,12 +2756,10 @@
27702756
250F94051B4C5A6600FA23EB /* ORKTowerOfHanoiStep.m in Sources */,
27712757
86C40E0A1A8D7C5C00081FAC /* ORKConsentReviewStep.m in Sources */,
27722758
BCD192E81B81243900FCC08A /* ORKPieChartLegendView.m in Sources */,
2773-
246D15D91BA3438A009C99FC /* ORKEligibilitySelectionView.m in Sources */,
27742759
86C40D1E1A8D7C5C00081FAC /* ORKFormSectionTitleLabel.m in Sources */,
27752760
250F94091B4C5AA400FA23EB /* ORKTowerOfHanoiStepViewController.m in Sources */,
27762761
86C40CF81A8D7C5C00081FAC /* ORKBorderedButton.m in Sources */,
27772762
86C40E201A8D7C5C00081FAC /* ORKConsentSignature.m in Sources */,
2778-
246D15E31BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m in Sources */,
27792763
86C40C601A8D7C5C00081FAC /* ORKWalkingTaskStepViewController.m in Sources */,
27802764
BCD192E01B81240400FCC08A /* ORKPieChartPieView.m in Sources */,
27812765
866F86011A96CBF3007B282C /* ORKSurveyAnswerCell.m in Sources */,

ResearchKit/Common/ORKAnswerFormat.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ typedef NS_ENUM(NSInteger, ORKQuestionType) {
7979
*/
8080
ORKQuestionTypeBoolean,
8181

82-
/**
83-
The Eligibility question type asks the participant to enter Yes or No via a custom boolean control.
84-
*/
85-
ORKQuestionTypeEligibility,
86-
8782
/**
8883
In a text question, the participant can enter multiple lines of text.
8984
*/
@@ -153,7 +148,6 @@ typedef NS_ENUM(NSInteger, ORKNumberFormattingStyle) {
153148
@class ORKImageChoiceAnswerFormat;
154149
@class ORKTextChoiceAnswerFormat;
155150
@class ORKBooleanAnswerFormat;
156-
@class ORKEligibilityAnswerFormat;
157151
@class ORKNumericAnswerFormat;
158152
@class ORKTimeOfDayAnswerFormat;
159153
@class ORKDateAnswerFormat;
@@ -224,8 +218,6 @@ ORK_CLASS_AVAILABLE
224218

225219
+ (ORKBooleanAnswerFormat *)booleanAnswerFormat;
226220

227-
+ (ORKEligibilityAnswerFormat *)eligibilityAnswerFormat;
228-
229221
+ (ORKValuePickerAnswerFormat *)valuePickerAnswerFormatWithTextChoices:(NSArray<ORKTextChoice *> *)textChoices;
230222

231223
+ (ORKImageChoiceAnswerFormat *)choiceAnswerFormatWithImageChoices:(NSArray<ORKImageChoice *> *)imageChoices;
@@ -763,22 +755,6 @@ ORK_CLASS_AVAILABLE
763755
@end
764756

765757

766-
/**
767-
The `ORKEligibilityAnswerFormat` class provides a custom Boolean control that is
768-
preconfigured to use only Yes and No answers.
769-
770-
It is recommended to use an `ORKNavigableOrderedTask` along with this answer format
771-
in order to determine if the user is eligible or not. See `ORKCatalog` for an
772-
example (`Eligibility Task Example').
773-
774-
The eligibility answer format produces an `ORKBooleanQuestionResult` object.
775-
*/
776-
ORK_CLASS_AVAILABLE
777-
@interface ORKEligibilityAnswerFormat : ORKAnswerFormat
778-
779-
@end
780-
781-
782758
/**
783759
The `ORKTextChoice` class defines the text for a choice in answer formats such
784760
as `ORKTextChoiceAnswerFormat` and `ORKValuePickerAnswerFormat`.

ResearchKit/Common/ORKAnswerFormat.m

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ BOOL ORKIsAnswerEmpty(id answer) {
6262
SQT_CASE(Decimal);
6363
SQT_CASE(Integer);
6464
SQT_CASE(Boolean);
65-
SQT_CASE(Eligibility)
6665
SQT_CASE(Text);
6766
SQT_CASE(DateAndTime);
6867
SQT_CASE(TimeOfDay);
@@ -287,10 +286,6 @@ + (ORKBooleanAnswerFormat *)booleanAnswerFormat {
287286
return [ORKBooleanAnswerFormat new];
288287
}
289288

290-
+ (ORKEligibilityAnswerFormat *)eligibilityAnswerFormat {
291-
return [ORKEligibilityAnswerFormat new];
292-
}
293-
294289
+ (ORKValuePickerAnswerFormat *)valuePickerAnswerFormatWithTextChoices:(NSArray<ORKTextChoice *> *)textChoices {
295290
return [[ORKValuePickerAnswerFormat alloc] initWithTextChoices:textChoices];
296291
}
@@ -911,21 +906,6 @@ - (Class)questionResultClass {
911906
@end
912907

913908

914-
#pragma mark - ORKEligibilityAnswerFormat
915-
916-
@implementation ORKEligibilityAnswerFormat
917-
918-
- (ORKQuestionType)questionType {
919-
return ORKQuestionTypeEligibility;
920-
}
921-
922-
- (Class)questionResultClass {
923-
return [ORKBooleanQuestionResult class];
924-
}
925-
926-
@end
927-
928-
929909
#pragma mark - ORKTimeOfDayAnswerFormat
930910

931911
@implementation ORKTimeOfDayAnswerFormat

ResearchKit/Common/ORKEligibilitySelectionView.h

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)