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

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 26, Configuration.FieldSeparator),
                       Id,
                       PlacerAppointmentId?.ToDelimitedString(),
                       FillerAppointmentId?.ToDelimitedString(),
                       OccurrenceNumber.HasValue ? OccurrenceNumber.Value.ToString(Consts.NumericFormat, culture) : null,
                       PlacerGroupNumber?.ToDelimitedString(),
                       ScheduleId?.ToDelimitedString(),
                       RequestEventReason?.ToDelimitedString(),
                       AppointmentReason?.ToDelimitedString(),
                       AppointmentType?.ToDelimitedString(),
                       AppointmentDuration.HasValue ? AppointmentDuration.Value.ToString(Consts.NumericFormat, culture) : null,
                       AppointmentDurationUnits?.ToDelimitedString(),
                       RequestedStartDateTimeRange != null ? string.Join(Configuration.FieldRepeatSeparator, RequestedStartDateTimeRange.Select(x => x.ToDelimitedString())) : null,
                       PriorityArq,
                       RepeatingInterval?.ToDelimitedString(),
                       RepeatingIntervalDuration,
                       PlacerContactPerson != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerContactPerson.Select(x => x.ToDelimitedString())) : null,
                       PlacerContactPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerContactPhoneNumber.Select(x => x.ToDelimitedString())) : null,
                       PlacerContactAddress != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerContactAddress.Select(x => x.ToDelimitedString())) : null,
                       PlacerContactLocation?.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(),
                       PlacerOrderNumber != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerOrderNumber.Select(x => x.ToDelimitedString())) : null,
                       FillerOrderNumber != null ? string.Join(Configuration.FieldRepeatSeparator, FillerOrderNumber.Select(x => x.ToDelimitedString())) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Example #2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 26, 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 != null ? string.Join(Configuration.FieldRepeatSeparator, AppointmentTimingQuantity.Select(x => x.ToDelimitedString())) : null,
                       PlacerContactPerson?.ToDelimitedString(),
                       PlacerContactPhoneNumber?.ToDelimitedString(),
                       PlacerContactAddress?.ToDelimitedString(),
                       PlacerContactLocation?.ToDelimitedString(),
                       FillerContactPerson?.ToDelimitedString(),
                       FillerContactPhoneNumber?.ToDelimitedString(),
                       FillerContactAddress?.ToDelimitedString(),
                       FillerContactLocation?.ToDelimitedString(),
                       EnteredByPerson?.ToDelimitedString(),
                       EnteredByPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, EnteredByPhoneNumber.Select(x => x.ToDelimitedString())) : null,
                       EnteredByLocation?.ToDelimitedString(),
                       ParentPlacerAppointmentId?.ToDelimitedString(),
                       ParentFillerAppointmentId?.ToDelimitedString(),
                       FillerStatusCode?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }