io.github.linuxforhealth.api.MessageEngine Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hl7v2-fhir-converter Show documentation
Show all versions of hl7v2-fhir-converter Show documentation
FHIR converter is a Java based library that enables converting Hl7v2 messages to FHIR resources
/*
* (C) Copyright IBM Corp. 2020
*
* SPDX-License-Identifier: Apache-2.0
*/
package io.github.linuxforhealth.api;
import java.util.Map;
import org.hl7.fhir.r4.model.Bundle;
import io.github.linuxforhealth.fhir.FHIRContext;
/**
* Implement this interface for each Data type that needs to be transformed into FHIR resource
*
*
*/
public interface MessageEngine {
/**
* Transforms source data to a FHIR bundle with the list of resources specified
*
* @param dataSource - {@link InputDataExtractor}
* @param resources -{@link FHIRResourceTemplate}
* @param contextValues - Map of context values
* @return FHIR {@link Bundle}
*/
Bundle transform(InputDataExtractor dataSource, Iterable resources,
Map contextValues);
/**
* Return the FHIR context to be used for validating and generating FHIR resources
*
* @return {@link FHIRContext}
*/
FHIRContext getFHIRContext();
}