Пример #1
0
        /// <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()));
        }
Пример #2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 37, 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,
                       AllowSubstitutions,
                       RequestedDispenseCode?.ToDelimitedString(),
                       RequestedDispenseAmount.HasValue ? RequestedDispenseAmount.Value.ToString(Consts.NumericFormat, culture) : null,
                       RequestedDispenseUnits?.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,
                       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(),
                       TotalDailyDose?.ToDelimitedString(),
                       SupplementaryCode != null ? string.Join(Configuration.FieldRepeatSeparator, SupplementaryCode.Select(x => x.ToDelimitedString())) : null,
                       RequestedDrugStrengthVolume.HasValue ? RequestedDrugStrengthVolume.Value.ToString(Consts.NumericFormat, culture) : null,
                       RequestedDrugStrengthVolumeUnits?.ToDelimitedString(),
                       PharmacyOrderType,
                       DispensingInterval.HasValue ? DispensingInterval.Value.ToString(Consts.NumericFormat, culture) : null,
                       MedicationInstanceIdentifier?.ToDelimitedString(),
                       SegmentInstanceIdentifier?.ToDelimitedString(),
                       MoodCode?.ToDelimitedString(),
                       DispensingPharmacy?.ToDelimitedString(),
                       DispensingPharmacyAddress?.ToDelimitedString(),
                       DeliverToPatientLocation?.ToDelimitedString(),
                       DeliverToAddress?.ToDelimitedString(),
                       PharmacyPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, PharmacyPhoneNumber.Select(x => x.ToDelimitedString())) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }