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

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 39, Configuration.FieldSeparator),
                       Id,
                       OrderControl,
                       PlacerOrderNumber?.ToDelimitedString(),
                       FillerOrderNumber?.ToDelimitedString(),
                       PlacerGroupNumber?.ToDelimitedString(),
                       OrderStatus,
                       ResponseFlag,
                       QuantityTiming != null ? string.Join(Configuration.FieldRepeatSeparator, QuantityTiming) : null,
                       ParentOrder != null ? string.Join(Configuration.FieldRepeatSeparator, ParentOrder.Select(x => x.ToDelimitedString())) : null,
                       DateTimeOfTransaction.HasValue ? DateTimeOfTransaction.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       EnteredBy != null ? string.Join(Configuration.FieldRepeatSeparator, EnteredBy.Select(x => x.ToDelimitedString())) : null,
                       VerifiedBy != null ? string.Join(Configuration.FieldRepeatSeparator, VerifiedBy.Select(x => x.ToDelimitedString())) : null,
                       OrderingProvider != null ? string.Join(Configuration.FieldRepeatSeparator, OrderingProvider.Select(x => x.ToDelimitedString())) : null,
                       EnterersLocation?.ToDelimitedString(),
                       CallBackPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, CallBackPhoneNumber.Select(x => x.ToDelimitedString())) : null,
                       OrderEffectiveDateTime.HasValue ? OrderEffectiveDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       OrderControlCodeReason?.ToDelimitedString(),
                       EnteringOrganization?.ToDelimitedString(),
                       EnteringDevice?.ToDelimitedString(),
                       ActionBy != null ? string.Join(Configuration.FieldRepeatSeparator, ActionBy.Select(x => x.ToDelimitedString())) : null,
                       AdvancedBeneficiaryNoticeCode?.ToDelimitedString(),
                       OrderingFacilityName != null ? string.Join(Configuration.FieldRepeatSeparator, OrderingFacilityName.Select(x => x.ToDelimitedString())) : null,
                       OrderingFacilityAddress != null ? string.Join(Configuration.FieldRepeatSeparator, OrderingFacilityAddress.Select(x => x.ToDelimitedString())) : null,
                       OrderingFacilityPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, OrderingFacilityPhoneNumber.Select(x => x.ToDelimitedString())) : null,
                       OrderingProviderAddress != null ? string.Join(Configuration.FieldRepeatSeparator, OrderingProviderAddress.Select(x => x.ToDelimitedString())) : null,
                       OrderStatusModifier?.ToDelimitedString(),
                       AdvancedBeneficiaryNoticeOverrideReason?.ToDelimitedString(),
                       FillersExpectedAvailabilityDateTime.HasValue ? FillersExpectedAvailabilityDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ConfidentialityCode?.ToDelimitedString(),
                       OrderType?.ToDelimitedString(),
                       EntererAuthorizationMode?.ToDelimitedString(),
                       ParentUniversalServiceIdentifier?.ToDelimitedString(),
                       AdvancedBeneficiaryNoticeDate.HasValue ? AdvancedBeneficiaryNoticeDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null,
                       AlternatePlacerOrderNumber != null ? string.Join(Configuration.FieldRepeatSeparator, AlternatePlacerOrderNumber.Select(x => x.ToDelimitedString())) : null,
                       OrderWorkflowProfile != null ? string.Join(Configuration.FieldRepeatSeparator, OrderWorkflowProfile.Select(x => x.ToDelimitedString())) : null,
                       ActionCode,
                       OrderStatusDateRange?.ToDelimitedString(),
                       OrderCreationDateTime.HasValue ? OrderCreationDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       FillerOrderGroupNumber?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
示例#2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 54, Configuration.FieldSeparator),
                       Id,
                       SetIdObr.HasValue ? SetIdObr.Value.ToString(culture) : null,
                       PlacerOrderNumber?.ToDelimitedString(),
                       FillerOrderNumber?.ToDelimitedString(),
                       UniversalServiceIdentifier?.ToDelimitedString(),
                       Priority,
                       RequestedDateTime.HasValue ? RequestedDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ObservationDateTime.HasValue ? ObservationDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ObservationEndDateTime.HasValue ? ObservationEndDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       CollectionVolume?.ToDelimitedString(),
                       CollectorIdentifier != null ? string.Join(Configuration.FieldRepeatSeparator, CollectorIdentifier.Select(x => x.ToDelimitedString())) : null,
                       SpecimenActionCode,
                       DangerCode?.ToDelimitedString(),
                       RelevantClinicalInformation,
                       SpecimenReceivedDateTime.HasValue ? SpecimenReceivedDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       SpecimenSource,
                       OrderingProvider != null ? string.Join(Configuration.FieldRepeatSeparator, OrderingProvider.Select(x => x.ToDelimitedString())) : null,
                       OrderCallbackPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, OrderCallbackPhoneNumber.Select(x => x.ToDelimitedString())) : null,
                       PlacerField1,
                       PlacerField2,
                       FillerField1,
                       FillerField2,
                       ResultsRptStatusChngDateTime.HasValue ? ResultsRptStatusChngDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ChargeToPractice?.ToDelimitedString(),
                       DiagnosticServSectId,
                       ResultStatus,
                       ParentResult?.ToDelimitedString(),
                       QuantityTiming != null ? string.Join(Configuration.FieldRepeatSeparator, QuantityTiming) : null,
                       ResultCopiesTo != null ? string.Join(Configuration.FieldRepeatSeparator, ResultCopiesTo.Select(x => x.ToDelimitedString())) : null,
                       ParentResultsObservationIdentifier?.ToDelimitedString(),
                       TransportationMode,
                       ReasonForStudy != null ? string.Join(Configuration.FieldRepeatSeparator, ReasonForStudy.Select(x => x.ToDelimitedString())) : null,
                       PrincipalResultInterpreter?.ToDelimitedString(),
                       AssistantResultInterpreter != null ? string.Join(Configuration.FieldRepeatSeparator, AssistantResultInterpreter.Select(x => x.ToDelimitedString())) : null,
                       Technician != null ? string.Join(Configuration.FieldRepeatSeparator, Technician.Select(x => x.ToDelimitedString())) : null,
                       Transcriptionist != null ? string.Join(Configuration.FieldRepeatSeparator, Transcriptionist.Select(x => x.ToDelimitedString())) : null,
                       ScheduledDateTime.HasValue ? ScheduledDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       NumberOfSampleContainers.HasValue ? NumberOfSampleContainers.Value.ToString(Consts.NumericFormat, culture) : null,
                       TransportLogisticsOfCollectedSample != null ? string.Join(Configuration.FieldRepeatSeparator, TransportLogisticsOfCollectedSample.Select(x => x.ToDelimitedString())) : null,
                       CollectorsComment != null ? string.Join(Configuration.FieldRepeatSeparator, CollectorsComment.Select(x => x.ToDelimitedString())) : null,
                       TransportArrangementResponsibility?.ToDelimitedString(),
                       TransportArranged,
                       EscortRequired,
                       PlannedPatientTransportComment != null ? string.Join(Configuration.FieldRepeatSeparator, PlannedPatientTransportComment.Select(x => x.ToDelimitedString())) : null,
                       ProcedureCode?.ToDelimitedString(),
                       ProcedureCodeModifier != null ? string.Join(Configuration.FieldRepeatSeparator, ProcedureCodeModifier.Select(x => x.ToDelimitedString())) : null,
                       PlacerSupplementalServiceInformation != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerSupplementalServiceInformation.Select(x => x.ToDelimitedString())) : null,
                       FillerSupplementalServiceInformation != null ? string.Join(Configuration.FieldRepeatSeparator, FillerSupplementalServiceInformation.Select(x => x.ToDelimitedString())) : null,
                       MedicallyNecessaryDuplicateProcedureReason?.ToDelimitedString(),
                       ResultHandling?.ToDelimitedString(),
                       ParentUniversalServiceIdentifier?.ToDelimitedString(),
                       ObservationGroupId?.ToDelimitedString(),
                       ParentObservationGroupId?.ToDelimitedString(),
                       AlternatePlacerOrderNumber != null ? string.Join(Configuration.FieldRepeatSeparator, AlternatePlacerOrderNumber.Select(x => x.ToDelimitedString())) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }