FHIRClient - v3.0.0
    Preparing search index...

    Class default

    This is a basic FHIR client for making basic FHIR API calls

    Hierarchy (View Summary)

    Index
    • Validates the parameters and creates an instance.

      Parameters

      • fhirBaseUrl: string

      Returns default

    fhirBaseUrl: string

    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.

    • Parameters

      • resource: Resource
      • references: string[]
      • graph: boolean
      • cache: Record<string, any> = {}
      • requestOptions: Omit<fhirclient.RequestOptions, "url"> = {}

      Returns Promise<Record<string, any>>

    • The method responsible for making all http requests

      Type Parameters

      • T = any

      Parameters

      Returns Promise<T>

    • Returns a promise that will be resolved with the numeric fhir version

      • 2 for DSTU2
      • 3 for STU3
      • 4 for R4
      • 0 if the version is not known

      Returns Promise<number>

    • Returns a promise that will be resolved with the fhir version as defined in the CapabilityStatement.

      Returns Promise<string>

    • Fetches all references in the given resource, ignoring duplicates

      Parameters

      Returns Promise<Record<string, Resource>>

    • Default request options to be used for every request. This method can be overridden in subclasses to provide custom default options.

      Returns Promise<Partial<RequestInit>>

    • 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.

      Parameters

      • bundleOrUrl: string | URL | Bundle<FhirResource>
      • OptionalrequestOptions: RequestOptions

      Returns AsyncGenerator<Bundle<FhirResource>, void, unknown>

    • Fetches all references in the given resource, ignoring duplicates, and then modifies the resource by "mounting" the resolved references in place

      Parameters

      Returns Promise<void>

    • 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)

      Parameters

      • bundleOrUrl: string | URL | Bundle<FhirResource>
      • Optionaloptions: RequestOptions

      Returns AsyncGenerator<FhirResource | undefined, void, unknown>

    • Removes an existing resource.

      Type Parameters

      • R = unknown

      Parameters

      • url: string

        Relative URI of the FHIR resource to be deleted (format: resourceType/id)

      • requestOptions: FetchOptions = {}

        Any options (except method which will be fixed to DELETE) to be passed to the fetch call.

      Returns Promise<R>

    • Makes a JSON Patch to the given resource

      Type Parameters

      • ResolveType = 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.

      Parameters

      • url: string

        Relative URI of the FHIR resource to be patched (format: resourceType/id)

      • patch: JsonPatch

        A JSON Patch array to send to the server, For details see https://datatracker.ietf.org/doc/html/rfc6902

      • requestOptions: FetchOptions = {}

        Any options to be passed to the fetch call, except for method, url and body which cannot be overridden.

      Returns Promise<ResolveType>