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

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 21, Configuration.FieldSeparator),
                       Id,
                       SetIdIam.HasValue ? SetIdIam.Value.ToString(culture) : null,
                       AllergenTypeCode?.ToDelimitedString(),
                       AllergenCodeMnemonicDescription?.ToDelimitedString(),
                       AllergySeverityCode?.ToDelimitedString(),
                       AllergyReactionCode != null ? string.Join(Configuration.FieldRepeatSeparator, AllergyReactionCode) : null,
                       AllergyActionCode?.ToDelimitedString(),
                       AllergyUniqueIdentifier?.ToDelimitedString(),
                       ActionReason,
                       SensitivityToCausativeAgentCode?.ToDelimitedString(),
                       AllergenGroupCodeMnemonicDescription?.ToDelimitedString(),
                       OnsetDate.HasValue ? OnsetDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null,
                       OnsetDateText,
                       ReportedDateTime.HasValue ? ReportedDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ReportedBy?.ToDelimitedString(),
                       RelationshipToPatientCode?.ToDelimitedString(),
                       AlertDeviceCode?.ToDelimitedString(),
                       AllergyClinicalStatusCode?.ToDelimitedString(),
                       StatusedByPerson?.ToDelimitedString(),
                       StatusedByOrganization?.ToDelimitedString(),
                       StatusedAtDateTime.HasValue ? StatusedAtDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 7, Configuration.FieldSeparator),
                       Id,
                       SetIdAl1.HasValue ? SetIdAl1.Value.ToString(culture) : null,
                       AllergenTypeCode?.ToDelimitedString(),
                       AllergenCodeMnemonicDescription?.ToDelimitedString(),
                       AllergySeverityCode?.ToDelimitedString(),
                       AllergyReactionCode != null ? string.Join(Configuration.FieldRepeatSeparator, AllergyReactionCode) : null,
                       IdentificationDate.HasValue ? IdentificationDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }