Documentation ¶
Index ¶
- Constants
- func AddCreatedOn(resource interface{})
- func GetCollectionName(resourceName string) string
- func InsertResourceFromFile(db *mgo.Database, resourceType string, filePath string) interface{}
- func LoadResource(db *mgo.Database, resourceType string, id bson.ObjectId) (interface{}, error)
- func LoadResourceFromFile(fileName string, resource interface{})
- func MapToResource(resourceMap interface{}, asPointer bool) interface{}
- func NewSliceForResourceName(name string, len int, cap int) interface{}
- func NewStructForResourceName(name string) interface{}
- func PersistFhirResource(db *mgo.Database, resourceType string, resource interface{}) (interface{}, error)
- func PersistResource(db *mgo.Database, resourceType string, resource interface{}) (interface{}, error)
- func PluralizeLowerResourceName(name string) string
- func SliceForResourceName(name string, len int, cap int) interface{}
- func StructForResourceName(name string) interface{}
- func ToBsonObjectID(idStr string) (bson.ObjectId, error)
- func UpdateFhirLastUpdatedDate(resource interface{})
- func UpdateLastUpdatedDate(resource interface{})
- type Link
- type LinkSlice
- type Meta
- type RecordMatchContext
- type RecordMatchRequest
- type RecordMatchResponse
- type RecordMatchRun
- type RecordMatchRunMetrics
- type RecordMatchRunStatusComponent
- type RecordMatchSystemInterface
- type RecordSet
Constants ¶
const ( Deduplication = "deduplication" Query = "query" )
Variables ¶
This section is empty.
Functions ¶
func AddCreatedOn ¶
func AddCreatedOn(resource interface{})
func GetCollectionName ¶
func InsertResourceFromFile ¶
func LoadResource ¶
LoadResource returns an object from the database that matches the specified resource type and object identifier.
func LoadResourceFromFile ¶
func LoadResourceFromFile(fileName string, resource interface{})
func MapToResource ¶
func MapToResource(resourceMap interface{}, asPointer bool) interface{}
When FHIR JSON is unmarshalled, types that are interface{} just get unmarshaled to map[string]interface{}.
This function converts that unmarshaled map to a specific resource type.
func NewSliceForResourceName ¶
func NewStructForResourceName ¶
func NewStructForResourceName(name string) interface{}
func PersistFhirResource ¶
func PersistFhirResource(db *mgo.Database, resourceType string, resource interface{}) (interface{}, error)
PersistFhirResource persists the given FHIR Resource to the database.
func PersistResource ¶
func SliceForResourceName ¶
func StructForResourceName ¶
func StructForResourceName(name string) interface{}
func UpdateFhirLastUpdatedDate ¶
func UpdateFhirLastUpdatedDate(resource interface{})
func UpdateLastUpdatedDate ¶
func UpdateLastUpdatedDate(resource interface{})
Types ¶
type Link ¶
type Link struct { Source string `json:"source"` Target string `json:"target"` Match string `json:"match"` Score float64 `json:"score"` }
Link is not part of FHIR. It is a simplified representation of a suggested link (or lack thereof) between two records.
type LinkSlice ¶
type LinkSlice []Link
LinkSlice is needed as a holder for the functions to work with the sort package
type Meta ¶
type Meta struct { VersionId string `bson:"versionId,omitempty" json:"versionId,omitempty"` CreatedOn time.Time `bson:"createdOn,omitempty" json:"createdOn,omitempty"` LastUpdatedOn time.Time `bson:"lastUpdatedOn,omitempty" json:"lastUpdatedOn,omitempty"` Security []fhir_models.Coding `bson:"security,omitempty" json:"security,omitempty"` Tag []fhir_models.Coding `bson:"tag,omitempty" json:"tag,omitempty"` }
type RecordMatchContext ¶
type RecordMatchContext struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` Meta *Meta `bson:"meta,omitempty" json:"meta,omitempty"` // human-friendly name assoc. w/ this record matching context Name string `bson:"name,omitempty" json:"name,omitempty"` // descriptive remarks assoc. w/ this interface to the record match system Description string `bson:"description,omitempty" json:"description,omitempty"` // distinguishes bewteen different context types (e.g., benchmark, challenge) Type string `bson:"type,omitempty" json:"type,omitempty"` }
type RecordMatchRequest ¶
type RecordMatchRequest struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` Meta *Meta `bson:"meta,omitempty" json:"meta,omitempty"` Message *fhir_models.Bundle `bson:"message,omitempty" json:"message,omitempty"` SubmittedOn time.Time `bson:"submittedOn,omitempty" json:"submittedOn,omitempty"` }
type RecordMatchResponse ¶
type RecordMatchResponse struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` Meta *Meta `bson:"meta,omitempty" json:"meta,omitempty"` Message *fhir_models.Bundle `bson:"message,omitempty" json:"message,omitempty"` ReceivedOn time.Time `bson:"receivedOn,omitempty" json:"receivedOn,omitempty"` }
type RecordMatchRun ¶
type RecordMatchRun struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` Meta *Meta `bson:"meta,omitempty" json:"meta,omitempty"` Note string `bson:"note,omitempty" json:"note,omitempty"` RecordMatchContextID bson.ObjectId `bson:"recordMatchContextId,omitempty" json:"recordMatchContextId,omitempty"` Request RecordMatchRequest `bson:"request,omitempty" json:"request,omitempty"` Responses []RecordMatchResponse `bson:"responses,omitempty" json:"responses,omitempty"` Metrics RecordMatchRunMetrics `bson:"metrics,omitempty" json:"metrics,omitempty"` Status []RecordMatchRunStatusComponent `bson:"status,omitempty" json:"status,omitempty"` // ideally, deduplication or query MatchingMode string `bson:"matchingMode,omitempty" json:"matchingMode,omitempty"` // fhir resource type of the records being matched (e.g., Patient) RecordResourceType string `bson:"recordResourceType,omitempty" json:"recordResourceType,omitempty"` // reference to the record matching system interface RecordMatchSystemInterfaceID bson.ObjectId `bson:"recordMatchSystemInterfaceId,omitempty" json:"recordMatchSystemInterfaceId,omitempty"` MasterRecordSetID bson.ObjectId `bson:"masterRecordSetId,omitempty" json:"masterRecordSetId,omitempty"` QueryRecordSetID bson.ObjectId `bson:"queryRecordSetId,omitempty" json:"queryRecordSetId,omitempty"` }
func (*RecordMatchRun) GetBestLinks ¶
func (rmr *RecordMatchRun) GetBestLinks(count int) []Link
func (*RecordMatchRun) GetLinks ¶
func (rmr *RecordMatchRun) GetLinks() []Link
GetLinks searches all responses to the match run and creates a []Link that is sorted by Score.
func (*RecordMatchRun) GetWorstLinks ¶
func (rmr *RecordMatchRun) GetWorstLinks(count int) []Link
type RecordMatchRunMetrics ¶
type RecordMatchRunMetrics struct { F1 float32 `bson:"f1,omitempty" json:"f1,omitempty"` Precision float32 `bson:"precision,omitempty" json:"precision,omitempty"` Recall float32 `bson:"recall,omitempty" json:"recall,omitempty"` MatchCount int `bson:"matchCount,omitempty" json:"matchCount,omitempty"` TruePositiveCount int `bson:"truePositiveCount,omitempty" json:"truePositiveCount,omitempty"` FalsePositiveCount int `bson:"falsePositiveCount,omitempty" json:"falsePositiveCount,omitempty"` FRecall float32 `bson:"FRecall,omitempty" json:"FRecall,omitempty"` FPrecision float32 `bson:"FPrecision,omitempty" json:"FPrecision,omitempty"` MAP float32 `bson:"MAP,omitempty" json:"MAP,omitempty"` }
RecordMatchRunMetrics contains statistics associated with the results reported by a record matching system.
type RecordMatchSystemInterface ¶
type RecordMatchSystemInterface struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` Meta *Meta `bson:"meta,omitempty" json:"meta,omitempty"` // human-friendly name assoc. with this record match system interface Name string `bson:"name,omitempty" json:"name,omitempty"` // descriptive remarks assoc. w/ this interface to the record match system Description string `bson:"description,omitempty" json:"description,omitempty"` // address to the record match system that will process the request DestinationEndpoint string `bson:"destinationEndpoint,omitempty" json:"destinationEndpoint,omitempty"` // address to the FHIR Server to which the record-match message should be PUT, may be same or different from ultimate message destination ServerEndpoint string `bson:"serverEndpoint,omitempty" json:"serverEndpoint,omitempty"` // address to which record match direct response messages ResponseEndpoint string `bson:"responseEndpoint,omitempty" json:"responseEndpoint,omitempty"` }
type RecordSet ¶
type RecordSet struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` Meta *Meta `bson:"meta,omitempty" json:"meta,omitempty"` Name string `bson:"name,omitempty" json:"name,omitempty"` Description string `bson:"description,omitempty" json:"description,omitempty"` ResourceType string `bson:"resourceType,omitempty" json:"resourceType,omitempty"` AnswerKey fhir_models.Bundle `bson:"answerKey,omitempty" json:"answerKey,omitempty"` Parameters *fhir_models.Parameters `bson:"parameters,omitempty" json:"parameters,omitempty"` }