/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 31, Configuration.FieldSeparator), Id, QuantityTiming?.ToDelimitedString(), GiveCode?.ToDelimitedString(), GiveAmountMinimum.HasValue ? GiveAmountMinimum.Value.ToString(Consts.NumericFormat, culture) : null, GiveAmountMaximum.HasValue ? GiveAmountMaximum.Value.ToString(Consts.NumericFormat, culture) : null, GiveUnits?.ToDelimitedString(), GiveDosageForm?.ToDelimitedString(), ProvidersAdministrationInstructions != null ? string.Join(Configuration.FieldRepeatSeparator, ProvidersAdministrationInstructions.Select(x => x.ToDelimitedString())) : null, DeliverToLocation?.ToDelimitedString(), SubstitutionStatus, DispenseAmount.HasValue ? DispenseAmount.Value.ToString(Consts.NumericFormat, culture) : null, DispenseUnits?.ToDelimitedString(), NumberOfRefills.HasValue ? NumberOfRefills.Value.ToString(Consts.NumericFormat, culture) : null, OrderingProvidersDeaNumber?.ToDelimitedString(), PharmacistTreatmentSuppliersVerifierId?.ToDelimitedString(), PrescriptionNumber, NumberOfRefillsRemaining.HasValue ? NumberOfRefillsRemaining.Value.ToString(Consts.NumericFormat, culture) : null, NumberOfRefillsDosesDispensed.HasValue ? NumberOfRefillsDosesDispensed.Value.ToString(Consts.NumericFormat, culture) : null, DateTimeOfMostRecentRefillOrDoseDispensed.HasValue ? DateTimeOfMostRecentRefillOrDoseDispensed.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, TotalDailyDose?.ToDelimitedString(), NeedsHumanReview, SpecialDispensingInstructions != null ? string.Join(Configuration.FieldRepeatSeparator, SpecialDispensingInstructions.Select(x => x.ToDelimitedString())) : null, GivePerTimeUnit, GiveRateAmount, GiveRateUnits?.ToDelimitedString(), GiveStrength.HasValue ? GiveStrength.Value.ToString(Consts.NumericFormat, culture) : null, GiveStrengthUnits?.ToDelimitedString(), GiveIndication != null ? string.Join(Configuration.FieldRepeatSeparator, GiveIndication.Select(x => x.ToDelimitedString())) : null, DispensePackageSize.HasValue ? DispensePackageSize.Value.ToString(Consts.NumericFormat, culture) : null, DispensePackageSizeUnit?.ToDelimitedString(), DispensePackageMethod ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }
/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 46, Configuration.FieldSeparator), Id, QuantityTiming, GiveCode?.ToDelimitedString(), GiveAmountMinimum.HasValue ? GiveAmountMinimum.Value.ToString(Consts.NumericFormat, culture) : null, GiveAmountMaximum.HasValue ? GiveAmountMaximum.Value.ToString(Consts.NumericFormat, culture) : null, GiveUnits?.ToDelimitedString(), GiveDosageForm?.ToDelimitedString(), ProvidersAdministrationInstructions != null ? string.Join(Configuration.FieldRepeatSeparator, ProvidersAdministrationInstructions.Select(x => x.ToDelimitedString())) : null, DeliverToLocation, SubstitutionStatus, DispenseAmount.HasValue ? DispenseAmount.Value.ToString(Consts.NumericFormat, culture) : null, DispenseUnits?.ToDelimitedString(), NumberOfRefills.HasValue ? NumberOfRefills.Value.ToString(Consts.NumericFormat, culture) : null, OrderingProvidersDeaNumber != null ? string.Join(Configuration.FieldRepeatSeparator, OrderingProvidersDeaNumber.Select(x => x.ToDelimitedString())) : null, PharmacistTreatmentSuppliersVerifierId != null ? string.Join(Configuration.FieldRepeatSeparator, PharmacistTreatmentSuppliersVerifierId.Select(x => x.ToDelimitedString())) : null, PrescriptionNumber, NumberOfRefillsRemaining.HasValue ? NumberOfRefillsRemaining.Value.ToString(Consts.NumericFormat, culture) : null, NumberOfRefillsDosesDispensed.HasValue ? NumberOfRefillsDosesDispensed.Value.ToString(Consts.NumericFormat, culture) : null, DateTimeOfMostRecentRefillOrDoseDispensed.HasValue ? DateTimeOfMostRecentRefillOrDoseDispensed.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, TotalDailyDose?.ToDelimitedString(), NeedsHumanReview, SpecialDispensingInstructions != null ? string.Join(Configuration.FieldRepeatSeparator, SpecialDispensingInstructions.Select(x => x.ToDelimitedString())) : null, GivePerTimeUnit, GiveRateAmount, GiveRateUnits?.ToDelimitedString(), GiveStrength.HasValue ? GiveStrength.Value.ToString(Consts.NumericFormat, culture) : null, GiveStrengthUnits?.ToDelimitedString(), GiveIndication != null ? string.Join(Configuration.FieldRepeatSeparator, GiveIndication.Select(x => x.ToDelimitedString())) : null, DispensePackageSize.HasValue ? DispensePackageSize.Value.ToString(Consts.NumericFormat, culture) : null, DispensePackageSizeUnit?.ToDelimitedString(), DispensePackageMethod, SupplementaryCode != null ? string.Join(Configuration.FieldRepeatSeparator, SupplementaryCode.Select(x => x.ToDelimitedString())) : null, OriginalOrderDateTime.HasValue ? OriginalOrderDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, GiveDrugStrengthVolume.HasValue ? GiveDrugStrengthVolume.Value.ToString(Consts.NumericFormat, culture) : null, GiveDrugStrengthVolumeUnits?.ToDelimitedString(), ControlledSubstanceSchedule?.ToDelimitedString(), FormularyStatus, PharmaceuticalSubstanceAlternative != null ? string.Join(Configuration.FieldRepeatSeparator, PharmaceuticalSubstanceAlternative.Select(x => x.ToDelimitedString())) : null, PharmacyOfMostRecentFill?.ToDelimitedString(), InitialDispenseAmount.HasValue ? InitialDispenseAmount.Value.ToString(Consts.NumericFormat, culture) : null, DispensingPharmacy?.ToDelimitedString(), DispensingPharmacyAddress?.ToDelimitedString(), DeliverToPatientLocation?.ToDelimitedString(), DeliverToAddress?.ToDelimitedString(), PharmacyOrderType, PharmacyPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, PharmacyPhoneNumber.Select(x => x.ToDelimitedString())) : null ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }