
Record the custom concept ids in a feature spec
Source:R/bundle_concepts.R
stamp_feature_spec_concepts.RdA 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.
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 fromexport_custom_concept_registry().