Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The catalogue

The catalogue contains all possible query elements used in your search or exploration application. Lens expects a catalogue to be provided during initialization — even an empty one is valid.

The structure of the catalogue is defined in schema and type. Validating your catalogue can be done within VS Code with the schema, see here.

Subgroups

The catalogue supports the definition of subgroups. For example, you might group all patients with diabetes at the top level, while also distinguishing between different types of diabetes. If a user wants to find patients with any form of diabetes, this can be expressed using subgroups in the catalogue.

Subgroups allow you to structure complex concepts in a way that supports both broad and narrow search criteria.

async function fetchCatalogue() {
    const catalogue: Catalogue = await fetch(catalogueUrl).then((response) =>
        response.json(),
    );
    setCatalogue(catalogue);
}