BloodGlucoseRecord


public final class BloodGlucoseRecord implements Record


Captures the concentration of glucose in the blood. Each record represents a single instantaneous blood glucose reading.

Summary

Constants

static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int

Public constructors

BloodGlucoseRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    @NonNull BloodGlucose level,
    int specimenSource,
    int mealType,
    int relationToMeal,
    @NonNull Metadata metadata
)

Public methods

boolean
equals(Object other)
final @NonNull BloodGlucose

Blood glucose level or concentration.

final int

Type of meal related to the blood glucose measurement.

@NonNull Metadata

Set of common metadata associated with the written record.

final int

Relationship of the meal to the blood glucose measurement.

final int

Type of body fluid used to measure the blood glucose.

@NonNull Instant

Time the record happened.

ZoneOffset

User experienced zone offset at time, or null if unknown.

int
@NonNull String

Constants

RELATION_TO_MEAL_AFTER_MEAL

public static final int RELATION_TO_MEAL_AFTER_MEAL = 4

RELATION_TO_MEAL_BEFORE_MEAL

public static final int RELATION_TO_MEAL_BEFORE_MEAL = 3

RELATION_TO_MEAL_FASTING

public static final int RELATION_TO_MEAL_FASTING = 2

RELATION_TO_MEAL_GENERAL

public static final int RELATION_TO_MEAL_GENERAL = 1

RELATION_TO_MEAL_UNKNOWN

public static final int RELATION_TO_MEAL_UNKNOWN = 0

SPECIMEN_SOURCE_CAPILLARY_BLOOD

public static final int SPECIMEN_SOURCE_CAPILLARY_BLOOD = 2

SPECIMEN_SOURCE_INTERSTITIAL_FLUID

public static final int SPECIMEN_SOURCE_INTERSTITIAL_FLUID = 1

SPECIMEN_SOURCE_PLASMA

public static final int SPECIMEN_SOURCE_PLASMA = 3

SPECIMEN_SOURCE_SERUM

public static final int SPECIMEN_SOURCE_SERUM = 4

SPECIMEN_SOURCE_TEARS

public static final int SPECIMEN_SOURCE_TEARS = 5

SPECIMEN_SOURCE_UNKNOWN

public static final int SPECIMEN_SOURCE_UNKNOWN = 0

SPECIMEN_SOURCE_WHOLE_BLOOD

public static final int SPECIMEN_SOURCE_WHOLE_BLOOD = 6

Public constructors

BloodGlucoseRecord

Added in 1.1.0-alpha10
public BloodGlucoseRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    @NonNull BloodGlucose level,
    int specimenSource,
    int mealType,
    int relationToMeal,
    @NonNull Metadata metadata
)

Public methods

equals

public boolean equals(Object other)

getLevel

Added in 1.1.0-alpha10
public final @NonNull BloodGlucose getLevel()

Blood glucose level or concentration. Required field. Valid range: 0-50 mmol/L.

See also
BloodGlucose

getMealType

Added in 1.1.0-alpha10
public final int getMealType()

Type of meal related to the blood glucose measurement. Optional, enum field. Allowed values: MealType.

See also
MealType

getMetadata

Added in 1.1.0-alpha10
public @NonNull Metadata getMetadata()

Set of common metadata associated with the written record.

getRelationToMeal

Added in 1.1.0-alpha10
public final int getRelationToMeal()

Relationship of the meal to the blood glucose measurement. Optional, enum field. Allowed values: RelationToMeal.

getSpecimenSource

Added in 1.1.0-alpha10
public final int getSpecimenSource()

Type of body fluid used to measure the blood glucose. Optional, enum field. Allowed values: SpecimenSource.

getTime

Added in 1.1.0-alpha10
public @NonNull Instant getTime()

Time the record happened.

getZoneOffset

Added in 1.1.0-alpha10
public ZoneOffset getZoneOffset()

User experienced zone offset at time, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.

hashCode

public int hashCode()

toString

public @NonNull String toString()