OCKCarePlanThreshold Class Reference

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

+ adheranceThresholdWithValue:title:

Convienience initializer for the adherance type threshold. This initializer covers necessary attributes for building an adherance threshold.

+ (instancetype)adheranceThresholdWithValue:(NSNumber *)value title:(nullable NSString *)title

Parameters

value

The value of the threshold (triggers if less than this value of events are completed).

title

The title associated with the threshold.

Return Value

Initialized OCKCarePlanThreshold instance.

Declared In

OCKCarePlanThreshold.h

+ numericThresholdWithValue:type:upperValue:title:

Convienience initializer for numeric type thresholds. This initializer covers necessary attributes for building a numeric threshold.

+ (instancetype)numericThresholdWithValue:(NSNumber *)value type:(OCKCarePlanThresholdType)type upperValue:(nullable NSNumber *)upperValue title:(nullable NSString *)title

Parameters

value

The value of the threshold.

type

The type of numeric threshold.

upperValue

The upper value of the threshold, for RangeInclusive and RangeExclusive.

title

The title associated with the threshold.

Return Value

Initialized OCKCarePlanThreshold instance.

Declared In

OCKCarePlanThreshold.h

– evaluateThresholdForValue:

Evaluates the threshold against a given value.

- (BOOL)evaluateThresholdForValue:(NSNumber *)valueToCheck

Parameters

valueToCheck

The value used in evaluating the threshold.

Return Value

BOOL whether or not the threshold was triggered.

Declared In

OCKCarePlanThreshold.h

  type

The type of threshold.

@property (nonatomic, readonly) OCKCarePlanThresholdType type

Declared In

OCKCarePlanThreshold.h

  value

The primary value of the threshold.

@property (nonatomic, readonly) NSNumber *value

Declared In

OCKCarePlanThreshold.h

  title

The title associated with the threshold. Will be displayed to the user if the threshold is triggered.

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

Declared In

OCKCarePlanThreshold.h

  upperValue

The optional upper value of the threshold. Only used for NumericRangeInclusive and NumericRangeExclusive threshold types.

@property (nonatomic, readonly, nullable) NSNumber *upperValue

Declared In

OCKCarePlanThreshold.h