Documentation ¶
Index ¶
- func AddDashboardLocation(c *gin.Context)
- func AuthSignin(c *gin.Context)
- func AuthSignup(c *gin.Context)
- func BackgroundJobSyncResources(parentContext context.Context, logger *logrus.Entry, ...) (sourceModels.UpsertSummary, error)
- func BackgroundJobSyncResourcesWrapper(parentContext context.Context, logger *logrus.Entry, ...) (sourceModels.UpsertSummary, error)
- func CORSProxy(c *gin.Context)
- func CreateBackgroundJobContext(parentContext context.Context, backgroundJobId string) context.Context
- func CreateBackgroundJobError(c *gin.Context)
- func CreateManualSource(c *gin.Context)
- func CreateReconnectSource(c *gin.Context)
- func CreateRelatedResources(c *gin.Context)
- func CreateResourceComposition(c *gin.Context)
- func DeleteAccount(c *gin.Context)
- func DeleteSource(c *gin.Context)
- func FindCodeSystem(codeSystem string) (string, error)
- func GetBackgroundContext(ginContext *gin.Context) context.Context
- func GetDashboard(c *gin.Context)
- func GetResourceFhir(c *gin.Context)
- func GetResourceFhirGraph(c *gin.Context)
- func GetSource(c *gin.Context)
- func GetSourceSummary(c *gin.Context)
- func GetSummary(c *gin.Context)
- func GlossarySearchByCode(c *gin.Context)
- func ListBackgroundJobs(c *gin.Context)
- func ListResourceFhir(c *gin.Context)
- func ListSource(c *gin.Context)
- func QueryResourceFhir(c *gin.Context)
- func SSEEventBusServerHandler(eventBus event_bus.Interface) gin.HandlerFunc
- func SourceSync(c *gin.Context)
- func SupportRequest(c *gin.Context)
- func UnsafeRequestSource(c *gin.Context)
- func UnsafeResourceGraph(c *gin.Context)
- func UnsafeSyncResourceNames(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDashboardLocation ¶
func AuthSignin ¶
func AuthSignup ¶
func BackgroundJobSyncResources ¶ added in v0.1.8
func BackgroundJobSyncResources( parentContext context.Context, logger *logrus.Entry, databaseRepo database.DatabaseRepository, sourceCred *models.SourceCredential, ) (sourceModels.UpsertSummary, error)
This function is used to sync resources from a source (via a callback function). The BackgroundJobSyncResourcesWrapper contains the logic for registering the background job tracking the sync.
func BackgroundJobSyncResourcesWrapper ¶ added in v1.0.2
func BackgroundJobSyncResourcesWrapper( parentContext context.Context, logger *logrus.Entry, databaseRepo database.DatabaseRepository, sourceCred *models.SourceCredential, callbackFn func( _backgroundJobContext context.Context, _logger *logrus.Entry, _databaseRepo database.DatabaseRepository, _sourceCred *models.SourceCredential, ) (sourceModels.SourceClient, sourceModels.UpsertSummary, error), ) (sourceModels.UpsertSummary, error)
BackgroundJobSyncResourcesWrapper is a background job that syncs all FHIR resource for a given source It is a blocking function that will return only when the sync is complete or has failed It will create a background job and associate it with the source It will also update the access token and refresh token if they have been updated It will return the sync summary and error if any
It's a wrapper function that takes a callback function as an argument. The callback function is the actual sync operation that will be run in the background (regular source or manual source)
TODO: run in background thread, or use https://gobyexample.com/tickers TODO: use goroutine to truely run in the background (how will that work with DatabaseRepository, is that thread safe?) Mutex needed?
func CORSProxy ¶
TODO, there are security implications to this, we need to make sure we lock this down.
func CreateBackgroundJobContext ¶ added in v0.1.8
func CreateBackgroundJobError ¶ added in v1.1.0
CreateBackgroundJobError this function is used to store error data related to a Source/Provider connection operation that fails in the client-side - client errors occur when the OAuth provider sends back an error message (error, error_description query string parameters) or when the code -> access token swap results in an error. - server side errors occur for a number of reasons (unable to initialize client, unable to store crednetial in db, unable to sync 1 or more FHIR resources from a patient's medical record)
func CreateManualSource ¶
mimics functionality in CreateRelatedResources mimics functionality in SourceSync
func CreateReconnectSource ¶ added in v0.1.8
func CreateRelatedResources ¶ added in v1.0.2
mimics functionality in CreateManualSource
func CreateResourceComposition ¶
deprecated - using Manual Resource Wizard instead
func DeleteAccount ¶ added in v1.0.2
SECURITY: this is a secure endpoint, and should only be called after a double confirmation
func DeleteSource ¶ added in v0.1.8
func FindCodeSystem ¶
func GetBackgroundContext ¶ added in v0.1.7
func GetDashboard ¶
func GetResourceFhir ¶
this endpoint retrieves a specific resource by its ID
func GetResourceFhirGraph ¶
GetResourceFhirGraph Retrieve a list of all fhir resources (vertex), and a list of all associations (edge) Generate a graph find the PredecessorMap - filter to only vertices that are "Condition" or "Encounter" and are "root" nodes (have no edges directed to this node)
func GetSourceSummary ¶
func GetSummary ¶
func GlossarySearchByCode ¶
https://medlineplus.gov/medlineplus-connect/web-service/ NOTE: max requests is 100/min
func ListBackgroundJobs ¶ added in v0.1.8
func ListResourceFhir ¶
func ListSource ¶
func QueryResourceFhir ¶
func SSEEventBusServerHandler ¶ added in v0.1.7
func SSEEventBusServerHandler(eventBus event_bus.Interface) gin.HandlerFunc
func SourceSync ¶
func SupportRequest ¶ added in v0.1.8
func UnsafeRequestSource ¶
func UnsafeResourceGraph ¶
func UnsafeSyncResourceNames ¶ added in v0.2.0
Types ¶
This section is empty.