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

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 21, Configuration.FieldSeparator),
                       Id,
                       SetIdBtx.HasValue ? SetIdBtx.Value.ToString(culture) : null,
                       BcDonationId?.ToDelimitedString(),
                       BcComponent?.ToDelimitedString(),
                       BcBloodGroup?.ToDelimitedString(),
                       CpCommercialProduct?.ToDelimitedString(),
                       CpManufacturer?.ToDelimitedString(),
                       CpLotNumber?.ToDelimitedString(),
                       BpQuantity.HasValue ? BpQuantity.Value.ToString(Consts.NumericFormat, culture) : null,
                       BpAmount.HasValue ? BpAmount.Value.ToString(Consts.NumericFormat, culture) : null,
                       BpUnits?.ToDelimitedString(),
                       BpTransfusionDispositionStatus?.ToDelimitedString(),
                       BpMessageStatus,
                       BpDateTimeOfStatus.HasValue ? BpDateTimeOfStatus.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       BpTransfusionAdministrator?.ToDelimitedString(),
                       BpTransfusionVerifier?.ToDelimitedString(),
                       BpTransfusionStartDateTimeOfStatus.HasValue ? BpTransfusionStartDateTimeOfStatus.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       BpTransfusionEndDateTimeOfStatus.HasValue ? BpTransfusionEndDateTimeOfStatus.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       BpAdverseReactionType != null ? string.Join(Configuration.FieldRepeatSeparator, BpAdverseReactionType.Select(x => x.ToDelimitedString())) : null,
                       BpTransfusionInterruptedReason?.ToDelimitedString(),
                       BpUniqueId?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Example #2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 22, Configuration.FieldSeparator),
                       Id,
                       SetIdBpx.HasValue ? SetIdBpx.Value.ToString(culture) : null,
                       BpDispenseStatus?.ToDelimitedString(),
                       BpStatus,
                       BpDateTimeOfStatus.HasValue ? BpDateTimeOfStatus.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       BcDonationId?.ToDelimitedString(),
                       BcComponent?.ToDelimitedString(),
                       BcDonationTypeIntendedUse?.ToDelimitedString(),
                       CpCommercialProduct?.ToDelimitedString(),
                       CpManufacturer?.ToDelimitedString(),
                       CpLotNumber?.ToDelimitedString(),
                       BpBloodGroup?.ToDelimitedString(),
                       BcSpecialTesting != null ? string.Join(Configuration.FieldRepeatSeparator, BcSpecialTesting.Select(x => x.ToDelimitedString())) : null,
                       BpExpirationDateTime.HasValue ? BpExpirationDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       BpQuantity.HasValue ? BpQuantity.Value.ToString(Consts.NumericFormat, culture) : null,
                       BpAmount.HasValue ? BpAmount.Value.ToString(Consts.NumericFormat, culture) : null,
                       BpUnits?.ToDelimitedString(),
                       BpUniqueId?.ToDelimitedString(),
                       BpActualDispensedToLocation?.ToDelimitedString(),
                       BpActualDispensedToAddress?.ToDelimitedString(),
                       BpDispensedToReceiver?.ToDelimitedString(),
                       BpDispensingIndividual?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }