> For the complete documentation index, see [llms.txt](https://help.santesuite.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.santesuite.org/operations/cdr-administration/santedb-administration-panel/cdr-administration/data-quality-rules.md).

# Data Quality Rules

{% hint style="info" %}
This page documents a feature which is only available in SanteDB 3.0
{% endhint %}

SanteDB allows system administrators to manage the data quality rules from the administration panel. Data quality rules are applied to all objects which are configured and result in a detected issue extension being added to the persisted object. This information can then be viewed (for example: [Data Quality Tab in SanteMPI](/user-guides-and-training/santempi/the-patient-dashboard/data-quality-tab.md)) used in matching configurations to prevent matching of records with data quality problems, or called when the `$validate` method is invoked on the HDSI.

<figure><img src="https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZ0_pjgTp_kx4hqTZ3a%2Fuploads%2FysjbUepxkFbNlf1vdUXz%2Fimage.png?alt=media&amp;token=fb44788a-89b9-4b4d-93cf-be73738bb2b0" alt=""><figcaption></figcaption></figure>

## Editing Data Quality Rules

### Core Properties

Editing data quality rules and creating a new set of data quality rules is a very similar process. First, the data quality properties are populated:

<figure><img src="https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZ0_pjgTp_kx4hqTZ3a%2Fuploads%2Fl6eAdrhY3peTRXola5Rv%2Fimage.png?alt=media&amp;token=4a01862b-4591-4187-b166-eb68a9bef391" alt=""><figcaption></figcaption></figure>

* **Identifier:** The unique data quality rule identiifer for the entire rule configuration. This must be unique to the SanteDB deployment.
* **Name:** The name of the data quality rules configuration, this is a human readable name referenced by administrators in log files and on the UI.
* **Active:** When selected, indicates that the rules should be applied to all inbound objects.

### Resources

Each rule configuration contains one or more resource types that the rules apply to. When adding a new resource type, the administrator must select the type of resource to which the rule applies. Then one or more assertions are added to the resource. For example, to create a data quality rule for weights which are negative.

<figure><img src="https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZ0_pjgTp_kx4hqTZ3a%2Fuploads%2FcnCnkjyY6lpkuli1J0AL%2Fimage.png?alt=media&amp;token=60bf8be7-984d-4a28-b578-d62e1ce0a427" alt=""><figcaption></figcaption></figure>
