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.
  1. 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
    Built-in rules
    1. Filter – Show the rules that apply to one resource type.
    2. On – Switch a rule on or off.
  2. 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
    Rules from a FHIR profile
    1. Upload – Choose a StructureDefinition, or a Bundle with its value sets (JSON).
    2. Simplifier – Fetch the profiles of the configured simplifier.net package (hl7.fhir.eu.base-r5).
    3. Preview rules – Shows the rules this profile would create.
    Preview of the rules a profile creates
    Preview of the rules a profile creates
    1. Select – Tick the rules to create; untick the ones you do not want.
    2. Override – A conflicting rule is kept unless you tick this.
    3. Create – Creates all selected rules.
  3. Or write one yourself

    Custom holds the form for a new rule: resource type, element, check, severity and dimension.
    Quality rules
    Quality rules
    1. Tabs – Profile, Custom, Built-in and Failing rules.
    2. Create a custom rule – Form to define a rule (see the topic for examples).
  4. 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
    Quality tab
    1. Dimension rings – Six quality dimensions scored 0–100.
    2. Rule results – Each rule with violations and examples.
The resultRules that describe what good data means for you, measured on every profiling run.