/// <summary> /// Translates the specified clinical payor coverage. /// </summary> /// <param name="clinicalPayorCoverage">The clinical payor coverage.</param> /// <returns>A billing PayorCoverage.</returns> public PayorCoverage Translate(PayorCoverageCache clinicalPayorCoverage) { if (clinicalPayorCoverage == null) { return null; } var payor = _payorRepository.GetByKey ( clinicalPayorCoverage.PayorCache.Key ); var clinicalPayorSubscriber = clinicalPayorCoverage.PayorSubscriberCache; var payorSubscriberRelationshipType = _lookupValueRepository.GetLookupByWellKnownName<PayorSubscriberRelationshipType> ( clinicalPayorSubscriber.PayorSubscriberRelationshipCacheType.WellKnownName ); var payorSubscriber = new PayorSubscriber ( clinicalPayorSubscriber.Address, clinicalPayorSubscriber.BirthDate, clinicalPayorSubscriber.AdministrativeGender, clinicalPayorSubscriber.Name, payorSubscriberRelationshipType ); var payorCoverageType = _lookupValueRepository.GetLookupByWellKnownName<PayorCoverageType> ( clinicalPayorCoverage.PayorCoverageCacheType.WellKnownName ); var billingPayorCoverage = new PayorCoverage ( payor, payorSubscriber, clinicalPayorCoverage.MemberNumber, clinicalPayorCoverage.EffectiveDateRange, payorCoverageType); return billingPayorCoverage; }
/// <summary> /// Equals the specified other. /// </summary> /// <param name="other">The other.</param> /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns> public virtual bool Equals(PayorCoverage other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(base.Equals(other) && Equals(other.EffectiveCoverageDateRange, EffectiveCoverageDateRange) && Equals(other.MemberNumber, MemberNumber) && Equals(other.Payor, Payor) && Equals(other.PayorSubscriber, PayorSubscriber)); }
/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="payorCoverage"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual(PayorCoverage payorCoverage) { if (payorCoverage == null) { return(false); } var valuesEqual = Equals(Payor.Key, payorCoverage.Payor.Key) && Equals(PayorSubscriber, payorCoverage.PayorSubscriber) && Equals(MemberNumber, payorCoverage.MemberNumber) && Equals(EffectiveCoverageDateRange, payorCoverage.EffectiveCoverageDateRange); return(valuesEqual); }
/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="payorCoverage"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual(PayorCoverage payorCoverage) { if (payorCoverage == null) { return false; } var valuesEqual = Equals(Payor.Key, payorCoverage.Payor.Key) && Equals(PayorSubscriber, payorCoverage.PayorSubscriber) && Equals(MemberNumber, payorCoverage.MemberNumber) && Equals(EffectiveCoverageDateRange, payorCoverage.EffectiveCoverageDateRange); return valuesEqual; }
/// <summary> /// Equals the specified other. /// </summary> /// <param name="other">The other.</param> /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns> public virtual bool Equals(PayorCoverage other) { if (ReferenceEquals(null, other)) { return false; } if (ReferenceEquals(this, other)) { return true; } return base.Equals(other) && Equals(other.EffectiveCoverageDateRange, EffectiveCoverageDateRange) && Equals(other.MemberNumber, MemberNumber) && Equals(other.Payor, Payor) && Equals(other.PayorSubscriber, PayorSubscriber); }