Beispiel #1
0
 /// <summary>
 /// Creates a new instance of the <see cref="Appointment"/> class with
 /// the specified date and time.
 /// </summary>
 ///
 /// <param name="when">
 /// The date and time for the appointment.
 /// </param>
 ///
 /// <exception cref="ArgumentException">
 /// The <paramref name="when"/> parameter is <b>null</b>.
 /// </exception>
 ///
 public Appointment(HealthServiceDateTime when)
     : base(TypeId)
 {
     When = when;
 }
Beispiel #2
0
 /// <summary>
 /// Creates a new instance of the <see cref="AllergicEpisode"/> class
 /// with the specified date and name.
 /// </summary>
 ///
 /// <param name="when">
 /// The date/time when the allergic episode occurred.
 /// </param>
 ///
 /// <param name="name">
 /// The name of the allergy.
 /// </param>
 ///
 /// <exception cref="ArgumentNullException">
 /// The <paramref name="when"/> or <paramref name="name"/> parameter is <b>null</b>.
 /// </exception>
 ///
 public AllergicEpisode(HealthServiceDateTime when, CodableValue name)
     : base(TypeId)
 {
     When = when;
     Name = name;
 }
 /// <summary>
 /// Creates a new instance of the <see cref="Annotation"/> class with
 /// the specified date and time.
 /// </summary>
 ///
 /// <param name="when">
 /// The date/time when the annotation was taken.
 /// </param>
 ///
 /// <exception cref="ArgumentException">
 /// The <paramref name="when"/> parameter is <b>null</b>.
 /// </exception>
 ///
 public Annotation(HealthServiceDateTime when)
     : base(TypeId)
 {
     When = when;
 }
 /// <summary>
 /// Creates a new instance of the <see cref="Menstruation"/> class.
 /// </summary>
 ///
 /// <param name="when">
 /// The date/time of the menstrual flow.
 /// </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 Menstruation(HealthServiceDateTime when)
     : base(TypeId)
 {
     Validator.ThrowIfArgumentNull(when, nameof(When), Resources.WhenNullValue);
     _when = when;
 }
Beispiel #5
0
 /// <summary>
 /// Creates an instance of <see cref="BloodOxygenSaturation"/> with specified parameters.
 /// </summary>
 ///
 /// <param name="when">The date and time the measurement was taken.</param>
 ///
 /// <param name="value">The percentage of oxygen saturation in the blood.</param>
 ///
 /// <exception cref="ArgumentNullException">
 /// If <paramref name="when"/> is <b>null</b>.
 /// </exception>
 ///
 /// <exception cref="ArgumentOutOfRangeException">
 /// If <paramref name="value"/> is less than 0.0 or greater than 1.0.
 /// </exception>
 ///
 public BloodOxygenSaturation(HealthServiceDateTime when, double value)
     : base(TypeId)
 {
     When  = when;
     Value = value;
 }
Beispiel #6
0
        /// <summary>
        /// Populates this <see cref="Payer"/> instance from the data in the XML.
        /// </summary>
        ///
        /// <param name="typeSpecificXml">
        /// The XML to get the payer data from.
        /// </param>
        ///
        /// <exception cref="InvalidOperationException">
        /// The first node in <paramref name="typeSpecificXml"/> parameter is not
        /// a payer node.
        /// </exception>
        ///
        protected override void ParseXml(IXPathNavigable typeSpecificXml)
        {
            XPathNavigator payerNav =
                typeSpecificXml.CreateNavigator().SelectSingleNode("payer");

            Validator.ThrowInvalidIfNull(payerNav, Resources.PayerUnexpectedNode);

            _planName = payerNav.SelectSingleNode("plan-name").Value;

            _coverageType =
                XPathHelper.GetOptNavValue <CodableValue>(payerNav, "coverage-type");

            XPathNavigator carrierIdNav =
                payerNav.SelectSingleNode("carrier-id");

            if (carrierIdNav != null)
            {
                _carrierId = carrierIdNav.Value;
            }

            XPathNavigator groupNumNav =
                payerNav.SelectSingleNode("group-num");

            if (groupNumNav != null)
            {
                _groupNumber = groupNumNav.Value;
            }

            XPathNavigator planCodeNav =
                payerNav.SelectSingleNode("plan-code");

            if (planCodeNav != null)
            {
                _planCode = planCodeNav.Value;
            }

            XPathNavigator subscriberIdNav =
                payerNav.SelectSingleNode("subscriber-id");

            if (subscriberIdNav != null)
            {
                _subscriberId = subscriberIdNav.Value;
            }

            XPathNavigator personCodeNav =
                payerNav.SelectSingleNode("person-code");

            if (personCodeNav != null)
            {
                _personCode = personCodeNav.Value;
            }

            XPathNavigator subscriberNameNav =
                payerNav.SelectSingleNode("subscriber-name");

            if (subscriberNameNav != null)
            {
                _subscriberName = subscriberNameNav.Value;
            }

            XPathNavigator subscriberDobNav =
                payerNav.SelectSingleNode("subscriber-dob");

            if (subscriberDobNav != null)
            {
                _subscriberDateOfBirth = new HealthServiceDateTime();
                _subscriberDateOfBirth.ParseXml(subscriberDobNav);
            }

            XPathNavigator isPrimaryNav =
                payerNav.SelectSingleNode("is-primary");

            if (isPrimaryNav != null)
            {
                _isPrimary = isPrimaryNav.ValueAsBoolean;
            }

            XPathNavigator expirationDateNav =
                payerNav.SelectSingleNode("expiration-date");

            if (expirationDateNav != null)
            {
                _expirationDate = new HealthServiceDateTime();
                _expirationDate.ParseXml(expirationDateNav);
            }

            XPathNavigator contactNav =
                payerNav.SelectSingleNode("contact");

            if (contactNav != null)
            {
                _contact = new ContactInfo();
                _contact.ParseXml(contactNav);
            }
        }
 /// <summary>
 /// Creates a new instance of the <see cref="GroupMembershipActivity"/> class with the
 /// specified date/time and activity.
 /// </summary>
 ///
 /// <param name="when">
 /// The date/time when the activity occurred.
 /// </param>
 ///
 /// <param name="activity">
 /// The activity that occurred.
 /// </param>
 ///
 /// <exception cref="ArgumentNullException">
 /// If <paramref name="when"/> or <paramref name="activity"/> parameter is <b>null</b>.
 /// </exception>
 ///
 public GroupMembershipActivity(HealthServiceDateTime when, CodedValue activity)
     : base(TypeId)
 {
     When     = when;
     Activity = activity;
 }
Beispiel #8
0
 /// <summary>
 /// Creates a new instance of the <see cref="Problem"/> class with the
 /// specified date and time.
 /// </summary>
 ///
 /// <param name="when">
 /// The date/time for the health problem.
 /// </param>
 ///
 /// <exception cref="ArgumentException">
 /// The <paramref name="when"/> parameter is <b>null</b>.
 /// </exception>
 ///
 public Problem(HealthServiceDateTime when)
     : base(TypeId)
 {
     When = when;
 }
 /// <summary>
 /// Creates a new instance of the <see cref="HbA1C"/> class with the
 /// specified date and amount.
 /// </summary>
 ///
 /// <param name="when">
 /// The date/time when the HbA1C was taken.
 /// </param>
 ///
 /// <param name="value">
 /// The amount of glycosylated hemoglobin in the blood as a percentage.
 /// </param>
 ///
 /// <exception cref="ArgumentNullException">
 /// The <paramref name="when"/> parameter is <b>null</b>.
 /// </exception>
 ///
 /// <exception cref="ArgumentOutOfRangeException">
 /// The <paramref name="value"/> parameter is less than zero or greater than one.
 /// </exception>
 ///
 public HbA1C(HealthServiceDateTime when, double value)
     : base(TypeId)
 {
     When  = when;
     Value = value;
 }
 /// <summary>
 /// Creates an instance of <see cref="HeartRate"/> with specified parameters.
 /// </summary>
 ///
 /// <param name="when">The date and time the measurement was taken.</param>
 ///
 /// <param name="value">The heart rate in beats per minute (BPM).</param>
 ///
 /// <exception cref="ArgumentNullException">
 /// If <paramref name="when"/> is <b>null</b>.
 /// </exception>
 ///
 /// <exception cref="ArgumentOutOfRangeException">
 /// If <paramref name="value"/> is less than zero.
 /// </exception>
 ///
 public HeartRate(HealthServiceDateTime when, int value)
     : base(TypeId)
 {
     When  = when;
     Value = value;
 }
Beispiel #11
0
 /// <summary>
 /// Creates a new instance of the <see cref="RespiratoryProfile"/> class
 /// with the specified date and time.
 /// </summary>
 ///
 /// <param name="when">
 /// The date/time when the respiratory profile was take.
 /// </param>
 ///
 /// <exception cref="ArgumentNullException">
 /// The <paramref name="when"/> parameter is <b>null</b>.
 /// </exception>
 ///
 public RespiratoryProfile(HealthServiceDateTime when)
     : base(TypeId)
 {
     When = when;
 }
Beispiel #12
0
 /// <summary>
 /// Creates a new instance of the <see cref="HealthcareProxy"/> class
 /// with the specified date and time.
 /// </summary>
 ///
 /// <param name="when">
 /// The date/time for the healthcare proxy.
 /// </param>
 ///
 /// <exception cref="ArgumentException">
 /// The <paramref name="when"/> parameter is <b>null</b>.
 /// </exception>
 ///
 public HealthcareProxy(HealthServiceDateTime when)
     : base(TypeId)
 {
     When = when;
 }