Exemplo n.º 1
0
        public async Task <IActionResult> PatchFhir(string typeParameter, string idParameter, [FromBody] Parameters paramsResource, [ModelBinder(typeof(WeakETagBinder))] WeakETag ifMatchHeader)
        {
            var payload = new FhirPathPatchPayload(paramsResource);
            UpsertResourceResponse response = await _mediator.PatchResourceAsync(new ResourceKey(typeParameter, idParameter), payload, ifMatchHeader, HttpContext.RequestAborted);

            return(ToSaveOutcomeResult(response.Outcome));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> ConditionalPatchFhir(string typeParameter, [FromBody] Parameters paramsResource, [ModelBinder(typeof(WeakETagBinder))] WeakETag ifMatchHeader)
        {
            IReadOnlyList <Tuple <string, string> > conditionalParameters = GetQueriesForSearch();
            var payload = new FhirPathPatchPayload(paramsResource);

            UpsertResourceResponse response = await _mediator.ConditionalPatchResourceAsync(typeParameter, payload, conditionalParameters, ifMatchHeader, HttpContext.RequestAborted);

            return(ToSaveOutcomeResult(response.Outcome));
        }