api

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const SegDelim = '\r'

Variables

This section is empty.

Functions

func New

func New(db Repository, client HealthcareClient) *http.ServeMux

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(messagePath 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(ctx context.Context, orm models.ORM) error
	InsertORU(ctx context.Context, oru models.ORU) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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