示例#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()));
        }
示例#2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 12, 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
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }