/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 18, Configuration.FieldSeparator), Id, SetIdObx.HasValue ? SetIdObx.Value.ToString(culture) : null, ValueType, ObservationIdentifier?.ToDelimitedString(), ObservationSubId, ObservationValue != null ? string.Join(Configuration.FieldRepeatSeparator, ObservationValue) : null, Units?.ToDelimitedString(), ReferencesRange, InterpretationCodes != null ? string.Join(Configuration.FieldRepeatSeparator, InterpretationCodes) : null, Probability.HasValue ? Probability.Value.ToString(Consts.NumericFormat, culture) : null, NatureOfAbnormalTest != null ? string.Join(Configuration.FieldRepeatSeparator, NatureOfAbnormalTest) : null, ObservationResultStatus, EffectiveDateOfReferenceRange.HasValue ? EffectiveDateOfReferenceRange.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, UserDefinedAccessChecks, DateTimeOfTheObservation.HasValue ? DateTimeOfTheObservation.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, ProducersId?.ToDelimitedString(), ResponsibleObserver != null ? string.Join(Configuration.FieldRepeatSeparator, ResponsibleObserver.Select(x => x.ToDelimitedString())) : null, ObservationMethod != null ? string.Join(Configuration.FieldRepeatSeparator, ObservationMethod.Select(x => x.ToDelimitedString())) : null ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }
/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 34, Configuration.FieldSeparator), Id, SetIdObx.HasValue ? SetIdObx.Value.ToString(culture) : null, ValueType, ObservationIdentifier?.ToDelimitedString(), ObservationSubId?.ToDelimitedString(), ObservationValue != null ? string.Join(Configuration.FieldRepeatSeparator, ObservationValue) : null, Units?.ToDelimitedString(), ReferencesRange, InterpretationCodes != null ? string.Join(Configuration.FieldRepeatSeparator, InterpretationCodes.Select(x => x.ToDelimitedString())) : null, Probability.HasValue ? Probability.Value.ToString(Consts.NumericFormat, culture) : null, NatureOfAbnormalTest != null ? string.Join(Configuration.FieldRepeatSeparator, NatureOfAbnormalTest) : null, ObservationResultStatus, EffectiveDateOfReferenceRange.HasValue ? EffectiveDateOfReferenceRange.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, UserDefinedAccessChecks, DateTimeOfTheObservation.HasValue ? DateTimeOfTheObservation.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, ProducersId?.ToDelimitedString(), ResponsibleObserver != null ? string.Join(Configuration.FieldRepeatSeparator, ResponsibleObserver.Select(x => x.ToDelimitedString())) : null, ObservationMethod != null ? string.Join(Configuration.FieldRepeatSeparator, ObservationMethod.Select(x => x.ToDelimitedString())) : null, EquipmentInstanceIdentifier != null ? string.Join(Configuration.FieldRepeatSeparator, EquipmentInstanceIdentifier.Select(x => x.ToDelimitedString())) : null, DateTimeOfTheAnalysis.HasValue ? DateTimeOfTheAnalysis.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, ObservationSite != null ? string.Join(Configuration.FieldRepeatSeparator, ObservationSite.Select(x => x.ToDelimitedString())) : null, ObservationInstanceIdentifier?.ToDelimitedString(), MoodCode?.ToDelimitedString(), PerformingOrganizationName?.ToDelimitedString(), PerformingOrganizationAddress?.ToDelimitedString(), PerformingOrganizationMedicalDirector?.ToDelimitedString(), PatientResultsReleaseCategory, RootCause?.ToDelimitedString(), LocalProcessControl != null ? string.Join(Configuration.FieldRepeatSeparator, LocalProcessControl.Select(x => x.ToDelimitedString())) : null, ObservationType, ObservationSubType, ActionCode, ObservationValueAbsentReason != null ? string.Join(Configuration.FieldRepeatSeparator, ObservationValueAbsentReason.Select(x => x.ToDelimitedString())) : null, ObservationRelatedSpecimenIdentifier != null ? string.Join(Configuration.FieldRepeatSeparator, ObservationRelatedSpecimenIdentifier.Select(x => x.ToDelimitedString())) : null ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }