Skip to contents

A model that reads a custom feature (a site's Charlson index, an area deprivation index) by concept id is only portable if the id means the same feature everywhere, and custom concept ids are per database (register_custom_concepts()). Stamping a feature spec adds concept_id to every feature that is a registered custom concept, so the bundle records the id the feature had when the model was trained; validate_bundle_concepts() checks it at the site that scores. A feature is matched by name, or by concept_key when the name differs from the registered concept code.

Usage

stamp_feature_spec_concepts(feature_spec, source)

Arguments

feature_spec

A feature spec list (see load_feature_spec()).

source

A DBI connection to the OMOP DuckDB, a registry (named vector or list name = id), or the JSON file from export_custom_concept_registry().

Value

The spec with concept_id added where a feature is a registered custom concept.