Using clause
An FQL query starts with a source selection. It's a combination of an optional using
statement and an optional from
clause.
So the source selection maybe implicit.
Data source selection
Almost every use case has a default dataset. In FQL this dataset is your starting data collection. In case there is no default or you want to deviate from the default, you can select a different data source.
Syntax
You can select a data source explicitly with the using
statement:
using-clause: 'using' datasource
datasource: identifier | string
The data source can be a string or an identifier.
String data sources
Package references
If the data source is a string, and that string takes the format of a package reference (it contains a dot .
or an at-sign @
),
the tooling must interpret that string as a package reference. It may however report that it cannot deal with packages, has no access
to that package or that it cannot find it.
package-name
package-name '@' latest
package-name '@' package-version
If no version is given, latest
is assumed.
URL references
If the string is a URL, that URL must be interpreted as a FHIR server root endpoint. It is not mandatory for the tool to accept the data source, but the url cannot be interpreted as something else.
If it is not a package version
Identifier data sources
Any identifier is allowed as a named data source, but it depends on the tool, whether that identifier is a known datasource. In Simplifier the following datas source names are understood:
project
scope
In Firely Terminal the following are understood:
stack
project
scope
Source specifiers
A source selection can have a specifier, using the with
and with no
syntax.
Currently a very limited set of specifiers are allowed on a scope selection:
... with dependencies
... with no dependencies
The with dependencies
must be interpreted as that the whole closure of the data source is included in the source data.
The tool is allowed to report not being able to serve that as a data source, but not to interpret it differently.
Other keywords maybe added later.