Documentation ¶
Index ¶
- Constants
- func CustodianFrom(jsonq *gojsonq.JSONQ) string
- func DataClassesFrom(jsonq *gojsonq.JSONQ) []string
- func PeriodFrom(jsonq *gojsonq.JSONQ) []*time.Time
- func ResourcesFrom(jsonq *gojsonq.JSONQ) []string
- func SubjectFrom(jsonq *gojsonq.JSONQ) string
- func VersionFrom(jsonq *gojsonq.JSONQ) string
- type Identifier
- type Validator
- type ValidatorClient
Constants ¶
const ConfigSchemaPath = "schemapath"
--schemapath config flag
const ConfigSchemaPathDefault = ""
default use Asset
Variables ¶
This section is empty.
Functions ¶
func CustodianFrom ¶
func CustodianFrom(jsonq *gojsonq.JSONQ) string
CustodianFrom extracts the organization from a given Consent json jsonq source
func DataClassesFrom ¶
func DataClassesFrom(jsonq *gojsonq.JSONQ) []string
DataClassesFrom extracts the consent provision classes from some fhir json, replaces ResourcesFrom It combines the system and code field to a single string using the correct divider (: or #) based on the type of system
func PeriodFrom ¶
PeriodFrom returns a tuple of time pointers (validFrom, validTo) extracted from FHIR where the validTo may be nil
func ResourcesFrom ¶
func ResourcesFrom(jsonq *gojsonq.JSONQ) []string
ResourcesFrom extracts the consent resources from some fhir json, deprecated, replaced by DataClassesFrom
func SubjectFrom ¶
func SubjectFrom(jsonq *gojsonq.JSONQ) string
SubjectFrom extracts the patient from a given Consent json jsonq source
func VersionFrom ¶
func VersionFrom(jsonq *gojsonq.JSONQ) string
Types ¶
type Identifier ¶
type Identifier string
Identifier is a synonym for string
func ActorsFrom ¶
func ActorsFrom(jsonq *gojsonq.JSONQ) []Identifier
ActorsFrom extracts the consent actors from some fhir json
type Validator ¶
type Validator struct { Config struct { Schemapath string } // contains filtered or unexported fields }
Validator holds the config and schemaLoader for the validator
func ValidatorInstance ¶
func ValidatorInstance() *Validator
ValidatorInstance returns the singleton Validator
func (*Validator) ValidateAgainstSchema ¶
Validate the consent record against the schema
type ValidatorClient ¶
type ValidatorClient interface { // ValidateAgainstSchemaConsentAt validates the consent record at the given location (on disk) ValidateAgainstSchemaConsentAt(source string) (bool, []string, error) // ValidateAgainstSchema Validates the given consent record against the schema ValidateAgainstSchema(json []byte) (bool, []string, error) }
ValidatorClient is the main interface for the Validator
func NewValidatorClient ¶
func NewValidatorClient() ValidatorClient
NewValidatorClient returns the default Validator client, either a Local- or RemoteClient