Queries
Queries in the SanteDB BI services infrastructure allow the definition of a single identified query which can be referenced by reports or views. Queries abstract the underlying query mechanic of the RDBMS and present a logical view of data fed from that data source.
Queries should:
Always return consistent column names between invariant SQL definitions.
Be reusable where possible, representing a logical construct (patients, providers, sessions, etc.)
Define at least npgsql and sqlite definitions
Queries loosely translate to fact sources.
Query Definition Files
The BI infrastructure definition of queries allow multiple invariant representations of a query. For example, one query definition may define SQL for Firebird, PostgreSQL and SQLite . The runtime environment will determine which invariant SQL query to run. For example, if we wanted to reference data for PostgreSQL and Firebird as org.custom.query.ageWeight
Queries can pull data from multiple data sources, however this function is only supported if the underlying data source provider supports attaching additional data sources (for example: SQLite)
Materialized Queries
You can store the result of queries in a materialized view. This view will be refreshed whenever the Refresh BI Materialized Views job is run. To materialize a view, use the <materialize>
element in your query definition.
Last updated