fhirclient

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fhirclient is a small read-only FHIR R4 HTTP client (Search and Read). It depends only on the stdlib and samply FHIR models — no substrate-internal imports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client reads from a FHIR R4 server base URL (e.g. https://ehr.example/fhir). Unauthenticated by default; an injected token source supplies auth.

func New

func New(baseURL string, hc *http.Client) *Client

New returns a Client for baseURL. A nil hc uses http.DefaultClient. Trailing slashes on baseURL are trimmed so path joining is unambiguous.

func (*Client) Search

func (c *Client) Search(ctx context.Context, resourceType string, query url.Values) (*fhir.Bundle, error)

Search issues GET {base}/{resourceType}?{query} and returns the parsed Bundle. Non-2xx or a decode failure is an error (callers decide how to degrade).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL