OCKCarePlanEvent Class Reference

Inherits from NSObject
Declared in OCKCarePlanEvent.h

An instance of OCKCarePlanEvent defines an occurrence of an activty. An activity is uniquely defined by two indices: numberOfDaysSinceStart and occurrenceIndexOfDay. For example, the second event on day 1 is defined using numberOfDaysSinceStart = 0 and occurrenceIndexOfDay = 1.

An OCKCarePlanEvent instance cannot be created directly. All events are populated by saved activities in an OCKCarePlanStore object.

Use OCKCarePlanStore API to update an event’s state and change its result.

  occurrenceIndexOfDay

The index of this event on a particular date. For example, if an activity has three occurrences in a day, then it would be represented by three CarePlanEvent objects with index 0, 1, 2 respectively.

@property (nonatomic, readonly) NSUInteger occurrenceIndexOfDay

Declared In

OCKCarePlanEvent.h

  numberOfDaysSinceStart

Counting from the start date, the in which this event takes place. For example, if the event is on start date, this value is 0

@property (nonatomic, readonly) NSUInteger numberOfDaysSinceStart

Declared In

OCKCarePlanEvent.h

  date

The date of this event, in the Gregorian calendar, represented by era, year, month, and day.

@property (nonatomic, readonly) NSDateComponents *date

Declared In

OCKCarePlanEvent.h

  activity

The activity associated with this event.

@property (nonatomic, readonly) OCKCarePlanActivity *activity

Declared In

OCKCarePlanEvent.h

  state

The state of this event (Initial / NotCompleted / Completed). An event starts with the state set to Initial. Use the OCKCarePlanStore API to update the state of an event.

@property (nonatomic, readonly) OCKCarePlanEventState state

Declared In

OCKCarePlanEvent.h

  result

A result object can be attached to event by using the OCKCarePlanStore API.

@property (nonatomic, readonly, nullable) OCKCarePlanEventResult *result

Declared In

OCKCarePlanEvent.h