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

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 7, Configuration.FieldSeparator),
                       Id,
                       PrimaryKeyValueLrl?.ToDelimitedString(),
                       SegmentActionCode,
                       SegmentUniqueKey?.ToDelimitedString(),
                       LocationRelationshipId?.ToDelimitedString(),
                       OrganizationalLocationRelationshipValue != null ? string.Join(Configuration.FieldRepeatSeparator, OrganizationalLocationRelationshipValue.Select(x => x.ToDelimitedString())) : null,
                       PatientLocationRelationshipValue?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 14, Configuration.FieldSeparator),
                       Id,
                       SequenceNumberTestObservationMasterFile.HasValue ? SequenceNumberTestObservationMasterFile.Value.ToString(Consts.NumericFormat, culture) : null,
                       SegmentActionCode,
                       SegmentUniqueKey?.ToDelimitedString(),
                       ClinicalInformationRequest?.ToDelimitedString(),
                       CollectionEventProcessStep != null ? string.Join(Configuration.FieldRepeatSeparator, CollectionEventProcessStep.Select(x => x.ToDelimitedString())) : null,
                       CommunicationLocation?.ToDelimitedString(),
                       AnswerRequired,
                       HintHelpText,
                       TypeOfAnswer,
                       MultipleAnswersAllowed,
                       AnswerChoices != null ? string.Join(Configuration.FieldRepeatSeparator, AnswerChoices.Select(x => x.ToDelimitedString())) : null,
                       CharacterLimit.HasValue ? CharacterLimit.Value.ToString(Consts.NumericFormat, culture) : null,
                       NumberOfDecimals.HasValue ? NumberOfDecimals.Value.ToString(Consts.NumericFormat, culture) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }