result <- client$mappings$get(201826)
# Create a data frame from mappings
mapping_df <- do.call(rbind, lapply(result$mappings, function(m) {
data.frame(
source_id = m$source_concept_id,
target_id = m$target_concept_id,
target_vocab = m$target_vocabulary_id,
target_code = m$target_concept_code,
target_name = m$target_concept_name,
stringsAsFactors = FALSE
)
}))
# Filter to specific vocabulary
icd10_mappings <- mapping_df[mapping_df$target_vocab == "ICD10CM", ]