public static Create ( Hl7.Fhir.Model type, bool fuzzy = false ) : |
||
type | Hl7.Fhir.Model | |
fuzzy | bool | |
리턴 |
public static Definition CreateDefinition(ModelInfo.SearchParamDefinition paramdef) { Definition definition = new Definition(); definition.Argument = ArgumentFactory.Create(paramdef.Type); definition.Resource = paramdef.Resource; definition.ParamName = paramdef.Name; definition.Query = new ElementQuery(paramdef.Path); definition.ParamType = paramdef.Type; definition.Description = paramdef.Description; return(definition); }
public static Definition CreateDefinition(ModelInfo.SearchParamDefinition paramdef) { var definition = new Definition { Argument = ArgumentFactory.Create(paramdef.Type), Resource = paramdef.Resource, ParamName = paramdef.Name, Query = new ElementQuery(paramdef.Path), ParamType = paramdef.Type, Description = paramdef.Description?.Value }; return(definition); }
public Argument GuessArgument(string field) { var query = from d in definitions where (d.ParamName == field) group d by d.ParamType into pgroup let count = pgroup.Count() orderby count descending select new { ParamType = pgroup.Key, Count = count }; //for testing: var pg = query.ToList(); Argument argument = (pg.Any()) ? ArgumentFactory.Create(pg.First().ParamType) : null; return(argument); }