From 1027a3fc999f1c6fe6bd03d6589801ad4bd6235d Mon Sep 17 00:00:00 2001 From: Ryan Brush Date: Wed, 15 May 2024 17:35:43 +0000 Subject: [PATCH] Add View Definition non-goals to main page. --- input/pagecontent/index.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/input/pagecontent/index.md b/input/pagecontent/index.md index e0d30e3..576ddfb 100644 --- a/input/pagecontent/index.md +++ b/input/pagecontent/index.md @@ -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 View Definition 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 +View Definitions themselves are independent 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