controllers

package
v0.0.0-...-48b5071 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SearchParams = map[string][]string{
	"RecordMatchRun": []string{"recordMatchContextId"},
}

Functions

func CreateRecordMatchRunHandler

func CreateRecordMatchRunHandler(provider func() *mgo.Database) gin.HandlerFunc

CreateRecordMatchRunHandler creates a HandlerFunc that creates a new RecordMatchRun and constructs and sends a Record Match request message.

func GetRecordMatchRunLinksHandler

func GetRecordMatchRunLinksHandler(provider func() *mgo.Database) gin.HandlerFunc

func GetRecordMatchRunMetricsHandler

func GetRecordMatchRunMetricsHandler(provider func() *mgo.Database) gin.HandlerFunc

Types

type ResourceController

type ResourceController struct {
	DatabaseProvider func() *mgo.Database
}

func (*ResourceController) CreateResource

func (rc *ResourceController) CreateResource(ctx *gin.Context)

CreateResource creates an instance of the resource associated with the request url, writes the body of the request into the new object, and then persists the object in the database. A unique identifier is created and associated with the object. A copy of the object that was stored in the database is returned in the response.

func (ResourceController) Database

func (r ResourceController) Database() *mgo.Database

func (*ResourceController) DeleteResource

func (rc *ResourceController) DeleteResource(ctx *gin.Context)

DeleteResource handles requests to delete a specific resource.

func (*ResourceController) GetResource

func (rc *ResourceController) GetResource(ctx *gin.Context)

func (*ResourceController) GetResources

func (rc *ResourceController) GetResources(ctx *gin.Context)

func (*ResourceController) LoadResource

func (rc *ResourceController) LoadResource(resourceType string, id bson.ObjectId) (interface{}, error)

LoadResource returns an object from the database that matches the specified resource type and object identifier.

func (*ResourceController) SetAnswerKey

func (rc *ResourceController) SetAnswerKey(ctx *gin.Context)

SetAnswerKey associates a specified Record Set with a FHIR Bundle that contains a set of expected record matches (i.e., answer key for the record set) The uploaded file is expected to be a FHIR Bundle of type, document, in JSON representation.

func (*ResourceController) UpdateResource

func (rc *ResourceController) UpdateResource(ctx *gin.Context)

Jump to

Keyboard shortcuts

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