A memoised version of the getCodeCounts function that caches results to improve performance for repeated calls with the same parameters. The CDMdbHandler argument is omitted from the cache key to allow sharing across different database connections.

getCodeCounts_memoise(CDMdbHandler, conceptId, codeCountsTable = "code_counts")

Arguments

CDMdbHandler

A CDMdbHandler object that contains database connection details

conceptId

The concept ID to get counts and relationships for

codeCountsTable

Name of the code counts table in the results schema. Defaults to "code_counts"

Value

A list containing:

  • concept_relationships - Tibble of concept relationships including 'Maps to', 'Mapped from', 'Parent', and descendant relationships

  • concepts - Tibble of concept details for related concepts

  • code_counts - Tibble of code counts from the code_counts table