Пример #1
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 21, Configuration.FieldSeparator),
                       Id,
                       SubstanceIdentifier?.ToDelimitedString(),
                       SubstanceStatus != null ? string.Join(Configuration.FieldRepeatSeparator, SubstanceStatus.Select(x => x.ToDelimitedString())) : null,
                       SubstanceType?.ToDelimitedString(),
                       InventoryContainerIdentifier?.ToDelimitedString(),
                       ContainerCarrierIdentifier?.ToDelimitedString(),
                       PositionOnCarrier?.ToDelimitedString(),
                       InitialQuantity.HasValue ? InitialQuantity.Value.ToString(Consts.NumericFormat, culture) : null,
                       CurrentQuantity.HasValue ? CurrentQuantity.Value.ToString(Consts.NumericFormat, culture) : null,
                       AvailableQuantity.HasValue ? AvailableQuantity.Value.ToString(Consts.NumericFormat, culture) : null,
                       ConsumptionQuantity.HasValue ? ConsumptionQuantity.Value.ToString(Consts.NumericFormat, culture) : null,
                       QuantityUnits?.ToDelimitedString(),
                       ExpirationDateTime.HasValue ? ExpirationDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       FirstUsedDateTime.HasValue ? FirstUsedDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       OnBoardStabilityDuration,
                       TestFluidIdentifiers != null ? string.Join(Configuration.FieldRepeatSeparator, TestFluidIdentifiers.Select(x => x.ToDelimitedString())) : null,
                       ManufacturerLotNumber,
                       ManufacturerIdentifier?.ToDelimitedString(),
                       SupplierIdentifier?.ToDelimitedString(),
                       OnBoardStabilityTime?.ToDelimitedString(),
                       TargetValue?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Пример #2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 39, Configuration.FieldSeparator),
                       Id,
                       ItemIdentifier?.ToDelimitedString(),
                       ItemDescription,
                       ItemStatus?.ToDelimitedString(),
                       ItemType?.ToDelimitedString(),
                       ItemCategory?.ToDelimitedString(),
                       SubjectToExpirationIndicator?.ToDelimitedString(),
                       ManufacturerIdentifier?.ToDelimitedString(),
                       ManufacturerName,
                       ManufacturerCatalogNumber,
                       ManufacturerLabelerIdentificationCode?.ToDelimitedString(),
                       PatientChargeableIndicator?.ToDelimitedString(),
                       TransactionCode?.ToDelimitedString(),
                       TransactionAmountUnit?.ToDelimitedString(),
                       StockedItemIndicator?.ToDelimitedString(),
                       SupplyRiskCodes?.ToDelimitedString(),
                       ApprovingRegulatoryAgency != null ? string.Join(Configuration.FieldRepeatSeparator, ApprovingRegulatoryAgency.Select(x => x.ToDelimitedString())) : null,
                       LatexIndicator?.ToDelimitedString(),
                       RulingAct != null ? string.Join(Configuration.FieldRepeatSeparator, RulingAct.Select(x => x.ToDelimitedString())) : null,
                       ItemNaturalAccountCode?.ToDelimitedString(),
                       ApprovedToBuyQuantity.HasValue ? ApprovedToBuyQuantity.Value.ToString(Consts.NumericFormat, culture) : null,
                       ApprovedToBuyPrice?.ToDelimitedString(),
                       TaxableItemIndicator?.ToDelimitedString(),
                       FreightChargeIndicator?.ToDelimitedString(),
                       ItemSetIndicator?.ToDelimitedString(),
                       ItemSetIdentifier?.ToDelimitedString(),
                       TrackDepartmentUsageIndicator?.ToDelimitedString(),
                       ProcedureCode?.ToDelimitedString(),
                       ProcedureCodeModifier != null ? string.Join(Configuration.FieldRepeatSeparator, ProcedureCodeModifier.Select(x => x.ToDelimitedString())) : null,
                       SpecialHandlingCode?.ToDelimitedString(),
                       HazardousIndicator?.ToDelimitedString(),
                       SterileIndicator?.ToDelimitedString(),
                       MaterialDataSafetySheetNumber?.ToDelimitedString(),
                       UnitedNationsStandardProductsAndServicesCode?.ToDelimitedString(),
                       ContractDate?.ToDelimitedString(),
                       ManufacturerContactName?.ToDelimitedString(),
                       ManufacturerContactInformation?.ToDelimitedString(),
                       ClassOfTrade,
                       FieldLevelEventCode
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Пример #3
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 8, Configuration.FieldSeparator),
                       Id,
                       AnticipatedPrice,
                       ManufacturerIdentifier?.ToDelimitedString(),
                       ManufacturersCatalog,
                       VendorId?.ToDelimitedString(),
                       VendorCatalog,
                       Taxable,
                       SubstituteAllowed
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }