healthapiclient

package
v0.0.0-...-e3528c7 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package healthapiclient handles communication with the APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HL7V2Client

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

HL7V2Client represents a client of the HL7v2 API.

func NewHL7V2Client

func NewHL7V2Client(ctx context.Context, cred string, metrics monitoring.Client, si StoreInfo, opt Option) (*HL7V2Client, error)

NewHL7V2Client creates a properly authenticated client that talks to an HL7v2 backend.

func (*HL7V2Client) Get

func (c *HL7V2Client) Get(msgName string) ([]byte, error)

Get retrieves a message from the server. Returns an error if the request fails.

func (*HL7V2Client) Send

func (c *HL7V2Client) Send(data []byte) ([]byte, error)

Send sends a message to the endpoint and returns the ACK/NACK response. Returns an error if the request fails without a NACK response.

type Option

type Option struct {
	LogNACKedMessage bool
	LogErrorMessage  bool
}

Option contains flags for the HL7v2Client.

type StoreInfo

type StoreInfo struct {
	ProjectID    string
	LocationID   string
	DatasetID    string
	HL7V2StoreID string
}

StoreInfo contains information about an HL7v2 store.

Jump to

Keyboard shortcuts

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