Parameters
Parameter definitions allow you to define common, reusable parameters within SanteDB. The default parameter definitions provided by SanteDB are:
ID
Type
Description
org.santedb.bi.core.parameter.common.date.from
DATE
A date-picker input which has a max value of to-date.
org.santedb.bi.core.parameter.common.date.to
DATE
A date picker input which has a min value of from-date
org.santedb.bi.core.parameter.user.class
UUID
User class parameters.

Parameter Definition Files

Parameter definitions are used to provide common input controls to reports and queries. These parameters, like data sources can also be annotated with metadata including permission directives.
1
<BiParameterDefinition xmlns="http://santedb.org/bi"
2
id="org.custom.parameter.referenceType"
3
name="reference_data_version"
4
label="Reference Version"
5
type="string"
6
default="2.0">
7
<meta status="active">
8
<authors>
9
<add>Sample Organization</add>
10
</authors>
11
<annotation lang="en">
12
<div xmlns="http://www.w3.org/1999/xhtml">
13
<p>This parameter controls all reference queries to restrict to version</p>
14
</div>
15
</annotation>
16
</meta>
17
<values>
18
<add value="2.0">Version 2.0 (May 2019)</add>
19
<add value="1.1">Version 1.1 (Sept 2018)</add>
20
<add value="1.0">Version 1.0 (Oct 2017)</add>
21
</values>
22
</BiParameterDefinition>
Copied!
This particular parameter definition represents a drop-down list with a fixed number of options. Alternately you can specify a query source for this:
1
<BiParameterDefinition xmlns="http://santedb.org/bi"
2
...>
3
<meta status="active">
4
...
5
</meta>
6
<query>
7
<dataSources>
8
<add ref="#org.custom.dataSource.references" name="main"/>
9
</dataSources>
10
<definitions>
11
<add>
12
<providers>
13
<invariant>PSQL</invariant>
14
<invariant>FBSQL</invariant>
15
</providers>
16
<![CDATA[SELECT DISTINCT id, name FROM versions]]>
17
</add>
18
</definitions>
19
</query>
20
</BiParmaeterDefinition>
Copied!
In the BI engine you can include any data inline, or you can reference it by ID . In the example above, one could define a query with ID org.custom.query.version and reference it from their parameter definition as:
1
<query ref="#org.custom.query.version"/>
Copied!

Last modified 2mo ago