Documentation ¶
Index ¶
Constants ¶
View Source
const ( CompoundArrayLengthMaximum = 100 CompoundAmountMinimum = 0.0 )
View Source
const ( ConcentrationUnitsUnitsPerML = "Units/mL" ConcentrationValueUnitsPerMLMaximum = 10000.0 ConcentrationValueUnitsPerMLMinimum = 0.0 )
View Source
const ( DoseActiveUnitsMaximum = 250.0 DoseActiveUnitsMinimum = 0.0 DoseCorrectionUnitsMaximum = 250.0 DoseCorrectionUnitsMinimum = -250.0 DoseFoodUnitsMaximum = 250.0 DoseFoodUnitsMinimum = 0.0 DoseTotalUnitsMaximum = 250.0 DoseTotalUnitsMinimum = 0.0 DoseUnitsUnits = "Units" )
View Source
const ( Type = "insulin" SiteLengthMaximum = 100 )
View Source
const ( SimpleActingTypeIntermediate = "intermediate" SimpleActingTypeLong = "long" SimpleActingTypeRapid = "rapid" SimpleActingTypeShort = "short" SimpleBrandLengthMaximum = 100 )
View Source
const (
FormulationNameLengthMaximum = 100
)
Variables ¶
This section is empty.
Functions ¶
func ConcentrationUnits ¶ added in v1.26.0
func ConcentrationUnits() []string
func ConcentrationValueRangeForUnits ¶ added in v1.26.0
func SimpleActingTypes ¶ added in v1.26.0
func SimpleActingTypes() []string
Types ¶
type Compound ¶ added in v1.26.0
type Compound struct { Amount *float64 `json:"amount,omitempty" bson:"amount,omitempty"` Formulation *Formulation `json:"formulation,omitempty" bson:"formulation,omitempty"` }
func NewCompound ¶ added in v1.26.0
func NewCompound() *Compound
func ParseCompound ¶ added in v1.26.0
func ParseCompound(parser structure.ObjectParser) *Compound
func (*Compound) Normalize ¶ added in v1.26.0
func (c *Compound) Normalize(normalizer data.Normalizer)
func (*Compound) Parse ¶ added in v1.26.0
func (c *Compound) Parse(parser structure.ObjectParser)
type CompoundArray ¶ added in v1.26.0
type CompoundArray []*Compound
func NewCompoundArray ¶ added in v1.26.0
func NewCompoundArray() *CompoundArray
func ParseCompoundArray ¶ added in v1.26.0
func ParseCompoundArray(parser structure.ArrayParser) *CompoundArray
func (*CompoundArray) Normalize ¶ added in v1.26.0
func (c *CompoundArray) Normalize(normalizer data.Normalizer)
func (*CompoundArray) Parse ¶ added in v1.26.0
func (c *CompoundArray) Parse(parser structure.ArrayParser)
func (*CompoundArray) Validate ¶ added in v1.26.0
func (c *CompoundArray) Validate(validator structure.Validator)
type Concentration ¶ added in v1.26.0
type Concentration struct { Units *string `json:"units,omitempty" bson:"units,omitempty"` Value *float64 `json:"value,omitempty" bson:"value,omitempty"` }
func NewConcentration ¶ added in v1.26.0
func NewConcentration() *Concentration
func ParseConcentration ¶ added in v1.26.0
func ParseConcentration(parser structure.ObjectParser) *Concentration
func (*Concentration) Normalize ¶ added in v1.26.0
func (c *Concentration) Normalize(normalizer data.Normalizer)
func (*Concentration) Parse ¶ added in v1.26.0
func (c *Concentration) Parse(parser structure.ObjectParser)
func (*Concentration) Validate ¶ added in v1.26.0
func (c *Concentration) Validate(validator structure.Validator)
type Dose ¶
type Dose struct { Active *float64 `json:"active,omitempty" bson:"active,omitempty"` Correction *float64 `json:"correction,omitempty" bson:"correction,omitempty"` Food *float64 `json:"food,omitempty" bson:"food,omitempty"` Total *float64 `json:"total,omitempty" bson:"total,omitempty"` Units *string `json:"units,omitempty" bson:"units,omitempty"` }
func ParseDose ¶
func ParseDose(parser structure.ObjectParser) *Dose
func (*Dose) Normalize ¶
func (d *Dose) Normalize(normalizer data.Normalizer)
func (*Dose) Parse ¶
func (d *Dose) Parse(parser structure.ObjectParser)
type Formulation ¶ added in v1.26.0
type Formulation struct { Compounds *CompoundArray `json:"compounds,omitempty" bson:"compounds,omitempty"` Name *string `json:"name,omitempty" bson:"name,omitempty"` Simple *Simple `json:"simple,omitempty" bson:"simple,omitempty"` }
func NewFormulation ¶ added in v1.26.0
func NewFormulation() *Formulation
func ParseFormulation ¶ added in v1.26.0
func ParseFormulation(parser structure.ObjectParser) *Formulation
func (*Formulation) Normalize ¶ added in v1.26.0
func (f *Formulation) Normalize(normalizer data.Normalizer)
func (*Formulation) Parse ¶ added in v1.26.0
func (f *Formulation) Parse(parser structure.ObjectParser)
func (*Formulation) Validate ¶ added in v1.26.0
func (f *Formulation) Validate(validator structure.Validator)
type Insulin ¶
type Insulin struct { types.Base `bson:",inline"` Dose *Dose `json:"dose,omitempty" bson:"dose,omitempty"` Formulation *Formulation `json:"formulation,omitempty" bson:"formulation,omitempty"` Site *string `json:"site,omitempty" bson:"site,omitempty"` }
func (*Insulin) Normalize ¶
func (i *Insulin) Normalize(normalizer data.Normalizer)
func (*Insulin) Parse ¶
func (i *Insulin) Parse(parser structure.ObjectParser)
type Simple ¶ added in v1.26.0
type Simple struct { ActingType *string `json:"actingType,omitempty" bson:"actingType,omitempty"` Brand *string `json:"brand,omitempty" bson:"brand,omitempty"` Concentration *Concentration `json:"concentration,omitempty" bson:"concentration,omitempty"` }
func ParseSimple ¶ added in v1.26.0
func ParseSimple(parser structure.ObjectParser) *Simple
func (*Simple) Normalize ¶ added in v1.26.0
func (s *Simple) Normalize(normalizer data.Normalizer)
func (*Simple) Parse ¶ added in v1.26.0
func (s *Simple) Parse(parser structure.ObjectParser)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.