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)); }
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)); }