public FhirResponse History(HistoryParameters parameters) { var since = parameters.Since ?? DateTimeOffset.MinValue; Uri link = localhost.Uri(RestOperation.HISTORY); IEnumerable <string> keys = fhirStore.History(since); var snapshot = pager.CreateSnapshot(Bundle.BundleType.History, link, keys, parameters.SortBy, parameters.Count, null); Bundle bundle = pager.GetFirstPage(snapshot); // DSTU2: export // exporter.Externalize(bundle); return(Respond.WithBundle(bundle)); }
public FhirResponse History(DateTimeOffset?since, string sortby) { if (since == null) { since = DateTimeOffset.MinValue; } Uri link = localhost.Uri(RestOperation.HISTORY); IEnumerable <string> keys = store.History(since); var snapshot = pager.CreateSnapshot(Bundle.BundleType.History, link, keys, sortby); Bundle bundle = pager.GetFirstPage(snapshot); // DSTU2: export // exporter.Externalize(bundle); return(Respond.WithBundle(bundle, localhost.Base)); }
public Bundle History(DateTimeOffset?since, string sortby) { if (since == null) { since = DateTimeOffset.MinValue; } string title = String.Format("Full server-wide history for updates since {0}", since); RestUrl self = new RestUrl(this.Endpoint).AddPath(RestOperation.HISTORY); IEnumerable <Uri> keys = store.History(since); Snapshot snapshot = Snapshot.Create(title, self.Uri, keys, sortby); store.AddSnapshot(snapshot); Bundle bundle = pager.GetPage(snapshot, 0, Const.DEFAULT_PAGE_SIZE); exporter.Externalize(bundle); return(bundle); }