public class ConceptMaps extends AbstractConceptMaps<org.hl7.fhir.r4.model.ConceptMap,ConceptMaps>
CONCEPT_MAP_TABLE, conceptMapEncoder, conceptMaps, fhirVersion, MAPPING_DATABASE, MAPPING_ENCODER, MAPPING_TABLE, mappings, members, spark, TABLE_NAME_PATTERN, URL_AND_VERSION_ENCODER
Modifier | Constructor and Description |
---|---|
protected |
ConceptMaps(org.apache.spark.sql.SparkSession spark,
org.apache.spark.sql.Dataset<UrlAndVersion> members,
org.apache.spark.sql.Dataset<org.hl7.fhir.r4.model.ConceptMap> conceptMaps,
org.apache.spark.sql.Dataset<Mapping> mappings) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToConceptMap(org.hl7.fhir.r4.model.ConceptMap map,
org.apache.spark.sql.Dataset<Mapping> mappings)
Adds the given mappings to the concept map.
|
org.apache.spark.broadcast.Broadcast<BroadcastableMappings> |
broadcast(Map<String,String> conceptMapUriToVersion)
Broadcast mappings stored in the given conceptMaps instance that match the given
conceptMapUris.
|
static List<Mapping> |
expandMappings(org.hl7.fhir.r4.model.ConceptMap map)
Given a concept map, returns a list of mapping records it contains.
|
static org.apache.spark.sql.Encoder<org.hl7.fhir.r4.model.ConceptMap> |
getConceptMapEncoder()
Returns the encoder for concept maps.
|
static ConceptMaps |
getDefault(org.apache.spark.sql.SparkSession spark)
Returns the collection of concept maps from the default database and tables.
|
static ConceptMaps |
getEmpty(org.apache.spark.sql.SparkSession spark)
Returns an empty ConceptMaps instance.
|
static ConceptMaps |
getFromDatabase(org.apache.spark.sql.SparkSession spark,
String databaseName)
Returns the collection of concept maps from the tables in the given database.
|
static org.apache.spark.sql.Encoder<Mapping> |
getMappingEncoder()
Returns the encoder for mappings.
|
protected ConceptMaps |
newInstance(org.apache.spark.sql.SparkSession spark,
org.apache.spark.sql.Dataset<UrlAndVersion> members,
org.apache.spark.sql.Dataset<org.hl7.fhir.r4.model.ConceptMap> conceptMaps,
org.apache.spark.sql.Dataset<Mapping> mappings)
Returns a new instance of this ConceptMaps type with the given parameters.
|
ConceptMaps |
withConceptMaps(org.apache.spark.sql.Dataset<org.hl7.fhir.r4.model.ConceptMap> conceptMaps)
Returns a new ConceptMaps instance that includes the given maps.
|
broadcast, getConceptMap, getLatestMappings, getLatestVersions, getLatestVersions, getMappings, getMappings, getMappings, getMaps, getUrlAndVersionEncoder, getUrlAndVersions, hasDuplicateUrlAndVersions, withConceptMaps, withConceptMaps, withConceptMaps, withDisjointMapsFromDirectory, withDisjointMapsFromDirectory, withExpandedMap, withMapsFromDirectory, writeToDatabase, writeToTables
protected ConceptMaps(org.apache.spark.sql.SparkSession spark, org.apache.spark.sql.Dataset<UrlAndVersion> members, org.apache.spark.sql.Dataset<org.hl7.fhir.r4.model.ConceptMap> conceptMaps, org.apache.spark.sql.Dataset<Mapping> mappings)
public static org.apache.spark.sql.Encoder<Mapping> getMappingEncoder()
public static org.apache.spark.sql.Encoder<org.hl7.fhir.r4.model.ConceptMap> getConceptMapEncoder()
protected ConceptMaps newInstance(org.apache.spark.sql.SparkSession spark, org.apache.spark.sql.Dataset<UrlAndVersion> members, org.apache.spark.sql.Dataset<org.hl7.fhir.r4.model.ConceptMap> conceptMaps, org.apache.spark.sql.Dataset<Mapping> mappings)
AbstractConceptMaps
newInstance
in class AbstractConceptMaps<org.hl7.fhir.r4.model.ConceptMap,ConceptMaps>
public static ConceptMaps getDefault(org.apache.spark.sql.SparkSession spark)
spark
- the spark sessionpublic static ConceptMaps getFromDatabase(org.apache.spark.sql.SparkSession spark, String databaseName)
spark
- the spark sessiondatabaseName
- name of the database containing the conceptmaps and mappings tables.public static ConceptMaps getEmpty(org.apache.spark.sql.SparkSession spark)
spark
- the spark sessionprotected void addToConceptMap(org.hl7.fhir.r4.model.ConceptMap map, org.apache.spark.sql.Dataset<Mapping> mappings)
AbstractConceptMaps
addToConceptMap
in class AbstractConceptMaps<org.hl7.fhir.r4.model.ConceptMap,ConceptMaps>
map
- the concept mapmappings
- the mappings to addpublic static List<Mapping> expandMappings(org.hl7.fhir.r4.model.ConceptMap map)
map
- a concept mappublic ConceptMaps withConceptMaps(org.apache.spark.sql.Dataset<org.hl7.fhir.r4.model.ConceptMap> conceptMaps)
AbstractConceptMaps
withConceptMaps
in class AbstractConceptMaps<org.hl7.fhir.r4.model.ConceptMap,ConceptMaps>
conceptMaps
- concept maps to add to the returned collection.public org.apache.spark.broadcast.Broadcast<BroadcastableMappings> broadcast(Map<String,String> conceptMapUriToVersion)
AbstractConceptMaps
broadcast
in class AbstractConceptMaps<org.hl7.fhir.r4.model.ConceptMap,ConceptMaps>
conceptMapUriToVersion
- map of the concept map URIs to broadcast to their versions.Copyright © 2018. All rights reserved.