api

package
v0.4.3-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS      = "success"
	CLIENT_ERROR = "client error"
	SERVER_ERROR = "server error"
	PANIC_ERROR  = "panic recovered"
)

Variables

This section is empty.

Functions

func New

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

func NewLogMsg

func NewLogMsg() *logMsg

func NewPubSubMessage

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

Types

type API

type API struct {
	DB     Repository
	Client HealthcareClient
	// contains filtered or unexported fields
}

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