Class FhirPatch

java.lang.Object
org.apache.camel.component.fhir.api.FhirPatch

public class FhirPatch extends Object
API for the "patch" operation, which performs a logical patch on a server resource
  • Constructor Summary

    Constructors
    Constructor
    Description
    FhirPatch(ca.uhn.fhir.rest.client.api.IGenericClient client)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ca.uhn.fhir.rest.api.MethodOutcome
    patchById(String patchBody, String stringId, ca.uhn.fhir.rest.api.PreferReturnEnum preferReturn, Map<ExtraParameters,Object> extraParameters)
    Applies the patch to the given resource ID
    ca.uhn.fhir.rest.api.MethodOutcome
    patchById(String patchBody, org.hl7.fhir.instance.model.api.IIdType id, ca.uhn.fhir.rest.api.PreferReturnEnum preferReturn, Map<ExtraParameters,Object> extraParameters)
    Applies the patch to the given resource ID
    ca.uhn.fhir.rest.api.MethodOutcome
    patchByUrl(String patchBody, String url, ca.uhn.fhir.rest.api.PreferReturnEnum preferReturn, Map<ExtraParameters,Object> extraParameters)
    Specifies that the update should be performed as a conditional create against a given search URL.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FhirPatch

      public FhirPatch(ca.uhn.fhir.rest.client.api.IGenericClient client)
  • Method Details

    • patchByUrl

      public ca.uhn.fhir.rest.api.MethodOutcome patchByUrl(String patchBody, String url, ca.uhn.fhir.rest.api.PreferReturnEnum preferReturn, Map<ExtraParameters,Object> extraParameters)
      Specifies that the update should be performed as a conditional create against a given search URL.
      Parameters:
      patchBody - The body of the patch document serialized in either XML or JSON which conforms to http://jsonpatch.com/ or http://tools.ietf.org/html/rfc5261
      url - The search URL to use. The format of this URL should be of the form [ResourceType]?[Parameters], for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366
      preferReturn - Add a Prefer header to the request, which requests that the server include or suppress the resource body as a part of the result. If a resource is returned by the server it will be parsed an accessible to the client via MethodOutcome.getResource()
      extraParameters - see ExtraParameters for a full list of parameters that can be passed, may be NULL
      Returns:
      the MethodOutcome
    • patchById

      public ca.uhn.fhir.rest.api.MethodOutcome patchById(String patchBody, org.hl7.fhir.instance.model.api.IIdType id, ca.uhn.fhir.rest.api.PreferReturnEnum preferReturn, Map<ExtraParameters,Object> extraParameters)
      Applies the patch to the given resource ID
      Parameters:
      patchBody - The body of the patch document serialized in either XML or JSON which conforms to http://jsonpatch.com/ or http://tools.ietf.org/html/rfc5261
      id - The resource ID to patch
      preferReturn - Add a Prefer header to the request, which requests that the server include or suppress the resource body as a part of the result. If a resource is returned by the server it will be parsed an accessible to the client via MethodOutcome.getResource()
      extraParameters - see ExtraParameters for a full list of parameters that can be passed, may be NULL
      Returns:
      the MethodOutcome
    • patchById

      public ca.uhn.fhir.rest.api.MethodOutcome patchById(String patchBody, String stringId, ca.uhn.fhir.rest.api.PreferReturnEnum preferReturn, Map<ExtraParameters,Object> extraParameters)
      Applies the patch to the given resource ID
      Parameters:
      patchBody - The body of the patch document serialized in either XML or JSON which conforms to http://jsonpatch.com/ or http://tools.ietf.org/html/rfc5261
      stringId - The resource ID to patch
      preferReturn - Add a Prefer header to the request, which requests that the server include or suppress the resource body as a part of the result. If a resource is returned by the server it will be parsed an accessible to the client via MethodOutcome.getResource()
      extraParameters - see ExtraParameters for a full list of parameters that can be passed, may be NULL
      Returns:
      the MethodOutcome