public GetPage ( Spark.Core.Snapshot snapshot, int start, int pagesize = DEFAULT_PAGE_SIZE ) : Hl7.Fhir.Model.Bundle | ||
snapshot | Spark.Core.Snapshot | |
start | int | |
pagesize | int | |
Résultat | Hl7.Fhir.Model.Bundle |
public Bundle Search(string collection, IEnumerable <Tuple <string, string> > parameters, int pageSize, string sortby) { RequestValidator.ValidateCollectionName(collection); Query query = FhirParser.ParseQueryFromUriParameters(collection, parameters); ICollection <string> includes = query.Includes; SearchResults results = index.Search(query); if (results.HasErrors) { throw new SparkException(HttpStatusCode.BadRequest, results.Outcome); } RestUrl selfLink = new RestUrl(Endpoint).AddPath(collection).AddPath(results.UsedParameters); string title = String.Format("Search on resources in collection '{0}'", collection); Snapshot snapshot = Snapshot.Create(title, selfLink.Uri, results, sortby, includes); store.AddSnapshot(snapshot); Bundle bundle = pager.GetPage(snapshot, 0, pageSize); /* * if (results.HasIssues) * { * var outcomeEntry = BundleEntryFactory.CreateFromResource(results.Outcome, new Uri("outcome/1", UriKind.Relative), DateTimeOffset.Now); * outcomeEntry.SelfLink = outcomeEntry.Id; * bundle.Entries.Add(outcomeEntry); * } */ exporter.Externalize(bundle); return(bundle); }
public Bundle GetSnapshot(string snapshot, int index, int count) { Bundle bundle = _pager.GetPage(snapshot, index, count); _exporter.EnsureAbsoluteUris(bundle); return(bundle); }
public FhirResponse GetPage(string snapshotkey, int index) { Bundle bundle = pager.GetPage(snapshotkey, index); return(Respond.WithBundle(bundle)); }
public FhirResponse GetPage(string snapshotkey, int index, int count) { Bundle bundle = pager.GetPage(snapshotkey, index, count); return(Respond.WithBundle(bundle, localhost.Base)); }