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

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 27, 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.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
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Ejemplo n.º 2
0
        /// <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 != null ? string.Join(Configuration.FieldRepeatSeparator, Probability.Select(x => x.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()));
        }