PCKOutcome

public struct PCKOutcome : PCKVersionable, PCKSynchronizable

An PCKOutcome is the ParseCareKit equivalent of OCKOutcome. An OCKOutcome represents the outcome of an event corresponding to a task. An outcome may have 0 or more values associated with it. For example, a task that asks a patient to measure their temperature will have events whose outcome will contain a single value representing the patient’s temperature.

  • Declaration

    Swift

    public var previousVersionUUIDs: [UUID]?
  • Declaration

    Swift

    public var nextVersionUUIDs: [UUID]?
  • Declaration

    Swift

    public var effectiveDate: Date?
  • Declaration

    Swift

    public var entityId: String?
  • Declaration

    Swift

    public var schemaVersion: OCKSemanticVersion?
  • Declaration

    Swift

    public var createdDate: Date?
  • Declaration

    Swift

    public var updatedDate: Date?
  • Declaration

    Swift

    public var timezone: TimeZone?
  • Declaration

    Swift

    public var userInfo: [String : String]?
  • Declaration

    Swift

    public var groupIdentifier: String?
  • Declaration

    Swift

    public var tags: [String]?
  • Declaration

    Swift

    public var source: String?
  • Declaration

    Swift

    public var asset: String?
  • Declaration

    Swift

    public var notes: [OCKNote]?
  • Declaration

    Swift

    public var remoteID: String?
  • Declaration

    Swift

    public var encodingForParse: Bool { get set }
  • Declaration

    Swift

    public static var className: String { get }
  • Declaration

    Swift

    public var objectId: String?
  • Declaration

    Swift

    public var createdAt: Date?
  • Declaration

    Swift

    public var updatedAt: Date?
  • ACL

    Declaration

    Swift

    public var ACL: ParseACL?
  • Declaration

    Swift

    public var originalData: Data?
  • The date on which this object was tombstoned. Note that objects are never actually deleted, but rather they are tombstoned and will no longer be returned from queries.

    Declaration

    Swift

    public var deletedDate: Date?
  • Specifies how many events occured before this outcome was created. For example, if a task is schedule to happen twice per day, then the 2nd outcome on the 2nd day will have a taskOccurrenceIndex of 3.

    Note

    The task occurrence references a specific version of a task, so if a new version the task is created, the task occurrence index will start again from 0.

    Declaration

    Swift

    public var taskOccurrenceIndex: Int?
  • An array of values associated with this outcome. Most outcomes will have 0 or 1 values, but some may have more.

    • Examples:
      • A task to call a physician might have 0 values, or 1 value containing the time stamp of when the call was placed.
      • A task to walk 2,000 steps might have 1 value, with that value being the number of steps that were actually taken.
      • A task to complete a survey might have multiple values corresponding to the answers to the questions in the survey.

    Declaration

    Swift

    public var values: [OCKOutcomeValue]?
  • The version of the task to which this outcomes belongs.

    Declaration

    Swift

    public var task: PCKTask? { get set }
  • The version ID of the task to which this outcomes belongs.

    Declaration

    Swift

    public var taskUUID: UUID? { get set }
  • Declaration

    Swift

    public init()
  • Declaration

    Swift

    public func new(with careKitEntity: OCKEntity) throws -> PCKOutcome
  • Declaration

    Swift

    public func addToCloud(completion: @escaping (Result<PCKSynchronizable, Error>) -> Void)
  • Declaration

    Swift

    public func updateCloud(completion: @escaping (Result<PCKSynchronizable, Error>) -> Void)
  • Declaration

    Swift

    public func pullRevisions(since localClock: Int,
                              cloudClock: OCKRevisionRecord.KnowledgeVector,
                              remoteID: String,
                              mergeRevision: @escaping (Result<OCKRevisionRecord, ParseError>) -> Void)
  • Declaration

    Swift

    public func pushRevision(cloudClock: Int,
                             remoteID: String,
                             completion: @escaping (Error?) -> Void)
  • Declaration

    Swift

    public static func copyValues(from other: PCKOutcome, to here: PCKOutcome) throws -> PCKOutcome
  • Link versions and related classes

    Declaration

    Swift

    public func linkRelated(completion: @escaping (Result<PCKOutcome, Error>) -> Void)
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws