Documentation / How to: Profiler
How to write your own data quality rules
Create rules by hand or from a FHIR® profile, and read their results on the Quality tab.
Before you start
- Who
- Data stewards and data quality leads.
- You need
- profiler:quality, and the right to manage rules.
Start from the built-in rules
Quality rules > Built-in lists the shipped rules per dimension: completeness, validity, consistency, uniqueness, integrity and timeliness.
Built-in rules - Filter – Show the rules that apply to one resource type.
- On – Switch a rule on or off.
Create rules from a FHIR profile
Profile reads a StructureDefinition (uploaded, or from simplifier.net) and proposes rules for its cardinalities, fixed values and bindings. Check the preview before you create them.
Rules from a FHIR profile - Upload – Choose a StructureDefinition, or a Bundle with its value sets (JSON).
- Simplifier – Fetch the profiles of the configured simplifier.net package (hl7.fhir.eu.base-r5).
- Preview rules – Shows the rules this profile would create.

Preview of the rules a profile creates - Select – Tick the rules to create; untick the ones you do not want.
- Override – A conflicting rule is kept unless you tick this.
- Create – Creates all selected rules.
Or write one yourself
Custom holds the form for a new rule: resource type, element, check, severity and dimension.
Quality rules - Tabs – Profile, Custom, Built-in and Failing rules.
- Create a custom rule – Form to define a rule (see the topic for examples).
Profile again and read the results
Re-profile the type. Its Quality tab shows the pass rate per dimension and every rule; click a rule for example failing resources.
Quality tab - Dimension rings – Six quality dimensions scored 0–100.
- Rule results – Each rule with violations and examples.
The resultRules that describe what good data means for you, measured on every profiling run.