Create() public static méthode

public static Create ( Hl7.Fhir.Model type, bool fuzzy = false ) : Argument
type Hl7.Fhir.Model
fuzzy bool
Résultat Argument
Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }