Resolves a concept map to its mappings and returns them as a relation that Spark SQL can join to, as described in the SQL on FHIR Terminology in SQL page. The relation has one row per mapping, plus one row with a null target_code for each source code the map states has no mapping, and the columns source_system, source_version, source_code, source_display, target_system, target_version, target_code, target_display and relationship; source_system and source_code are never null. relationship is an R5 ConceptMapRelationship code, converted from the R4 equivalence.

pathling_concept_map(pc, canonical, max_mappings = NULL)

Arguments

pc

The PathlingContext object.

canonical

The canonical URL of the concept map, optionally with a |version suffix.

max_mappings

The largest number of mappings accepted. When NULL, 100,000 mappings are accepted. Defaults to NULL.

Value

A Spark DataFrame containing the concept map relation.

Details

The mappings are read from the configured terminology layer when this function is called. A concept map that cannot be resolved, carries content the relation cannot represent, or exceeds the cap is an error.