mcsd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	// contains filtered or unexported fields
}

Component implements a mCSD Update Client, which synchronizes mCSD FHIR resources from remote mCSD Directories to a local mCSD Directory for querying. It is configured with a root mCSD Directory, which is used to discover organizations and their mCSD Directory endpoints. Organizations refer to Endpoints through Organization.endpoint references. Synchronization is a 2-step process: 1. Query the root mCSD Directory for Organization resources and their associated Endpoint resources of type 'mcsd-directory-endpoint'. 2. For each discovered mCSD Directory Endpoint, query the remote mCSD Directory for its resources and copy them to the local mCSD Query Directory.

  • The following resource types are synchronized: Organization, Endpoint, Location, HealthcareService
  • An organization's mCSD Directory may only return Organization resources that:
  • exist in the root mCSD Directory (link by identifier, name must be the same)
  • have the same mcsd-directory-endpoint as the directory being queried
  • These are mitigating measures to prevent an attacker to spoof another care organization.

func New

func New(config Config) (*Component, error)

func (*Component) RegisterHttpHandlers

func (c *Component) RegisterHttpHandlers(publicMux, internalMux *http.ServeMux)

func (*Component) Start

func (c *Component) Start() error

func (*Component) Stop

func (c *Component) Stop(ctx context.Context) error

type Config

type Config struct {
	AdministrationDirectories map[string]DirectoryConfig `koanf:"admin"`
	QueryDirectory            DirectoryConfig            `koanf:"query"`
}

type DirectoryConfig

type DirectoryConfig struct {
	FHIRBaseURL string `koanf:"fhirbaseurl"`
}

type DirectoryUpdateReport

type DirectoryUpdateReport struct {
	CountCreated int      `json:"created"`
	CountUpdated int      `json:"updated"`
	CountDeleted int      `json:"deleted"`
	Warnings     []string `json:"warnings"`
	Errors       []string `json:"errors"`
}

type UpdateReport

type UpdateReport map[string]DirectoryUpdateReport

Jump to

Keyboard shortcuts

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