pump

package
v1.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2018 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatum

func NewDatum() data.Datum

func ParseBasalSchedulesMap

func ParseBasalSchedulesMap(parser data.ObjectParser) *map[string]*[]*BasalSchedule

func ParseBloodGlucoseTargetArray

func ParseBloodGlucoseTargetArray(parser data.ArrayParser) *[]*BloodGlucoseTarget

func ParseCarbohydrateRatioArray

func ParseCarbohydrateRatioArray(parser data.ArrayParser) *[]*CarbohydrateRatio

func ParseInsulinSensitivityArray

func ParseInsulinSensitivityArray(parser data.ArrayParser) *[]*InsulinSensitivity

func Type

func Type() string

Types

type BasalSchedule

type BasalSchedule struct {
	Rate  *float64 `json:"rate,omitempty" bson:"rate,omitempty"`
	Start *int     `json:"start,omitempty" bson:"start,omitempty"`
}

func NewBasalSchedule

func NewBasalSchedule() *BasalSchedule

func (*BasalSchedule) Normalize

func (b *BasalSchedule) Normalize(normalizer data.Normalizer)

func (*BasalSchedule) Parse

func (b *BasalSchedule) Parse(parser data.ObjectParser)

func (*BasalSchedule) Validate

func (b *BasalSchedule) Validate(validator data.Validator)

type BloodGlucoseTarget

type BloodGlucoseTarget struct {
	glucose.Target `bson:",inline"`

	Start *int `json:"start,omitempty" bson:"start,omitempty"`
}

func NewBloodGlucoseTarget

func NewBloodGlucoseTarget() *BloodGlucoseTarget

func ParseBloodGlucoseTarget

func ParseBloodGlucoseTarget(parser data.ObjectParser) *BloodGlucoseTarget

func (*BloodGlucoseTarget) Parse

func (b *BloodGlucoseTarget) Parse(parser data.ObjectParser)

func (*BloodGlucoseTarget) Validate

func (b *BloodGlucoseTarget) Validate(validator data.Validator, units *string)

type CarbohydrateRatio

type CarbohydrateRatio struct {
	Amount *float64 `json:"amount,omitempty" bson:"amount,omitempty"`
	Start  *int     `json:"start,omitempty" bson:"start,omitempty"`
}

func NewCarbohydrateRatio

func NewCarbohydrateRatio() *CarbohydrateRatio

func ParseCarbohydrateRatio

func ParseCarbohydrateRatio(parser data.ObjectParser) *CarbohydrateRatio

func (*CarbohydrateRatio) Normalize

func (c *CarbohydrateRatio) Normalize(normalizer data.Normalizer)

func (*CarbohydrateRatio) Parse

func (c *CarbohydrateRatio) Parse(parser data.ObjectParser)

func (*CarbohydrateRatio) Validate

func (c *CarbohydrateRatio) Validate(validator data.Validator)

type InsulinSensitivity

type InsulinSensitivity struct {
	Amount *float64 `json:"amount,omitempty" bson:"amount,omitempty"`
	Start  *int     `json:"start,omitempty" bson:"start,omitempty"`
}

func NewInsulinSensitivity

func NewInsulinSensitivity() *InsulinSensitivity

func ParseInsulinSensitivity

func ParseInsulinSensitivity(parser data.ObjectParser) *InsulinSensitivity

func (*InsulinSensitivity) Normalize

func (i *InsulinSensitivity) Normalize(normalizer data.Normalizer, units *string)

func (*InsulinSensitivity) Parse

func (i *InsulinSensitivity) Parse(parser data.ObjectParser)

func (*InsulinSensitivity) Validate

func (i *InsulinSensitivity) Validate(validator data.Validator, units *string)

type Pump

type Pump struct {
	types.Base `bson:",inline"`

	*Units `json:"units,omitempty" bson:"units,omitempty"`

	BasalSchedules *map[string]*[]*BasalSchedule `json:"basalSchedules,omitempty" bson:"basalSchedules,omitempty"`

	CarbohydrateRatios   *[]*CarbohydrateRatio  `json:"carbRatio,omitempty" bson:"carbRatio,omitempty"`
	InsulinSensitivities *[]*InsulinSensitivity `json:"insulinSensitivity,omitempty" bson:"insulinSensitivity,omitempty"`
	BloodGlucoseTargets  *[]*BloodGlucoseTarget `json:"bgTarget,omitempty" bson:"bgTarget,omitempty"`

	ActiveSchedule *string `json:"activeSchedule,omitempty" bson:"activeSchedule,omitempty"`
}

func Init

func Init() *Pump

func New

func New() *Pump

func (*Pump) Init

func (p *Pump) Init()

func (*Pump) Normalize

func (p *Pump) Normalize(normalizer data.Normalizer) error

func (*Pump) Parse

func (p *Pump) Parse(parser data.ObjectParser) error

func (*Pump) Validate

func (p *Pump) Validate(validator data.Validator) error

type Units

type Units struct {
	Carbohydrate *string `json:"carb,omitempty" bson:"carb,omitempty"`
	BloodGlucose *string `json:"bg,omitempty" bson:"bg,omitempty"`
}

func NewUnits

func NewUnits() *Units

func ParseUnits

func ParseUnits(parser data.ObjectParser) *Units

func (*Units) Normalize

func (u *Units) Normalize(normalizer data.Normalizer)

func (*Units) Parse

func (u *Units) Parse(parser data.ObjectParser)

func (*Units) Validate

func (u *Units) Validate(validator data.Validator)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL