Validates the parameters, creates an instance and tries to connect it to FhirJS, if one is available globally.
The state of the client instance is an object with various properties.
It contains some details about how the client has been authorized and
determines the behavior of the client instance. This state is persisted
in SessionStorage
in browsers or in request session on the servers.
The method responsible for making all http requests
Returns a promise that will be resolved with the numeric fhir version
Returns a promise that will be resolved with the fhir version as defined in the CapabilityStatement.
Fetches all references in the given resource, ignoring duplicates
Given a FHIR Bundle or a URL pointing to a bundle, iterates over all pages. Note that this will automatically crawl through further pages (if any) but it will not detect previous pages. It is designed to be called on the first page and fetch any followup pages.
Fetches all references in the given resource, ignoring duplicates, and then modifies the resource by "mounting" the resolved references in place
Given a FHIR Bundle or a URL pointing to a bundle, iterates over all entry resources. Note that this will also automatically crawl through further pages (if any)
Creates a new resource in a server-assigned location
A FHIR resource to be created
Removes an existing resource.
Relative URI of the FHIR resource to be deleted
(format: resourceType/id
)
Any options (except method
which will be fixed
to DELETE
) to be passed to the fetch call.
Makes a JSON Patch to the given resource
This method would typically resolve with the patched resource or reject with an OperationOutcome. However, this may depend on the server implementation or even on the request headers. For that reason, if the default resolve type (which is fhirclient.FHIR.Resource) does not work for you, you can pass in your own resolve type parameter.
Relative URI of the FHIR resource to be patched
(format: resourceType/id
)
A JSON Patch array to send to the server, For details see https://datatracker.ietf.org/doc/html/rfc6902
Any options to be passed to the fetch call,
except for method
, url
and body
which cannot be overridden.
Creates a new current version for an existing resource or creates an initial version if no resource already exists for the given id.
A FHIR resource to be updated
Any options to be passed to the fetch call.
Note that method
and body
will be ignored.
Generated using TypeDoc
This is a basic FHIR client for making basic FHIR API calls