Documentation
¶
Index ¶
- func ValidateParentOrganizations(parentOrganizationMap map[*fhir.Organization][]*fhir.Organization) error
- func ValidateUpdate(ctx context.Context, rules ValidationRules, resourceJSON []byte, ...) error
- type Component
- type Config
- type DirectoryConfig
- type DirectoryUpdateReport
- type UpdateReport
- type ValidationRules
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateParentOrganizations ¶ added in v0.4.0
func ValidateParentOrganizations(parentOrganizationMap map[*fhir.Organization][]*fhir.Organization) error
ValidateParentOrganizations validates all parent organizations in the map.
func ValidateUpdate ¶ added in v0.4.0
func ValidateUpdate(ctx context.Context, rules ValidationRules, resourceJSON []byte, parentOrganizationMap map[*fhir.Organization][]*fhir.Organization, allHealthcareServices []fhir.BundleEntry) error
ValidateUpdate validates a FHIR resource create/update from a mCSD Administration Directory, according to the rules specified by https://nuts-foundation.github.io/nl-generic-functions-ig/care-services.html#update-client
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.
- The organization's mcsd-directory-endpoint must be discoverable through the root mCSD Directory.'
func (*Component) RegisterHttpHandlers ¶
type Config ¶
type Config struct {
AdministrationDirectories map[string]DirectoryConfig `koanf:"admin"`
QueryDirectory DirectoryConfig `koanf:"query"`
ExcludeAdminDirectories []string `koanf:"adminexclude"`
DirectoryResourceTypes []string `koanf:"directoryresourcetypes"`
}
func DefaultConfig ¶ added in v0.4.0
func DefaultConfig() Config
type DirectoryConfig ¶
type DirectoryConfig struct {
FHIRBaseURL string `koanf:"fhirbaseurl"`
}
type DirectoryUpdateReport ¶
type UpdateReport ¶
type UpdateReport map[string]DirectoryUpdateReport
type ValidationRules ¶ added in v0.4.0
type ValidationRules struct {
// AllowedResourceTypes is a list of FHIR resource types that are allowed to be created/updated.
AllowedResourceTypes []string
}