Example #1
0
 public override bool TryParseValue(string Values)
 {
     this.ValueList = new List <SearchParameterStringValue>();
     foreach (string Value in Values.Split(OrDelimiter))
     {
         var DtoSearchParameterStringValue = new SearchParameterStringValue();
         if (this.Modifier.HasValue && this.Modifier == Hl7.Fhir.Model.SearchParameter.SearchModifierCode.Missing)
         {
             bool?IsMissing = DtoSearchParameterStringValue.ParseModifierEqualToMissing(Value);
             if (IsMissing.HasValue)
             {
                 DtoSearchParameterStringValue.IsMissing = IsMissing.Value;
                 this.ValueList.Add(DtoSearchParameterStringValue);
             }
             else
             {
                 this.InvalidMessage = $"Found the {Hl7.Fhir.Model.SearchParameter.SearchModifierCode.Missing.GetPyroLiteral()} Modifier yet is value was expected to be true or false yet found '{Value}'. ";
                 return(false);
             }
         }
         else
         {
             DtoSearchParameterStringValue.Value = StringSupport.ToLowerTrimRemoveDiacriticsTruncate(Value, Database.StaticDatabaseInfo.BaseDatabaseFieldLength.StringMaxLength);
             this.ValueList.Add(DtoSearchParameterStringValue);
         }
     }
     if (this.ValueList.Count() > 1)
     {
         this.HasLogicalOrProperties = true;
     }
     if (this.ValueList.Count > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #2
0
 public override bool TryParseValue(string Values)
 {
     this.ValueList = new List <SearchParameterStringValue>();
     foreach (string Value in Values.Split(OrDelimiter))
     {
         var DtoSearchParameterStringValue = new SearchParameterStringValue();
         if (this.Modifier.HasValue && this.Modifier == Hl7.Fhir.Model.SearchParameter.SearchModifierCode.Missing)
         {
             bool?IsMissing = DtoSearchParameterStringValue.ParseModifierEqualToMissing(Value);
             if (IsMissing.HasValue)
             {
                 DtoSearchParameterStringValue.IsMissing = IsMissing.Value;
                 this.ValueList.Add(DtoSearchParameterStringValue);
             }
             else
             {
                 return(false);
             }
         }
         else
         {
             DtoSearchParameterStringValue.Value = Value.Trim();
             this.ValueList.Add(DtoSearchParameterStringValue);
         }
     }
     if (this.ValueList.Count() > 1)
     {
         this.HasLogicalOrProperties = true;
     }
     if (this.ValueList.Count > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }