use of org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupUnmappedComponent in project bunsen by cerner.
the class BroadcastableMappingsTest method setUp.
/**
* Sets up Spark and concept maps for testing.
*/
@BeforeClass
public static void setUp() {
spark = SparkSession.builder().master("local[2]").appName("BroadcastableMappingsTest").getOrCreate();
ConceptMap conceptMap = new ConceptMap();
conceptMap.setUrl("uri:test:concept:map").setVersion("0").setSource(new UriType("uri:test:source:valueset")).setTarget(new UriType("uri:test:target:valueset"));
ConceptMapGroupComponent group = conceptMap.addGroup().setSource("uri:test:source:system").setTarget("uri:test:target:system");
group.addElement().setCode("abc").addTarget().setCode("123");
group.addElement().setCode("def").addTarget().setCode("456");
ConceptMap delegatingMap = new ConceptMap();
delegatingMap.setUrl("uri:test:concept:delegating").setVersion("0").setSource(new UriType("uri:test:source:valueset")).setTarget(new UriType("uri:test:target:valueset"));
delegatingMap.addGroup().setSource("uri:test:source:system").setTarget("uri:test:target:system").setUnmapped(new ConceptMapGroupUnmappedComponent().setMode(ConceptMapGroupUnmappedMode.OTHERMAP).setUrl("uri:test:concept:map"));
broadcast = BroadcastableMappings.broadcast(spark, ImmutableList.of(conceptMap, delegatingMap));
}
Aggregations