Vocabulary-Based Validation

Verifying that input data conforms to a predefined set of concepts.

Vocabulary-based validation ensures information sent to Data Sources conforms to the predefined concepts defined within a vocabulary.

By referencing the vocabulary in the Data Profiles or Relationship Definition, this validation mechanism guarantees consistency and compliance with the configured concepts.

📘

Note: Before applying this configuration, make sure you have configured your Vocabularies and Concepts.


Apply Vocabulary-Based Validation to Properties

The binding parameter attached to a field will Define the vocabulary and validation strength for the property. The available parameters are:

  • vocabulary.key Symbol:
    The unique identifier of the vocabulary to validate against.
  • vocabulary.strength Code :
    Validation level against the vocabulary concepts.
    • "preferred": Instances are encouraged to draw from the specified vocabulary concepts for interoperability purposes but are not required to be considered conformant (No error at ingestion).
    • "required"": To be conformant, the concept in this element shall be from the specified value set. An error will be returned if no concept code property contains the provided value.
{
    "properties": {
        "<property-1>": {
            "type": "code",
            "binding": {
                "vocabulary": {
                    "key": "<vocabulary-key>",
                    "strength": "preferred" // Allowed "preferred" or "required"
                }
            }
        }
    }
}

An example of vocabulary-based validation in our provider profile would be:

{
    "properties": {
        "name": {
            "type": "symbol"
        },
        "practiceNumber": {
            "type": "integer"
        },
        "specialities": {
            "type": "array",
            "items": {
                "type": "symbol"
            }
        },
        "spokenLanguages": {
            "type": "array",
            "items": {
                "type": "code",
                "binding": {
                    "vocabulary": {
                        "key": "spoken-language", // Key of the Spoken Languages Vocabulary
                        "strength": "required" // Required to abide by the Vocabulary
                    }
                }
            }
        }
    }
}

With the above configuration, the provider must select from the list of Concepts defined in the "spoken-language" vocabulary by choosing one of its items' "code" properties.


🚧

Note:

Vocabulary-Based Validation can only be used on code or coding Data Types.