CustomSearchParameters class
The uploaded search parameters of one store: read from the stored
SearchParameter resources, evaluated with the FHIRPath engine on every
save and on a rebuild, and consulted by the query side for the table a
name routes to. What HAPI/Smile CDR and the Azure FHIR service do for
every parameter, done here for the ones the specification does not
define (the generated extractor keeps those).
Constructors
-
CustomSearchParameters(FHIRPathEngine engine, {required SearchIndexer indexer, required Set<
String> knownTypes, required SearchDefinitions builtIn}) -
Creates an empty registry over
engineandindexer.
Properties
-
all
→ Iterable<
CustomSearchParameter> -
Every registered parameter.
no setter
- builtIn → SearchDefinitions
-
The specification's own definitions, which an upload may not shadow.
final
- engine → FHIRPathEngine
-
The engine the expressions are parsed and evaluated with.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- indexer → SearchIndexer
-
The row builders of this store's model.
final
-
knownTypes
→ Set<
String> -
The resource type names of the model, for checking
base.final -
rejected
→ List<
(String, String)> -
Stored definitions that could not be registered when the registry was
loaded (id, reason): saved before validation existed, or by a model
without an engine. Nothing is indexed by them.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
FhirNode definition) → CustomSearchParameter? -
Registers
definition; see parse for what is refused. -
appendRows(
FhirNode resource, SearchParameterLists into) → Future< void> -
The index rows of
resourcefor every registered parameter that applies to it, appended tointo. Each expression is evaluated by the engine and its values handed to the row builder of the parameter's type, the same builders the generated extractor uses. An evaluation error propagates: the save fails rather than storing a resource the parameter cannot find, as every other indexing failure does here. -
forType(
String resourceType) → List< CustomSearchParameter> -
The registered parameters a resource of
resourceTypeis indexed by. -
lookup(
String resourceType, String code) → SearchParameterDefinition? -
The definition of
codeonresourceType, or null when no upload defines it. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
FhirNode definition) → CustomSearchParameter? -
Parses and checks
definition, aSearchParameterresource, without registering it. Throws InvalidSearchParameter when the store could not index by it. Returns null for a definition whosestatusis notactive: stored, but not indexed (Smile CDR: "assuming the new parameter is valid and active, all resource changes (creates, updates, etc.) will be indexed by the new search parameter"). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited