예제 #1
0
        public ServerFhirResponse Snapshot()
        {
            string snapshot = FhirHttpUtil.GetStringParameter(Request, FhirParameter.SNAPSHOT_ID);
            int    start    = FhirHttpUtil.GetIntParameter(Request, FhirParameter.SNAPSHOT_INDEX) ?? 0;

            return(fhirService.GetPage(snapshot, start));
        }
예제 #2
0
        public ServerFhirResponse Search(string type)
        {
            int start        = FhirHttpUtil.GetIntParameter(HttpContext.Request, FhirParameter.SNAPSHOT_INDEX) ?? 0;
            var searchparams = HttpHeaderUtil.GetSearchParams(HttpContext.Request);

            return(fhirService.Search(type, searchparams, start));
        }
예제 #3
0
        public ServerFhirResponse Update(string type, Resource resource, string id = null)
        {
            string versionid = FhirHttpUtil.IfMatchVersionId(HttpContext.Request);
            Key    key       = Key.Create(type, id, versionid);

            if (key.HasResourceId())
            {
                return(fhirService.Update(key, resource));
            }
            else
            {
                SearchParams searchparams = SearchParams.FromUriParamList(HttpHeaderUtil.TupledParameters(HttpContext.Request));
                return(fhirService.ConditionalUpdate(key, resource, searchparams));
            }
        }