capabilityquerier

package
v0.0.0-...-eb5d397 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAndSendCapabilityStatement

func GetAndSendCapabilityStatement(ctx context.Context, args *map[string]interface{}) error

GetAndSendCapabilityStatement gets a capability statement from a FHIR API endpoint and then puts the capability statement and accompanying data on a receiving queue. The args are expected to be a map of the string "querierArgs" to the above QuerierArgs struct. It is formatted this way in order for it to be able to be called by a worker (see endpointmanager/pkg/workers)

func GetAndSendVersionsResponse

func GetAndSendVersionsResponse(ctx context.Context, args *map[string]interface{}) error

GetAndSendVersionsResponse gets a $versions response from a FHIR API endpoint and then puts the versions response and accompanying data on a receiving queue.

Types

type EndpointType

type EndpointType string

type Message

type Message struct {
	URL                      string      `json:"url"`
	Err                      string      `json:"err"`
	MIMETypes                []string    `json:"mimeTypes"`
	TLSVersion               string      `json:"tlsVersion"`
	HTTPResponse             int         `json:"httpResponse"`
	CapabilityStatement      interface{} `json:"capabilityStatement"`
	CapabilityStatementBytes []byte      `json:"capabilityStatementBytes"`
	SMARTHTTPResponse        int         `json:"smarthttpResponse"`
	SMARTResp                interface{} `json:"smartResp"`
	SMARTRespBytes           []byte      `json:"smartRespBytes"`
	ResponseTime             float64     `json:"responseTime"`
	RequestedFhirVersion     string      `json:"requestedFhirVersion"`
	DefaultFhirVersion       string      `json:"defaultFhirVersion"`
}

Message is the structure that gets sent on the queue with capability statement inforation. It includes the URL of the FHIR API, any errors from making the FHIR API request, the MIME type, the TLS version, and the capability statement itself.

type QuerierArgs

type QuerierArgs struct {
	FhirURL        string
	RequestVersion string
	DefaultVersion string
	Client         *http.Client
	MessageQueue   *lanternmq.MessageQueue
	ChannelID      *lanternmq.ChannelID
	QueueName      string
	UserAgent      string
	Store          *postgresql.Store
}

QuerierArgs is a struct of the queue connection information (MessageQueue, ChannelID, and QueueName) as well as the Client and FhirURL for querying

type VersionsMessage

type VersionsMessage struct {
	URL              string      `json:"url"`
	Err              string      `json:"err"`
	VersionsResponse interface{} `json:"versionsResponse"`
}

VersionMessage is the structure that gets sent on the queue with $versions response inforation. It includes the URL of the FHIR API, any errors from making the FHIR $versions request, and the $versions response itself.

Jump to

Keyboard shortcuts

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