Documentation ¶
Index ¶
- type Bundle
- type BundleEntry
- type BundleEntryRequest
- type BundleEntryResponse
- type CapabilityStatement
- type CapabilityStatementRest
- type CapabilityStatementRestResource
- type CapabilityStatementRestResourceInteraction
- type Client
- func (c *Client) CloseIdleConnections()
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) NewBatchRequest(body io.Reader) (*http.Request, error)
- func (c *Client) NewCapabilitiesRequest() (*http.Request, error)
- func (c *Client) NewSearchTypeRequest(resourceType string) (*http.Request, error)
- func (c *Client) NewTransactionRequest(body io.Reader) (*http.Request, error)
- func (c *Client) SearchTypeURL(resourceType string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct { Type string Total *int Entry []BundleEntry }
Bundle is documented here https://www.hl7.org/fhir/bundle.html
func ReadBundle ¶ added in v0.2.0
ReadBundle reads and unmarshals a bundle.
func UnmarshalBundle ¶ added in v0.2.0
UnmarshalBundle unmarshals a bundle.
func (Bundle) MarshalJSON ¶ added in v0.2.0
MarshalJSON marshals the given bundle as JSON into a byte slice
type BundleEntry ¶ added in v0.2.0
type BundleEntry struct { Resource json.RawMessage `json:"resource,omitempty"` Request *BundleEntryRequest `json:"request,omitempty"` Response *BundleEntryResponse `json:"response,omitempty"` }
BundleEntry represents the Bundle.entry BackboneElement
type BundleEntryRequest ¶ added in v0.2.0
BundleEntryRequest represents the Bundle.entry.request BackboneElement
type BundleEntryResponse ¶ added in v0.2.0
type BundleEntryResponse struct {
Status string `json:"status"`
}
BundleEntryResponse represents the Bundle.entry.response BackboneElement
type CapabilityStatement ¶
type CapabilityStatement struct { FhirVersion string Rest []CapabilityStatementRest }
CapabilityStatement is documented here https://www.hl7.org/fhir/capabilitystatement.html
func ReadCapabilityStatement ¶ added in v0.2.0
func ReadCapabilityStatement(r io.Reader) (CapabilityStatement, error)
ReadCapabilityStatement reads and unmarshals a capability statement.
type CapabilityStatementRest ¶
type CapabilityStatementRest struct { Mode string Resource []CapabilityStatementRestResource }
CapabilityStatementRest represents the CapabilityStatement.rest BackboneElement
type CapabilityStatementRestResource ¶
type CapabilityStatementRestResource struct { Type string Interaction []CapabilityStatementRestResourceInteraction }
CapabilityStatementRestResource represents the CapabilityStatement.rest.resource BackboneElement
func (CapabilityStatementRestResource) DoesSupportsInteraction ¶ added in v0.2.0
func (r CapabilityStatementRestResource) DoesSupportsInteraction(code string) bool
DoesSupportsInteraction returns true iff the resource supports the given interaction. Possible interactions are defined in https://www.hl7.org/fhir/valueset-type-restful-interaction.html
type CapabilityStatementRestResourceInteraction ¶ added in v0.2.0
type CapabilityStatementRestResourceInteraction struct {
Code string
}
CapabilityStatementRestResourceInteraction represents the CapabilityStatement.rest.resource.interaction BackboneElement
type Client ¶ added in v0.2.0
A Client is a FHIR client which combines an HTTP client with the base URL of a FHIR server. At minimum, the Base has to be set. HttpClient can be left at its default value.
func (*Client) CloseIdleConnections ¶ added in v0.2.0
func (c *Client) CloseIdleConnections()
CloseIdleConnections calls CloseIdleConnections on the HTTP client of the FHIR client.
func (*Client) NewBatchRequest ¶ added in v0.2.0
NewBatchRequest creates a new transaction/batch interaction request. Uses the base URL from the FHIR client and sets JSON Accept and Content-Type headers. Otherwise it's identical to http.NewRequest.
func (*Client) NewCapabilitiesRequest ¶ added in v0.2.0
NewCapabilitiesRequest creates a new capabilities interaction request. Uses the base URL from the FHIR client and sets JSON Accept header. Otherwise it's identical to http.NewRequest.
func (*Client) NewSearchTypeRequest ¶ added in v0.2.0
NewSearchTypeRequest creates a new search-type interaction request. Uses the base URL from the FHIR client and sets JSON Accept header. Otherwise it's identical to http.NewRequest.
func (*Client) NewTransactionRequest ¶ added in v0.2.0
NewTransactionRequest creates a new transaction/batch interaction request. Uses the base URL from the FHIR client and sets JSON Accept and Content-Type headers. Otherwise it's identical to http.NewRequest.
func (*Client) SearchTypeURL ¶ added in v0.2.0
SearchTypeURL generates the URL for a search-type interaction of the given resource type