api

package
v0.2.1-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db Repository, client HealthcareClient) http.Handler

func NewPubSubMessage

func NewPubSubMessage(body io.Reader) (*pubSubMessage, error)

Types

type API

type API struct {
	DB     Repository
	Client HealthcareClient
}

type DB

type DB struct {
	*database.Queries
}

func NewDB

func NewDB(db *pgxpool.Pool) DB

func (DB) InsertORU

func (d DB) InsertORU(ctx context.Context, oru models.ORU) error

func (DB) UpsertORM

func (d DB) UpsertORM(ctx context.Context, orm models.ORM) error

type HealthcareClient

type HealthcareClient interface {
	GetHL7V2Message(string) (hl7.Message, error)
}

type Hl7Client

type Hl7Client healthcare.Service

func NewHl7Client

func NewHl7Client(ctx context.Context, opts ...option.ClientOption) (*Hl7Client, error)

func (*Hl7Client) GetHL7V2Message

func (h *Hl7Client) GetHL7V2Message(messagePath string) (hl7.Message, error)

type Repository

type Repository interface {
	UpsertORM(context.Context, models.ORM) error
	InsertORU(context.Context, models.ORU) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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