healthapiclient

package
v0.0.0-...-eb19a62 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 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 FHIRClient

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

FHIRClient represents a client of the FHIR API.

func NewFHIRClient

func NewFHIRClient(ctx context.Context, cred string, metrics *monitoring.Client, apiAddrPrefix, projectID, locationID, datasetID, fhirStoreID string) (*FHIRClient, error)

NewFHIRClient creates a properly authenticated client that talks to a FHIR backend.

func (*FHIRClient) ExecuteBundle

func (c *FHIRClient) ExecuteBundle(bundle []byte) ([]byte, error)

ExecuteBundle calls the FHIR transaction API with a bundle of operations. The response contains processing result for each entry in the bundle.

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, apiAddrPrefix, projectID, locationID, datasetID, hl7V2StoreID string) (*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.

Jump to

Keyboard shortcuts

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