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

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 16, Configuration.FieldSeparator),
                       Id,
                       UniversalServiceIdentifier?.ToDelimitedString(),
                       EquipmentTestApplicationIdentifier?.ToDelimitedString(),
                       SpecimenSource,
                       AutoDilutionFactorDefault?.ToDelimitedString(),
                       RerunDilutionFactorDefault?.ToDelimitedString(),
                       PreDilutionFactorDefault?.ToDelimitedString(),
                       EndogenousContentOfPreDilutionDiluent?.ToDelimitedString(),
                       InventoryLimitsWarningLevel.HasValue ? InventoryLimitsWarningLevel.Value.ToString(Consts.NumericFormat, culture) : null,
                       AutomaticRerunAllowed,
                       AutomaticRepeatAllowed,
                       AutomaticReflexAllowed,
                       EquipmentDynamicRange?.ToDelimitedString(),
                       Units?.ToDelimitedString(),
                       ProcessingType?.ToDelimitedString(),
                       TestCriticality?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Example #2
0
        public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields()
        {
            IType hl7Type = new ProcessingType
            {
                ProcessingId   = "1",
                ProcessingMode = "2"
            };

            string expected = "1^2";
            string actual   = hl7Type.ToDelimitedString();

            Assert.Equal(expected, actual);
        }