コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
ファイル: FhirService.cs プロジェクト: schellack/spark
        public bool Exists(string collection, string id)
        {
            Uri key = BuildKey(collection, id);

            return(store.Exists(key));
        }
コード例 #4
0
 /// <inheritdoc />
 public Task <bool> Exists(IKey key) => _fhirStore.Exists(key);