Example #1
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 = DisabilityDescription != null?DisabilityDescription.GetHashCode() : 0;

                result = (result * 397) ^ (DisabilityPercentageValue != null ? DisabilityPercentageValue.GetHashCode() : 0);
                result = (result * 397) ^ (HaveCombatHistoryIndicator.HasValue ? HaveCombatHistoryIndicator.Value.GetHashCode() : 0);
                result = (result * 397) ^ (HaveServedInMilitaryIndicator.HasValue ? HaveServedInMilitaryIndicator.Value.GetHashCode() : 0);
                result = (result * 397) ^ (RegisteredVaHospitalName != null ? RegisteredVaHospitalName.GetHashCode() : 0);
                result = (result * 397) ^ (ServiceDateRange != null ? ServiceDateRange.GetHashCode() : 0);
                result = (result * 397) ^ (VaCaseNumber != null ? VaCaseNumber.GetHashCode() : 0);
                result = (result * 397) ^ (VeteranDischargeStatus != null ? VeteranDischargeStatus.GetHashCode() : 0);
                result = (result * 397) ^ (VeteranServiceBranch != null ? VeteranServiceBranch.GetHashCode() : 0);
                result = (result * 397) ^ (VeteranStatus != null ? VeteranStatus.GetHashCode() : 0);
                return(result);
            }
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PatientVeteranInformation"/> class.
 /// </summary>
 /// <param name="disabilityDescription">
 /// The disability description.
 /// </param>
 /// <param name="disabilityPercentageValue">
 /// The disability percentage value.
 /// </param>
 /// <param name="haveCombatHistoryIndicator">
 /// The have Combat History Indicator.
 /// </param>
 /// <param name="haveServedInMilitaryIndicator">
 /// The have served in military indicator.
 /// </param>
 /// <param name="registeredVaHospitalName">
 /// The registered VA hospital name.
 /// </param>
 /// <param name="serviceDateRange">
 /// The service date range.
 /// </param>
 /// <param name="vaCaseNumber">
 /// The VA case number.
 /// </param>
 /// <param name="veteranDischargeStatus">
 /// The veteran discharge status.
 /// </param>
 /// <param name="veteranServiceBranch">
 /// The veteran service branch.
 /// </param>
 /// <param name="veteranStatus">
 /// The veteran status.
 /// </param>
 public PatientVeteranInformation(
     string disabilityDescription,
     string disabilityPercentageValue,
     bool?haveCombatHistoryIndicator,
     bool?haveServedInMilitaryIndicator,
     string registeredVaHospitalName,
     DateRange serviceDateRange,
     string vaCaseNumber,
     VeteranDischargeStatus veteranDischargeStatus,
     VeteranServiceBranch veteranServiceBranch,
     VeteranStatus veteranStatus)
 {
     DisabilityDescription         = disabilityDescription;
     DisabilityPercentageValue     = disabilityPercentageValue;
     HaveCombatHistoryIndicator    = haveCombatHistoryIndicator;
     HaveServedInMilitaryIndicator = haveServedInMilitaryIndicator;
     RegisteredVaHospitalName      = registeredVaHospitalName;
     ServiceDateRange       = serviceDateRange;
     VaCaseNumber           = vaCaseNumber;
     VeteranDischargeStatus = veteranDischargeStatus;
     VeteranServiceBranch   = veteranServiceBranch;
     VeteranStatus          = veteranStatus;
 }