Skip to content

Commit

Permalink
Add View Definition non-goals to main page.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrush committed May 15, 2024
1 parent 600a340 commit 451a68e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions input/pagecontent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,31 @@ Such tabular views can be created for any FHIR resource, with
[View Definition page](StructureDefinition-ViewDefinition.html) for the full definition
of the above structure.

### View Definition non-goals
View Definitions are intentionally constrained to a narrow set of functionality to make them easily
and broadly implementable, while deferring higher-level capabilities to database engines or processing
pipelines that solve those problems well. Therefore it's important to know what View Definitions
do *not* do, by design:

#### A single View Definition will not join different resources in any way
A single ViewDefinition defines a tabular view of exactly one resource type, like a view of `Patient`
or a view of `Condition` resources. Any joins between resources are exclusively in downstream systems,
like between database tables computed by view definitions. This makes it possible for a wide set of
FHIR infrastructure to implement this spec, and lets database engines or processing pipelines join as
needed.

#### View Definitions do not have sorting, aggregation, or limit capabilities
View Definitions define only the logical schema of views, and therefore defer sorting, aggergation or limit
operations to engines, along with cross-view joins. *View Runners* (described below) or future FHIR
server operations may accept limits or sort columns as part of their operations, so users at runtime can
specify what they need dynamically and independently of the definition of the view itself.

#### View Definitions are not aware of output formats
ViewDefinitions themselves are independnet of any tech stack and therefore unaware of the output format.
*View Runners* are the component that applies definitions to a particular stack, producing output like
a database table, Parquet file, CSV, or another format specific to the runner.


### System Layers

The [View Definition](StructureDefinition-ViewDefinition.html) is the central element of this
Expand Down

0 comments on commit 451a68e

Please sign in to comment.