public FhirResponse History(Key key, HistoryParameters parameters) { if (!fhirStore.Exists(key)) { return(Respond.NotFound(key)); } Uri link = localhost.Uri(key); IEnumerable <string> keys = fhirStore.History(key, parameters.Since); var snapshot = pager.CreateSnapshot(Bundle.BundleType.History, link, keys, parameters.SortBy, parameters.Count); Bundle bundle = pager.GetFirstPage(snapshot); return(Respond.WithResource(key, bundle)); }
public FhirResponse History(Key key, DateTimeOffset?since, string sortby) { if (!store.Exists(key)) { return(Respond.NotFound(key)); } Uri link = localhost.Uri(key); IEnumerable <string> keys = store.History(key, since); var snapshot = pager.CreateSnapshot(Bundle.BundleType.History, link, keys, sortby); Bundle bundle = pager.GetFirstPage(snapshot); bundle.Base = localhost.Base.AbsoluteUri; return(Respond.WithResource(key, bundle)); }
public bool Exists(string collection, string id) { Uri key = BuildKey(collection, id); return(store.Exists(key)); }
/// <inheritdoc /> public Task <bool> Exists(IKey key) => _fhirStore.Exists(key);