/// <summary> /// Populates the data for the measurement from the XML. /// </summary> /// /// <param name="navigator"> /// The XML node representing the measurement. /// </param> /// /// <exception cref="ArgumentNullException"> /// The <paramref name="navigator"/> parameter is <b>null</b>. /// </exception> /// public override void ParseXml(XPathNavigator navigator) { Validator.ThrowIfNavigatorNull(navigator); ParseValueXml(navigator); XPathNavigator displayNav = navigator.SelectSingleNode("display"); if (displayNav != null) { _displayValue = new DisplayValue(); _displayValue.ParseXml(displayNav); } }
/// <summary> /// Creates a new instance of the <see cref="Height"/> class with the /// specified height in meters and display value. /// </summary> /// /// <param name="meters"> /// The height in meters. /// </param> /// /// <param name="displayValue"> /// The height value as entered by the user. Typically, the display value is /// used when the user-entered height units are not in meters. /// </param> /// /// <remarks> /// The item is not added to the health record until the <see cref="IThingClient.CreateNewThingsAsync{ThingBase}(Guid, ICollection{ThingBase})"/> method is called. /// </remarks> /// public Height(double meters, DisplayValue displayValue) : base(TypeId) { _value.Value = meters; _value.DisplayValue = displayValue; }
/// <summary> /// Creates a new instance of the <see cref="ConcentrationMeasurement"/> /// class with the specified value in millimoles per liter (mmol/L) /// and display value. /// </summary> /// /// <param name="millimolesPerLiter"> /// The concentration value in millimoles per liter. /// </param> /// /// <param name="displayValue"> /// The display value of the concentration measurement. This should /// contain the exact measurement as entered by the user, even if it /// uses some other unit of measure besides mmol/L. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public ConcentrationMeasurement( double millimolesPerLiter, DisplayValue displayValue) : base(millimolesPerLiter, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="DoubleMeasurement"/> class /// with the specified value and optional display value. /// </summary> /// /// <param name="value"> /// The value of the measurement. /// </param> /// /// <param name="displayValue"> /// The display value of the measurement. This should contain the /// exact measurement as entered by the user even if it uses some /// other unit of measure. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user entered value. /// </param> /// public DoubleMeasurement( double value, DisplayValue displayValue) : base(value, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="TorqueMeasurement"/> /// class with the specified value in newton meters and optional display value. /// </summary> /// /// <param name="newtonMeters"> /// The torque in newton meters. /// </param> /// /// <param name="displayValue"> /// The display value of the torque. This should contain the /// exact torque as entered by the user even if it uses some /// other unit of measure besides newton meters. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public TorqueMeasurement( double newtonMeters, DisplayValue displayValue) : base(newtonMeters, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="StringMeasurement"/> /// class with the specified value and optional display value. /// </summary> /// /// <param name="value"> /// The value of the measurement. /// </param> /// /// <param name="displayValue"> /// The display value of the measurement. This should contain the /// exact measurement as entered by the user even if it uses some /// other unit of measure. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user entered value. /// </param> /// public StringMeasurement(string value, DisplayValue displayValue) : base(value, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="AltitudeMeasurement"/> /// class with the specified value in meters and optional display value. /// </summary> /// /// <param name="meters"> /// The altitude in meters. /// </param> /// /// <param name="displayValue"> /// The display value of the altitude. This should contain the /// exact altitude as entered by the user even if it uses some /// other unit of measure besides meters. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public AltitudeMeasurement(double meters, DisplayValue displayValue) : base(meters, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="SpeedMeasurement"/> class with /// the specified value in meters per second and optional display value. /// </summary> /// /// <param name="metersPerSecond"> /// The speed in meters per second. /// </param> /// /// <param name="displayValue"> /// The display value of the speed. This should contain the /// exact speed as entered by the user even if it uses some /// other unit of measure besides meters per second. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public SpeedMeasurement(double metersPerSecond, DisplayValue displayValue) : base(metersPerSecond, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="RespiratoryRateMeasurement"/> class with /// the specified value in breaths per minute and optional display value. /// </summary> /// /// <param name="breathsPerMinute"> /// The respiratory rate in breaths per minute. /// </param> /// /// <param name="displayValue"> /// The display value of the respiratory rate. This should contain the /// exact respiratory rate as entered by the user even if it uses some /// other unit of measure besides breaths per minute. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public RespiratoryRateMeasurement(double breathsPerMinute, DisplayValue displayValue) : base(breathsPerMinute, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="PowerMeasurement"/> /// class with the specified value in watts and optional display value. /// </summary> /// /// <param name="watts"> /// The power in watts. /// </param> /// /// <param name="displayValue"> /// The display value of the power. This should contain the /// exact power as entered by the user even if it uses some /// other unit of measure besides watts. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public PowerMeasurement( double watts, DisplayValue displayValue) : base(watts, displayValue) { }
/// <summary> /// Creates a new instance of the Measurement class with /// the specified value and optional display value. /// </summary> /// /// <param name="value"> /// An instance of MeasurementType representing the value. /// </param> /// /// <param name="displayValue"> /// The display value of the measurement. This should contain the /// exact measurement as entered by the user even if it uses a /// unit of measure other than the base unit of measure for the /// type. The display value /// <see cref="ItemTypes.DisplayValue.Units"/> and /// <see cref="ItemTypes.DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public Measurement(MeasurementType value, DisplayValue displayValue) { Value = value; DisplayValue = displayValue; }
/// <summary> /// Creates a new instance of the <see cref="VolumeMeasurement"/> class with /// the specified value in liters and optional display value. /// </summary> /// /// <param name="liters"> /// The volume in liters. /// </param> /// /// <param name="displayValue"> /// The display value of the volume. This should contain the /// exact volume as entered by the user even if it uses some /// other unit of measure besides liters. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// /// <exception cref="ArgumentOutOfRangeException"> /// If <paramref name="liters"/> is less than zero. /// </exception> /// public VolumeMeasurement(double liters, DisplayValue displayValue) : base(liters, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="WeightValue"/> class with /// the specified value in kilograms and the specified display value. /// </summary> /// /// <param name="kilograms"> /// The weight value in kilograms. /// </param> /// /// <param name="displayValue"> /// The display value of the weight. This should contain the /// exact weight as entered by the user, even if it uses some /// other unit of measure besides kilograms. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public WeightValue(double kilograms, DisplayValue displayValue) : base(kilograms, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="BloodGlucoseMeasurement"/> /// class with the specified value in millimoles per liter (mmol/L) /// and display value. /// </summary> /// /// <param name="millimolesPerLiter"> /// The blood glucose measurement in millimoles per liter (mmol/L). /// </param> /// /// <param name="displayValue"> /// The display value of the blood glucose measurement. This should /// contain the exact measurement as entered by the user, even if it /// uses some other unit of measure besides mmol/L. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public BloodGlucoseMeasurement( double millimolesPerLiter, DisplayValue displayValue) : base(millimolesPerLiter, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="Length"/> class with the /// specified value in meters and optional display value. /// </summary> /// /// <param name="meters"> /// The length in meters. /// </param> /// /// <param name="displayValue"> /// The display value of the length. This should contain the /// exact length as entered by the user even if it uses some /// other unit of measure besides meters. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public Length(double meters, DisplayValue displayValue) : base(meters, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="InsulinInjectionMeasurement"/> /// class with the specified value in IE (1/100mL) and display value. /// </summary> /// /// <param name="iE"> /// The insulin injection measurement in IE (1/100mL). /// </param> /// /// <param name="displayValue"> /// The display value of the insulin injection measurement. This should /// contain the exact measurement as entered by the user even if it /// uses some other unit of measure besides IE. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public InsulinInjectionMeasurement(double iE, DisplayValue displayValue) : base(iE, displayValue) { }
public PressureMeasurement(double pascals, DisplayValue displayValue) : base(pascals, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="FoodEnergyValue"/> class /// specifying mandatory values. /// </summary> /// /// <param name="calories"> /// The amount of calories consumed. /// </param> /// <param name="displayValue"> /// The display value of the energy. This should contain the /// exact value as entered by the user, even if it uses some /// other unit of measure besides calories. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public FoodEnergyValue(double calories, DisplayValue displayValue) : base(calories, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="HbA1CMeasurement"/> /// class with the specified value in millimoles per mole (mmol/mol) /// and display value. /// </summary> /// /// <param name="millimolesPerMole"> /// The concentration value in millimoles per mole. /// </param> /// /// <param name="displayValue"> /// The display value of the HbA1C measurement. This should /// contain the exact measurement as entered by the user, even if it /// uses some other unit of measure besides mmol/mol. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public HbA1CMeasurement( double millimolesPerMole, DisplayValue displayValue) : base(millimolesPerMole, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="FlowMeasurement"/> class with /// the specified value in liters per second and optional display value. /// </summary> /// /// <param name="litersPerSecond"> /// The flow in liters per second. /// </param> /// /// <param name="displayValue"> /// The display value of the flow. This should contain the /// exact flow as entered by the user even if it uses some /// other unit of measure besides liters per second. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public FlowMeasurement(double litersPerSecond, DisplayValue displayValue) : base(litersPerSecond, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="PaceMeasurement"/> /// class with the specified value in seconds per 100 meters and /// optional display value. /// </summary> /// /// <param name="secondsPerHundredMeters"> /// The pace in seconds per 100 meters. /// </param> /// /// <param name="displayValue"> /// The display value of the pace. This should contain the /// exact pace as entered by the user even if it uses some /// other unit of measure besides seconds per 100 meters. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public PaceMeasurement(double secondsPerHundredMeters, DisplayValue displayValue) : base(secondsPerHundredMeters, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="TemperatureMeasurement"/> /// class with the specified value in degrees Celsius and optional display value. /// </summary> /// /// <param name="celsius"> /// The temperature in degrees Celsius. /// </param> /// /// <param name="displayValue"> /// The display value of the temperature. This should contain the /// exact temperature as entered by the user even if it uses some /// other unit of measure besides degrees Celsius. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user-entered value. /// </param> /// public TemperatureMeasurement(double celsius, DisplayValue displayValue) : base(celsius, displayValue) { }
/// <summary> /// Creates a new instance of the <see cref="Int32Measurement"/> class /// with the specified value and optional display value. /// </summary> /// /// <param name="value"> /// The value of the measurement. /// </param> /// /// <param name="displayValue"> /// The display value of the measurement. This should contain the /// exact measurement as entered by the user even if it uses some /// other unit of measure. The display value /// <see cref="DisplayValue.Units"/> and /// <see cref="DisplayValue.UnitsCode"/> /// represents the unit of measure for the user entered value. /// </param> /// public Int32Measurement(int value, DisplayValue displayValue) : base(value, displayValue) { }