Exemplo n.º 1
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 26, Configuration.FieldSeparator),
                       Id,
                       ReferralStatus?.ToDelimitedString(),
                       ReferralPriority?.ToDelimitedString(),
                       ReferralType?.ToDelimitedString(),
                       ReferralDisposition != null ? string.Join(Configuration.FieldRepeatSeparator, ReferralDisposition.Select(x => x.ToDelimitedString())) : null,
                       ReferralCategory?.ToDelimitedString(),
                       OriginatingReferralIdentifier?.ToDelimitedString(),
                       EffectiveDate.HasValue ? EffectiveDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ExpirationDate.HasValue ? ExpirationDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ProcessDate.HasValue ? ProcessDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ReferralReason != null ? string.Join(Configuration.FieldRepeatSeparator, ReferralReason.Select(x => x.ToDelimitedString())) : null,
                       ExternalReferralIdentifier != null ? string.Join(Configuration.FieldRepeatSeparator, ExternalReferralIdentifier.Select(x => x.ToDelimitedString())) : null,
                       ReferralDocumentationCompletionStatus?.ToDelimitedString(),
                       PlannedTreatmentStopDate.HasValue ? PlannedTreatmentStopDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ReferralReasonText,
                       NumberOfAuthorizedTreatmentsUnits?.ToDelimitedString(),
                       NumberOfUsedTreatmentsUnits?.ToDelimitedString(),
                       NumberOfScheduleTreatmentsUnits?.ToDelimitedString(),
                       RemainingBenefitAmount?.ToDelimitedString(),
                       AuthorizedProvider?.ToDelimitedString(),
                       AuthorizedHealthProfessional?.ToDelimitedString(),
                       SourceText,
                       SourceDate.HasValue ? SourceDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       SourcePhone?.ToDelimitedString(),
                       Comment,
                       ActionCode
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 30, Configuration.FieldSeparator),
                       Id,
                       AuthorizingPayorPlanId?.ToDelimitedString(),
                       AuthorizingPayorCompanyId?.ToDelimitedString(),
                       AuthorizingPayorCompanyName,
                       AuthorizationEffectiveDate.HasValue ? AuthorizationEffectiveDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       AuthorizationExpirationDate.HasValue ? AuthorizationExpirationDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       AuthorizationIdentifier?.ToDelimitedString(),
                       ReimbursementLimit?.ToDelimitedString(),
                       RequestedNumberOfTreatments?.ToDelimitedString(),
                       AuthorizedNumberOfTreatments?.ToDelimitedString(),
                       ProcessDate.HasValue ? ProcessDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       RequestedDisciplines != null ? string.Join(Configuration.FieldRepeatSeparator, RequestedDisciplines.Select(x => x.ToDelimitedString())) : null,
                       AuthorizedDisciplines != null ? string.Join(Configuration.FieldRepeatSeparator, AuthorizedDisciplines.Select(x => x.ToDelimitedString())) : null,
                       AuthorizationReferralType?.ToDelimitedString(),
                       ApprovalStatus?.ToDelimitedString(),
                       PlannedTreatmentStopDate.HasValue ? PlannedTreatmentStopDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ClinicalService?.ToDelimitedString(),
                       ReasonText,
                       NumberOfAuthorizedTreatmentsUnits?.ToDelimitedString(),
                       NumberOfUsedTreatmentsUnits?.ToDelimitedString(),
                       NumberOfScheduleTreatmentsUnits?.ToDelimitedString(),
                       EncounterType?.ToDelimitedString(),
                       RemainingBenefitAmount?.ToDelimitedString(),
                       AuthorizedProvider?.ToDelimitedString(),
                       AuthorizedHealthProfessional?.ToDelimitedString(),
                       SourceText,
                       SourceDate.HasValue ? SourceDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       SourcePhone?.ToDelimitedString(),
                       Comment,
                       ActionCode
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }