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

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 23, Configuration.FieldSeparator),
                       Id,
                       RequestedGiveCode?.ToDelimitedString(),
                       RequestedGiveAmountMinimum.HasValue ? RequestedGiveAmountMinimum.Value.ToString(Consts.NumericFormat, culture) : null,
                       RequestedGiveAmountMaximum.HasValue ? RequestedGiveAmountMaximum.Value.ToString(Consts.NumericFormat, culture) : null,
                       RequestedGiveUnits?.ToDelimitedString(),
                       RequestedDosageForm?.ToDelimitedString(),
                       ProvidersPharmacyTreatmentInstructions != null ? string.Join(Configuration.FieldRepeatSeparator, ProvidersPharmacyTreatmentInstructions.Select(x => x.ToDelimitedString())) : null,
                       ProvidersAdministrationInstructions != null ? string.Join(Configuration.FieldRepeatSeparator, ProvidersAdministrationInstructions.Select(x => x.ToDelimitedString())) : null,
                       DeliverToLocation?.ToDelimitedString(),
                       AllowSubstitutions,
                       RequestedDispenseCode?.ToDelimitedString(),
                       RequestedDispenseAmount.HasValue ? RequestedDispenseAmount.Value.ToString(Consts.NumericFormat, culture) : null,
                       RequestedDispenseUnits?.ToDelimitedString(),
                       NumberOfRefills.HasValue ? NumberOfRefills.Value.ToString(Consts.NumericFormat, culture) : null,
                       OrderingProvidersDeaNumber?.ToDelimitedString(),
                       PharmacistTreatmentSuppliersVerifierId?.ToDelimitedString(),
                       NeedsHumanReview,
                       RequestedGivePerTimeUnit,
                       RequestedGiveStrength.HasValue ? RequestedGiveStrength.Value.ToString(Consts.NumericFormat, culture) : null,
                       RequestedGiveStrengthUnits?.ToDelimitedString(),
                       Indication != null ? string.Join(Configuration.FieldRepeatSeparator, Indication.Select(x => x.ToDelimitedString())) : null,
                       RequestedGiveRateAmount,
                       RequestedGiveRateUnits?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
예제 #2
0
        /// <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()));
        }