Пример #1
0
        /// <summary>
        /// Parse Patient from patient-attributes.
        /// </summary>
        /// <param name="headerValue"></param>
        public Patient(string headerValue)
        {
            var patientAttributes = ContextParser.GetPatientAttributes(headerValue, ContextError.InvalidPatient);

            GivenName            = patientAttributes.SingleOrDefault(p => p.Key.Equals(ContextStandard.Patient.PatientGivenName)).Value;
            SurName              = patientAttributes.SingleOrDefault(p => p.Key.Equals(ContextStandard.Patient.PatientSurName)).Value;
            MiddleName           = patientAttributes.SingleOrDefault(p => p.Key.Equals(ContextStandard.Patient.PatientMiddleName)).Value;
            DateOfBirth          = patientAttributes.SingleOrDefault(p => p.Key.Equals(ContextStandard.Patient.PatientDateOfBirth)).Value;
            Gender               = patientAttributes.SingleOrDefault(p => p.Key.Equals(ContextStandard.Patient.PatientGender)).Value;
            SocialSecurityNumber = patientAttributes.SingleOrDefault(p => p.Key.Equals(ContextStandard.Patient.PatientSocialSecurityNumber)).Value;
            TelephoneNumber      = patientAttributes.SingleOrDefault(p => p.Key.Equals(ContextStandard.Patient.PatientTelephoneNumber)).Value;
            StreetAddress        = patientAttributes.SingleOrDefault(p => p.Key.Equals(ContextStandard.Patient.PatientStreetAddress)).Value;
            PostalCode           = patientAttributes.SingleOrDefault(p => p.Key.Equals(ContextStandard.Patient.PatientPostalCode)).Value;
        }