/// <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); }
/// <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; }
/// <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); } }
/// <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; }
/// <summary> /// Revises the gender. /// </summary> /// <param name="gender">The gender.</param> public virtual void ReviseGender(AdministrativeGender gender) { AdministrativeGender = gender; }
/// <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); }
/// <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; }
public virtual void SetAdministrativeGenderCode(AdministrativeGender administrativeGenderCode) { this.administrativeGenderCode.Value = administrativeGenderCode; }
/// <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; }