/// <summary> /// Initializes a new instance of the <see cref="TedsInterviewCoreKeyFields"/> class. /// </summary> /// <param name="systemDataSet">The system data set.</param> /// <param name="providerIdentifier">The provider identifier.</param> /// <param name="clientIdentifier">The client identifier.</param> /// <param name="coDependentIndicator">If set to <c>true</c> [co dependent indicator].</param> /// <param name="tedsServiceType">Type of the teds service.</param> protected internal TedsInterviewCoreKeyFields( SystemDataSet systemDataSet, TedsIdentifier providerIdentifier, TedsIdentifier clientIdentifier, bool coDependentIndicator, TedsAnswer <TedsServiceType> tedsServiceType) { Check.IsNotNull(systemDataSet, () => SystemDataSet); Check.IsNotNull(providerIdentifier, () => ProviderIdentifier); Check.IsNotNull(clientIdentifier, () => ClientIdentifier); Check.IsNotNull(tedsServiceType, () => TedsServiceType); CheckIfTedsAnswerHasInvalidNonResponse(tedsServiceType, () => this.TedsServiceType, "type of services"); if (!coDependentIndicator && !tedsServiceType.HasResponse && tedsServiceType.TedsNonResponse.WellKnownName == WellKnownNames.TedsModule.TedsNonResponse.NotApplicable) { throw new ArgumentException("Use not applicable for type of services only for co-dependents/collateral clients."); } SystemDataSet = systemDataSet; ProviderIdentifier = providerIdentifier; ClientIdentifier = clientIdentifier; CoDependentIndicator = coDependentIndicator; TedsServiceType = tedsServiceType; }
/// <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 { var result = (SystemDataSet != null ? SystemDataSet.GetHashCode() : 0); result = (result * 397) ^ (ProviderIdentifier != null ? ProviderIdentifier.GetHashCode() : 0); result = (result * 397) ^ (ClientIdentifier != null ? ClientIdentifier.GetHashCode() : 0); result = (result * 397) ^ CoDependentIndicator.GetHashCode(); result = (result * 397) ^ (TedsServiceType != null ? TedsServiceType.GetHashCode() : 0); return(result); } }
/// <summary> /// Initializes a new instance of the <see cref="TedsDischargeKeyFields"/> class. /// </summary> /// <param name="systemDataSet">The system data set.</param> /// <param name="providerIdentifier">The provider identifier.</param> /// <param name="clientIdentifier">The client identifier.</param> /// <param name="coDependentIndicator">If set to <c>true</c> [co dependent indicator].</param> /// <param name="clientTransactionType">Type of the client transaction.</param> /// <param name="admissionDate">The admission date.</param> /// <param name="tedsServiceType">Type of the teds service.</param> public TedsDischargeKeyFields( SystemDataSet systemDataSet, TedsIdentifier providerIdentifier, TedsIdentifier clientIdentifier, bool coDependentIndicator, ClientTransactionType clientTransactionType, DateTime admissionDate, TedsAnswer <TedsServiceType> tedsServiceType) : base(systemDataSet, providerIdentifier, clientIdentifier, coDependentIndicator, tedsServiceType) { DischargeDate = admissionDate; }
/// <summary> /// Initializes a new instance of the <see cref="TedsAdmissionKeyFields"/> class. /// </summary> /// <param name="systemDataSet">The system data set.</param> /// <param name="providerIdentifier">The provider identifier.</param> /// <param name="clientIdentifier">The client identifier.</param> /// <param name="coDependentIndicator">If set to <c>true</c> [co dependent indicator].</param> /// <param name="tedsServiceType">Type of the teds service.</param> /// <param name="clientTransactionType">Type of the client transaction.</param> /// <param name="admissionDate">The admission date.</param> public TedsAdmissionKeyFields( SystemDataSet systemDataSet, TedsIdentifier providerIdentifier, TedsIdentifier clientIdentifier, bool coDependentIndicator, TedsAnswer <TedsServiceType> tedsServiceType, ClientTransactionType clientTransactionType, DateTime admissionDate) : base(systemDataSet, providerIdentifier, clientIdentifier, coDependentIndicator, tedsServiceType) { Check.IsNotNull(clientTransactionType, () => ClientTransactionType); ClientTransactionType = clientTransactionType; AdmissionDate = admissionDate; }