示例#1
0
        /// <summary>
        /// Converts to HL7.
        /// </summary>
        /// <param name="administrativeGender">The administrative gender.</param>
        /// <returns>A <see cref="HL7Generator.Infrastructure.Table.GenderCodeset"/></returns>
        internal static GenderCodeset ConvertToHl7(AdministrativeGender administrativeGender)
        {
            GenderCodeset genderCodeset;

            if (administrativeGender != null && administrativeGender.WellKnownName != null)
            {
                if (administrativeGender.WellKnownName == WellKnownNames.CommonModule.AdministrativeGender.Female)
                {
                    genderCodeset = GenderCodeset.Female;
                }
                else if (administrativeGender.WellKnownName == WellKnownNames.CommonModule.AdministrativeGender.Male)
                {
                    genderCodeset = GenderCodeset.Male;
                }
                else
                {
                    genderCodeset = GenderCodeset.Unknown;
                }
            }
            else
            {
                genderCodeset = GenderCodeset.Unknown;
            }

            return(genderCodeset);
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PayorSubscriber"/> class.
 /// </summary>
 /// <param name="address">The address.</param>
 /// <param name="birthDate">The birth date.</param>
 /// <param name="gender">The gender.</param>
 /// <param name="name">The name.</param>
 /// <param name="payorSubscriberRelationshipType">Type of the payor subscriber relationship.</param>
 public PayorSubscriber(Address address,
                        DateTime?birthDate,
                        AdministrativeGender gender,
                        PersonName name,
                        PayorSubscriberRelationshipType payorSubscriberRelationshipType)
 {
     Address              = address;
     BirthDate            = birthDate;
     AdministrativeGender = gender;
     Name = name;
     PayorSubscriberRelationshipType = payorSubscriberRelationshipType;
 }
示例#3
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = (Address != null ? Address.GetHashCode() : 0);
         result = (result * 397) ^ (BirthDate.HasValue ? BirthDate.Value.GetHashCode() : 0);
         result = (result * 397) ^ (AdministrativeGender != null ? AdministrativeGender.GetHashCode() : 0);
         result = (result * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         result = (result * 397) ^ (PayorSubscriberRelationshipType != null ? PayorSubscriberRelationshipType.GetHashCode() : 0);
         return(result);
     }
 }
示例#4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientAccount"/> class.
        /// </summary>
        /// <param name="billingOffice">The billing office.</param>
        /// <param name="medicalRecordNumber">The medical record number.</param>
        /// <param name="name">The name.</param>
        /// <param name="birthDate">The birth date.</param>
        /// <param name="homeAddress">The home address.</param>
        /// <param name="administrativeGender">The administrative gender.</param>
        protected internal PatientAccount(BillingOffice billingOffice, long medicalRecordNumber, PersonName name, DateTime?birthDate, Address homeAddress, AdministrativeGender administrativeGender) : this()
        {
            Check.IsNotNull(billingOffice, "Billing office is required.");
            Check.IsNotNull(name, "Name is required.");
            Check.IsNotNull(medicalRecordNumber, "Medical record number is required.");
            Check.IsNotNull(homeAddress, () => HomeAddress);
            Check.IsNotNull(administrativeGender, "Gender is required.");

            BillingOffice       = billingOffice;
            MedicalRecordNumber = medicalRecordNumber;
            Name                 = name;
            BirthDate            = birthDate;
            HomeAddress          = homeAddress;
            AdministrativeGender = administrativeGender;
        }
示例#5
0
 /// <summary>
 /// Revises the gender.
 /// </summary>
 /// <param name="gender">The gender.</param>
 public virtual void ReviseGender(AdministrativeGender gender)
 {
     AdministrativeGender = gender;
 }
示例#6
0
        /// <summary>
        /// Creates the patient account.
        /// </summary>
        /// <param name="billingOffice">The billing office.</param>
        /// <param name="medicalRecordNumber">The medical record number.</param>
        /// <param name="name">The name.</param>
        /// <param name="birthDate">The birth date.</param>
        /// <param name="homeAddress">The home address.</param>
        /// <param name="administrativeGender">The administrative gender.</param>
        /// <returns>A patient account.</returns>
        public virtual PatientAccount CreatePatientAccount(BillingOffice billingOffice, long medicalRecordNumber, PersonName name, DateTime?birthDate, Address homeAddress, AdministrativeGender administrativeGender)
        {
            var patientAccount = new PatientAccount(billingOffice, medicalRecordNumber, name, birthDate, homeAddress, administrativeGender);

            _patientAccountRepository.MakePersistent(patientAccount);
            return(patientAccount);
        }
示例#7
0
 /// <summary>
 /// Revises the administrative gender.
 /// </summary>
 /// <param name="administrativeGender">The administrative gender.</param>
 public virtual void ReviseAdministrativeGender(AdministrativeGender administrativeGender)
 {
     Check.IsNotNull(administrativeGender, "Gender is required.");
     AdministrativeGender = administrativeGender;
 }
示例#8
0
 public virtual void SetAdministrativeGenderCode(AdministrativeGender administrativeGenderCode)
 {
     this.administrativeGenderCode.Value = administrativeGenderCode;
 }
示例#9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PatientGender"/> class.
 /// </summary>
 /// <param name="administrativeGender">The administrative gender.</param>
 public PatientGender(AdministrativeGender administrativeGender)
 {
     Check.IsNotNull(administrativeGender, "administrativeGender is required.");
     _administrativeGender = administrativeGender;
 }