Пример #1
0
 protected override void FullyParse()
 {
     if (!string.IsNullOrEmpty(Value))
     {
         var trimmedValue = doNotEscape ? Value : Value.TrimEnd(Encoding.RepetitionSeparator);
         var repetitions  = trimmedValue.Split(Encoding.RepetitionSeparator)
                            .ToList();
         Repetitions.Clear();
         foreach (var repetition in repetitions)
         {
             Repetitions.Add(Hl7FieldRepetition.Parse(repetition, Encoding, doNotEscape));
         }
         IsParsed = true;
         Value    = null;
     }
 }
Пример #2
0
 public override Hl7Element this[int i]
 {
     get
     {
         EnsureFullyParsed();
         return(Repetitions.Count >= i ? Repetitions[i - 1] : Hl7FieldRepetition.Parse("", Encoding));
     }
     set
     {
         EnsureFullyParsed();
         for (int j = Repetitions.Count; j <= i - 1; j++)
         {
             Repetitions.Add(new Hl7FieldRepetition());
         }
         Repetitions[i - 1] = (Hl7FieldRepetition)value;
     }
 }
Пример #3
0
 public static Hl7Field operator +(Hl7Field field, string repetition)
 {
     field += Hl7FieldRepetition.Parse(repetition, field.Encoding);
     return(field);
 }