Exemple #1
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 13, Configuration.FieldSeparator),
                       Id,
                       SetIdAis.HasValue ? SetIdAis.Value.ToString(culture) : null,
                       SegmentActionCode,
                       UniversalServiceIdentifier?.ToDelimitedString(),
                       StartDateTime.HasValue ? StartDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       StartDateTimeOffset.HasValue ? StartDateTimeOffset.Value.ToString(Consts.NumericFormat, culture) : null,
                       StartDateTimeOffsetUnits?.ToDelimitedString(),
                       Duration.HasValue ? Duration.Value.ToString(Consts.NumericFormat, culture) : null,
                       DurationUnits?.ToDelimitedString(),
                       AllowSubstitutionCode?.ToDelimitedString(),
                       FillerStatusCode?.ToDelimitedString(),
                       PlacerSupplementalServiceInformation != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerSupplementalServiceInformation.Select(x => x.ToDelimitedString())) : null,
                       FillerSupplementalServiceInformation != null ? string.Join(Configuration.FieldRepeatSeparator, FillerSupplementalServiceInformation.Select(x => x.ToDelimitedString())) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 29, Configuration.FieldSeparator),
                       Id,
                       PlacerAppointmentId?.ToDelimitedString(),
                       FillerAppointmentId?.ToDelimitedString(),
                       OccurrenceNumber.HasValue ? OccurrenceNumber.Value.ToString(Consts.NumericFormat, culture) : null,
                       PlacerGroupNumber?.ToDelimitedString(),
                       ScheduleId?.ToDelimitedString(),
                       EventReason?.ToDelimitedString(),
                       AppointmentReason?.ToDelimitedString(),
                       AppointmentType?.ToDelimitedString(),
                       AppointmentDuration.HasValue ? AppointmentDuration.Value.ToString(Consts.NumericFormat, culture) : null,
                       AppointmentDurationUnits?.ToDelimitedString(),
                       AppointmentTimingQuantity,
                       PlacerContactPerson != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerContactPerson.Select(x => x.ToDelimitedString())) : null,
                       PlacerContactPhoneNumber?.ToDelimitedString(),
                       PlacerContactAddress != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerContactAddress.Select(x => x.ToDelimitedString())) : null,
                       PlacerContactLocation?.ToDelimitedString(),
                       FillerContactPerson != null ? string.Join(Configuration.FieldRepeatSeparator, FillerContactPerson.Select(x => x.ToDelimitedString())) : null,
                       FillerContactPhoneNumber?.ToDelimitedString(),
                       FillerContactAddress != null ? string.Join(Configuration.FieldRepeatSeparator, FillerContactAddress.Select(x => x.ToDelimitedString())) : null,
                       FillerContactLocation?.ToDelimitedString(),
                       EnteredByPerson != null ? string.Join(Configuration.FieldRepeatSeparator, EnteredByPerson.Select(x => x.ToDelimitedString())) : null,
                       EnteredByPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, EnteredByPhoneNumber.Select(x => x.ToDelimitedString())) : null,
                       EnteredByLocation?.ToDelimitedString(),
                       ParentPlacerAppointmentId?.ToDelimitedString(),
                       ParentFillerAppointmentId?.ToDelimitedString(),
                       FillerStatusCode?.ToDelimitedString(),
                       PlacerOrderNumber != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerOrderNumber.Select(x => x.ToDelimitedString())) : null,
                       FillerOrderNumber != null ? string.Join(Configuration.FieldRepeatSeparator, FillerOrderNumber.Select(x => x.ToDelimitedString())) : null,
                       AlternatePlacerOrderGroupNumber?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }