Exemplo n.º 1
0
        public static SearchParameters By(string key, string value)
        {
            var searchParameters = new SearchParameters();

            searchParameters.Add(key, value);

            return searchParameters;
        }
Exemplo n.º 2
0
        public static SearchParameters By(string key, IEnumerable<String> values)
        {
            var searchParameters = new SearchParameters();

            foreach (var value in values)
            {
                searchParameters.Add(key, value);
            }

            return searchParameters;
        }
Exemplo n.º 3
0
        public Bundle Search(string resourceType, SearchParameters parameters = null)
        {
            if (parameters == null)
            {
                parameters = SearchParameters.Empty;
            }

            var searchQuery = parameters.ToString();

            var request = new SearchRequest()
            {
                ResourceType = resourceType,
                SearchQuery = searchQuery
            };

            var jsonValue = request.ToJson();

            var searchResult = _context.Call(FhirSchema.Name, FhirSchema.Func.Search)
                .WithJson(jsonValue)
                .Cast<String>();

            var resultBundle = ResourceDataHelper.JsonToBundle(searchResult);

            return resultBundle;
        }