VLDRecord

Objective-C

@interface VLDRecord : VLDModel

Swift

class VLDRecord : VLDModel

Base class for all objects that represent health records.

  • Timestamp for the measurement set

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate *timestamp;

    Swift

    var timestamp: Date? { get set }
  • Timezone information for the measurement set formatted as +/-HH:MM

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *utcOffset;

    Swift

    var utcOffset: String? { get set }
  • The short name of the Validic integration that created the record (validicmobile)

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *source;

    Swift

    var source: String? { get set }
  • The display name of the Validic integration that created the record (ValidicMobile)

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *sourceName;

    Swift

    var sourceName: String? { get set }
  • The name of the peripheral manufacturer, for records sourced from HealthKit this will be the name of the application that originally wrote the data to HealthKit.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *originalSource;

    Swift

    var originalSource: String? { get set }
  • The name of the library technology used to create the record (eg “ValidicMobile Bluetooth”, “ValidicMobile Apple Health”)

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *intermediarySource;

    Swift

    var intermediarySource: String? { get set }
  • The model number of the peripheral, for records sourced from HealthKit this will be the bundle ID of the application that originally wrote the data to HealthKit.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *sourcePeripheral;

    Swift

    var sourcePeripheral: String? { get set }
  • Date and time when the measurement set was last updated

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate *lastUpdated;

    Swift

    var lastUpdated: Date? { get set }
  • Indicates the data you are receiving was generated using a device, opposed to being manually entered by a end user (Boolean value stored in an NSNumber)

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSNumber *validated;

    Swift

    var validated: NSNumber? { get set }
  • Unique identifier of the record

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *recordID;

    Swift

    var recordID: String? { get set }
  • Expanded data of the endpoint

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSDictionary *extras;

    Swift

    var extras: [AnyHashable : Any]? { get set }
  • Unique ID generated by the orginal source

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *activityID;

    Swift

    var activityID: String? { get set }
  • Uploaded images associated with the record

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSArray<VLDMedia *> *media;

    Swift

    var media: [VLDMedia]? { get set }
  • User generated comment

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *comment;

    Swift

    var comment: String? { get set }
  • Associated peripheral used to generate record

    Declaration

    Objective-C

    - (VLDPeripheral *_Nullable)peripheral;

    Swift

    func peripheral() -> VLDPeripheral?
  • Create a new record with source information for a peripheral.

    Declaration

    Objective-C

    + (instancetype _Nonnull)newRecordFromPeripheral:
        (VLDPeripheral *_Nonnull)peripheral;

    Swift

    class func newRecord(from peripheral: VLDPeripheral) -> Self

    Parameters

    peripheral

    the peripheral to use for the record’s source.

  • Initializes the appropriate VLDRecord subclass for the specified VLDRecordType.

    Declaration

    Objective-C

    + (instancetype _Nonnull)newRecordWithType:(VLDRecordType)type;

    Swift

    class func newRecord(with type: VLDRecordType) -> Self

    Parameters

    type

    the record type.

  • Add a value to the expanded data of the record.

    Declaration

    Objective-C

    - (void)setExtraValue:(id _Nullable)value forKey:(NSString *_Nonnull)key;

    Swift

    func setExtraValue(_ value: Any?, forKey key: String)

    Parameters

    value

    the value to store in the expanded data.

    key

    the key used to access the value in the expanded data.

  • Add media to the record.

    Declaration

    Objective-C

    - (void)addMedia:(VLDMedia *_Nonnull)media;

    Swift

    func addMedia(_ media: VLDMedia)

    Parameters

    media

    the VLDMedia object to store in the record.

  • This method returns the Type of the record

    Declaration

    Objective-C

    - (VLDRecordType)recordType;

    Swift

    func recordType() -> VLDRecordType
  • Record type name as a string.

    Declaration

    Objective-C

    + (NSString *_Nonnull)nameForRecordType:(VLDRecordType)type;

    Swift

    class func name(for type: VLDRecordType) -> String

    Parameters

    type

    the record type.

  • Converts a weight value from the first specified weight unit to the second specified weight unit.

    Declaration

    Objective-C

    + (NSNumber *_Nonnull)convertWeightValue:(NSNumber *_Nonnull)value
                                    fromUnit:(VLDWeightUnit)from
                                      toUnit:(VLDWeightUnit)to;

    Swift

    class func convertWeightValue(_ value: NSNumber, from: VLDWeightUnit, to: VLDWeightUnit) -> NSNumber

    Parameters

    value

    the value being converted.

    from

    the initial unit of the value.

    to

    the unit the value will be converted to.

  • Converts a temperature value from the first specified temperature unit to the second specified temperature unit.

    Declaration

    Objective-C

    + (NSNumber *_Nonnull)convertTemperatureValue:(NSNumber *_Nonnull)value
                                         fromUnit:(VLDTemperatureUnit)from
                                           toUnit:(VLDTemperatureUnit)to;

    Swift

    class func convertTemperatureValue(_ value: NSNumber, from: VLDTemperatureUnit, to: VLDTemperatureUnit) -> NSNumber

    Parameters

    value

    the value being converted.

    from

    the initial unit of the value.

    to

    the unit the value will be converted to.

  • Converts a glucose value from the first specified glucose unit to the second specified glucose unit.

    Declaration

    Objective-C

    + (NSNumber *_Nonnull)convertGlucoseValue:(NSNumber *_Nonnull)value
                                     fromUnit:(VLDGlucoseUnit)from
                                       toUnit:(VLDGlucoseUnit)to;

    Swift

    class func convertGlucoseValue(_ value: NSNumber, from: VLDGlucoseUnit, to: VLDGlucoseUnit) -> NSNumber

    Parameters

    value

    the value being converted.

    from

    the initial unit of the value.

    to

    the unit the value will be converted to.

  • Display string for a glucose unit.

    Declaration

    Objective-C

    + (NSString *_Nonnull)unitStringForGlucoseUnit:(VLDGlucoseUnit)unit;

    Swift

    class func unitString(for unit: VLDGlucoseUnit) -> String

    Parameters

    unit

    the glucose unit.

  • Display string for a weight unit.

    Declaration

    Objective-C

    + (NSString *_Nonnull)unitStringForWeightUnit:(VLDWeightUnit)unit;

    Swift

    class func unitString(for unit: VLDWeightUnit) -> String

    Parameters

    unit

    the weight unit.

  • Display string for a temperature unit.

    Declaration

    Objective-C

    + (NSString *_Nonnull)unitStringForTemperatureUnit:(VLDTemperatureUnit)unit;

    Swift

    class func unitString(for unit: VLDTemperatureUnit) -> String

    Parameters

    unit

    the temperature unit.