It is the central piece of the View Layer and represents a tabular projection of FHIR resources with the columns and filtering criteria defined by FHIRPath expressions. The logical model is described below.
Each ViewDefinition instance is tied to a single FHIR resource type, such as Patient or Observation. It will then create zero or more rows for each resource instance. Examples include simple tabular views of patients, unrolling patient addresses into an address table, views of certain types of observations, and so on.
Each ViewDefinition instance has a select that specifies the content and names for the columns in the view. The content for each column is defined with FHIRPath expressions that return specific data elements from the FHIR resources.
The ViewDefinition may include one or more where clauses that may be used to further limit, or filter, the resources included in the view. For instance, users may have different views for blood pressure observations or other observation types.
The ViewDefinition may include one or more constants, which are simply values that can be reused in FHIRPath expressions.
A View Runner implementation can execute a ViewDefinition and return the results as a table that can be used for further processing using the user's chosen tech stack. See System Layers for details.
ViewDefinitions may be profiled to meet specific needs. For instance, the Shareable View Definition profile adds constraints for ViewDefinitions intended to be shared between systems. Implementers may create their own ViewDefinition profiles for further specialized needs.