# 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.

```markup
<BiParameterDefinition xmlns="http://santedb.org/bi" 
  id="org.custom.parameter.referenceType" 
  name="reference_data_version" 
  label="Reference Version" 
  type="string" 
  default="2.0">
  <meta status="active">
    <authors>
      <add>Sample Organization</add>
    </authors>
    <annotation lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>This parameter controls all reference queries to restrict to version</p>
      </div>
    </annotation>
  </meta>
  <values>
    <add value="2.0">Version 2.0 (May 2019)</add>
    <add value="1.1">Version 1.1 (Sept 2018)</add>
    <add value="1.0">Version 1.0 (Oct 2017)</add>
  </values>
</BiParameterDefinition>
```

This particular parameter definition represents a drop-down list with a fixed number of options. Alternately you can specify a query source for this:

```markup
<BiParameterDefinition xmlns="http://santedb.org/bi" 
   ...>
  <meta status="active"> 
     ...
  </meta>
  <query>
    <dataSources>
      <add ref="#org.custom.dataSource.references" name="main"/>
    </dataSources>
    <definitions>
      <add>
        <providers>
          <invariant>PSQL</invariant>
          <invariant>FBSQL</invariant>
        </providers>
        <![CDATA[SELECT DISTINCT id, name FROM versions]]>
      </add>
    </definitions>
  </query>
</BiParmaeterDefinition>
```

{% hint style="info" %}
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:

```markup
 <query ref="#org.custom.query.version"/>
```

{% endhint %}

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.santesuite.org/developers/applets/business-intelligence-bi-assets/bi-asset-definitions/parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
