Exemplo n.º 1
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 49, Configuration.FieldSeparator),
                       Id,
                       ProviderProductServiceLineItemNumber?.ToDelimitedString(),
                       PayerProductServiceLineItemNumber?.ToDelimitedString(),
                       ProductServiceLineItemSequenceNumber.HasValue ? ProductServiceLineItemSequenceNumber.Value.ToString(culture) : null,
                       ProviderTrackingId?.ToDelimitedString(),
                       PayerTrackingId?.ToDelimitedString(),
                       ProductServiceLineItemStatus?.ToDelimitedString(),
                       ProductServiceCode?.ToDelimitedString(),
                       ProductServiceCodeModifier?.ToDelimitedString(),
                       ProductServiceCodeDescription,
                       ProductServiceEffectiveDate.HasValue ? ProductServiceEffectiveDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ProductServiceExpirationDate.HasValue ? ProductServiceExpirationDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ProductServiceQuantity?.ToDelimitedString(),
                       ProductServiceUnitCost?.ToDelimitedString(),
                       NumberOfItemsPerUnit.HasValue ? NumberOfItemsPerUnit.Value.ToString(Consts.NumericFormat, culture) : null,
                       ProductServiceGrossAmount?.ToDelimitedString(),
                       ProductServiceBilledAmount?.ToDelimitedString(),
                       ProductServiceClarificationCodeType?.ToDelimitedString(),
                       ProductServiceClarificationCodeValue,
                       HealthDocumentReferenceIdentifier?.ToDelimitedString(),
                       ProcessingConsiderationCode?.ToDelimitedString(),
                       RestrictedDisclosureIndicator,
                       RelatedProductServiceCodeIndicator?.ToDelimitedString(),
                       ProductServiceAmountForPhysician?.ToDelimitedString(),
                       ProductServiceCostFactor.HasValue ? ProductServiceCostFactor.Value.ToString(Consts.NumericFormat, culture) : null,
                       CostCenter?.ToDelimitedString(),
                       BillingPeriod?.ToDelimitedString(),
                       DaysWithoutBilling.HasValue ? DaysWithoutBilling.Value.ToString(Consts.NumericFormat, culture) : null,
                       SessionNo.HasValue ? SessionNo.Value.ToString(Consts.NumericFormat, culture) : null,
                       ExecutingPhysicianId?.ToDelimitedString(),
                       ResponsiblePhysicianId?.ToDelimitedString(),
                       RoleExecutingPhysician?.ToDelimitedString(),
                       MedicalRoleExecutingPhysician?.ToDelimitedString(),
                       SideOfBody?.ToDelimitedString(),
                       NumberOfTpsPp.HasValue ? NumberOfTpsPp.Value.ToString(Consts.NumericFormat, culture) : null,
                       TpValuePp?.ToDelimitedString(),
                       InternalScalingFactorPp.HasValue ? InternalScalingFactorPp.Value.ToString(Consts.NumericFormat, culture) : null,
                       ExternalScalingFactorPp.HasValue ? ExternalScalingFactorPp.Value.ToString(Consts.NumericFormat, culture) : null,
                       AmountPp?.ToDelimitedString(),
                       NumberOfTpsTechnicalPart.HasValue ? NumberOfTpsTechnicalPart.Value.ToString(Consts.NumericFormat, culture) : null,
                       TpValueTechnicalPart?.ToDelimitedString(),
                       InternalScalingFactorTechnicalPart.HasValue ? InternalScalingFactorTechnicalPart.Value.ToString(Consts.NumericFormat, culture) : null,
                       ExternalScalingFactorTechnicalPart.HasValue ? ExternalScalingFactorTechnicalPart.Value.ToString(Consts.NumericFormat, culture) : null,
                       AmountTechnicalPart?.ToDelimitedString(),
                       TotalAmountProfessionalPartTechnicalPart?.ToDelimitedString(),
                       VatRate.HasValue ? VatRate.Value.ToString(Consts.NumericFormat, culture) : null,
                       MainService,
                       Validation,
                       Comment
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 31, Configuration.FieldSeparator),
                       Id,
                       ProviderInvoiceNumber?.ToDelimitedString(),
                       PayerInvoiceNumber?.ToDelimitedString(),
                       ContractAgreementNumber?.ToDelimitedString(),
                       InvoiceControl?.ToDelimitedString(),
                       InvoiceReason?.ToDelimitedString(),
                       InvoiceType?.ToDelimitedString(),
                       InvoiceDateTime.HasValue ? InvoiceDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       InvoiceAmount?.ToDelimitedString(),
                       PaymentTerms,
                       ProviderOrganization?.ToDelimitedString(),
                       PayerOrganization?.ToDelimitedString(),
                       Attention?.ToDelimitedString(),
                       LastInvoiceIndicator,
                       InvoiceBookingPeriod.HasValue ? InvoiceBookingPeriod.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       Origin,
                       InvoiceFixedAmount?.ToDelimitedString(),
                       SpecialCosts?.ToDelimitedString(),
                       AmountForDoctorsTreatment?.ToDelimitedString(),
                       ResponsiblePhysician?.ToDelimitedString(),
                       CostCenter?.ToDelimitedString(),
                       InvoicePrepaidAmount?.ToDelimitedString(),
                       TotalInvoiceAmountWithoutPrepaidAmount?.ToDelimitedString(),
                       TotalAmountOfVat?.ToDelimitedString(),
                       VatRatesApplied != null ? string.Join(Configuration.FieldRepeatSeparator, VatRatesApplied.Select(x => x.ToString(Consts.NumericFormat, culture))) : null,
                       BenefitGroup?.ToDelimitedString(),
                       ProviderTaxId,
                       PayerTaxId,
                       ProviderTaxStatus?.ToDelimitedString(),
                       PayerTaxStatus?.ToDelimitedString(),
                       SalesTaxId
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }