OCKCarePlanActivity Class Reference

Inherits from NSObject
Conforms to NSCopying
NSSecureCoding
Declared in OCKCarePlanActivity.h

An instance of the OCKCarePlanActivity class represents a task for user to complete based on a schedule. Each activity has a unique identifier. An OCKCareSchedule object defines the start date, end date, and the recurrence pattern for the activity.

+ interventionWithIdentifier:groupIdentifier:title:text:tintColor:instructions:imageURL:schedule:userInfo:optional:

Convienience initializer for intervention activity type. This initializer covers necessary attributes for building an intervention.

+ (instancetype)interventionWithIdentifier:(NSString *)identifier groupIdentifier:(nullable NSString *)groupIdentifier title:(NSString *)title text:(nullable NSString *)text tintColor:(nullable UIColor *)tintColor instructions:(nullable NSString *)instructions imageURL:(nullable NSURL *)imageURL schedule:(OCKCareSchedule *)schedule userInfo:(nullable NSDictionary *)userInfo optional:(BOOL)optional

Parameters

identifier

Unique identifier string.

groupIdentifier

Group identifier string. You can use the identifier to group similar activities.

title

The title for the intervention activity.

text

A descriptive text for the intervention activity.

tintColor

The tint color for the intervention activity.

instructions

Additional instructions for the intervention activity.

imageURL

Image for the intervention activity.

schedule

The schedule for the intervention activity.

userInfo

Save any additional objects that comply with the NSCoding protocol.

optional

Whether or not the activity is optional.

Return Value

Initialized OCKCarePlanActivity instance.

Declared In

OCKCarePlanActivity.h

+ assessmentWithIdentifier:groupIdentifier:title:text:tintColor:resultResettable:schedule:userInfo:thresholds:optional:

Convienience initializer for the assessment activity type. This initializer covers necessary attributes for building an assessment.

+ (instancetype)assessmentWithIdentifier:(NSString *)identifier groupIdentifier:(nullable NSString *)groupIdentifier title:(NSString *)title text:(nullable NSString *)text tintColor:(nullable UIColor *)tintColor resultResettable:(BOOL)resultResettable schedule:(OCKCareSchedule *)schedule userInfo:(nullable NSDictionary *)userInfo thresholds:(nullable NSArray<NSArray<OCKCarePlanThreshold*> *> *)thresholds optional:(BOOL)optional

Parameters

identifier

Unique identifier string.

groupIdentifier

Group identifier string. You can use the identifier to group similar activities.

title

The title for the assessment activity.

text

A descriptive text for the assessment activity.

tintColor

The tint color for the assessment activity.

resultResettable

Whether or not to allow the user to retake the assessment.

schedule

The schedule for the assessment activity.

userInfo

Save any additional objects that comply with the NSCoding protocol.

thresholds

An array of array of thresholds to apply to numeric result values.

optional

Whether or not the activity is optional.

Return Value

Initialized OCKCarePlanActivity instance.

Declared In

OCKCarePlanActivity.h

+ readOnlyWithIdentifier:groupIdentifier:title:text:instructions:imageURL:schedule:userInfo:

Convienience initializer for read only activity type. This initializer covers necessary attributes for building read only activity.

+ (instancetype)readOnlyWithIdentifier:(NSString *)identifier groupIdentifier:(nullable NSString *)groupIdentifier title:(NSString *)title text:(nullable NSString *)text instructions:(nullable NSString *)instructions imageURL:(nullable NSURL *)imageURL schedule:(OCKCareSchedule *)schedule userInfo:(nullable NSDictionary *)userInfo

Parameters

identifier

Unique identifier string.

groupIdentifier

Group identifier string. You can use the identifier to group similar activities, but they will all be grouped under Read Only section in the table view.

title

The title for the read only activity.

text

A descriptive text for the read only activity.

instructions

Additional instructions for the read only activity.

imageURL

Image for the read only activity.

schedule

The schedule for the read only activity.

userInfo

Save any additional objects that comply with the NSCoding protocol.

Return Value

Initialized OCKCarePlanActivity instance.

Declared In

OCKCarePlanActivity.h

– initWithIdentifier:groupIdentifier:type:title:text:tintColor:instructions:imageURL:schedule:resultResettable:userInfo:thresholds:optional:

Default initialzer for OCKCarePlanActivity.

- (instancetype)initWithIdentifier:(NSString *)identifier groupIdentifier:(nullable NSString *)groupIdentifier type:(OCKCarePlanActivityType)type title:(NSString *)title text:(nullable NSString *)text tintColor:(nullable UIColor *)tintColor instructions:(nullable NSString *)instructions imageURL:(nullable NSURL *)imageURL schedule:(OCKCareSchedule *)schedule resultResettable:(BOOL)resultResettable userInfo:(nullable NSDictionary<NSString*,id<NSCoding> > *)userInfo thresholds:(nullable NSArray<NSArray<OCKCarePlanThreshold*> *> *)thresholds optional:(BOOL)optional

Parameters

identifier

Unique identifier string.

groupIdentifier

Group identifier string. You can use the identifier to group similar activities.

type

Type defines the category of an activity.

title

The title for the activity.

text

A descriptive text for the activity.

tintColor

The tint color for the activity.

instructions

Long description string to be display in details view.

imageURL

Optional image displayed in details view.

schedule

The schedule for the activity.

resultResettable

Whether or not to allow the user to retake the assessment.

userInfo

Save any addtional NSCoding complianced objects.

thresholds

An array of array of thresholds to apply to numeric result values.

optional

Whether or not the activity is optional.

Return Value

Initialized OCKCarePlanActivity instance.

Declared In

OCKCarePlanActivity.h

  identifier

Unique identifier string. In store scope, each activity’s identifer has to be unique. You can use this identifier as a key to retrieve the activity instance from the store.

@property (nonatomic, readonly) NSString *identifier

Declared In

OCKCarePlanActivity.h

  groupIdentifier

Group identifier string. You can use the identifier to group similar activities. You can use this identifier as a key to retrieve multiple activity instances from the store.

@property (nonatomic, readonly, nullable) NSString *groupIdentifier

Declared In

OCKCarePlanActivity.h

  type

Type defines the category of an activity.

@property (nonatomic, readonly) OCKCarePlanActivityType type

Discussion

The intervention activity type asks the user to do something related to treatment (such as take medication) and reports the completion status (YES or NO) to the care plan.

The assessment activity type asks the user to perform a task that evaluates their condition (such as complete a survey). The result can be displayed to the user.

Declared In

OCKCarePlanActivity.h

  title

The title for the activity.

@property (nonatomic, readonly) NSString *title

Declared In

OCKCarePlanActivity.h

  text

A descriptive text for the activity.

@property (nonatomic, readonly, nullable) NSString *text

Declared In

OCKCarePlanActivity.h

  tintColor

The tint color for the activity.

@property (nonatomic, readonly, nullable) UIColor *tintColor

Declared In

OCKCarePlanActivity.h

  instructions

Additional instructions for the intervention activity.

@property (nonatomic, readonly, nullable) NSString *instructions

Declared In

OCKCarePlanActivity.h

  imageURL

Image for the intervention activity.

@property (nonatomic, readonly, nullable) NSURL *imageURL

Declared In

OCKCarePlanActivity.h

  schedule

The schedule for the activity. The schedule defines the start and end date, and the recurrence pattern.

@property (nonatomic, readonly) OCKCareSchedule *schedule

Declared In

OCKCarePlanActivity.h

  resultResettable

Whether or not to allow the user to retake the assessment. This attribute has no effect in view controller. But developer can use this parameter to decide the behavior if a user want to redo a completed assessment. Default value is NO.

@property (nonatomic, readonly) BOOL resultResettable

Declared In

OCKCarePlanActivity.h

  userInfo

Save any additional objects that comply with the NSCoding protocol.

@property (nonatomic, copy, readonly, nullable) NSDictionary<NSString*id<NSCoding> > *userInfo

Declared In

OCKCarePlanActivity.h

  thresholds

An optional array of array of thresholds pertianing to the values of associated results objects. These thresholds are checked against any numeric result values when an event’s evaluateNumericThresholds() method is called. Each array of thresholds corresponds to one of the values in the result’s value array. Because of this, thresholds can have either 1 or 2 sub-arrays.

@property (nonatomic, copy, readonly, nullable) NSArray<NSArray<OCKCarePlanThreshold*> *> *thresholds

Declared In

OCKCarePlanActivity.h

  optional

Whether or not the activity is optional.

@property (nonatomic, readonly) BOOL optional

Discussion

An optional activity does not count towards total completion. Default value is NO.

Declared In

OCKCarePlanActivity.h