io.github.linuxforhealth.api.MessageTemplate 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.List;
/**
* Message template defines how to convert a particular type of input information to FHIR resources.
* Example, for HL7, the message template can be defined per HL7 message type, linuxforhealthch
* would define list of resources to be generated.
*
* @param - Input type
*
* @author pbhallam
*/
public interface MessageTemplate {
/**
* Takes input and converts it to FHIR bundle resource
*
* @param data - Input
* @param engine - {@link MessageEngine}
* @return String -JSON representation of FHIR bundle
*
*/
String convert(T data, MessageEngine engine);
/**
* Name of the message
*
* @return String
*/
String getMessageName();
/**
* List of templates for FHIR resources that needs to be generated
*
* @return {@link List} of {@link FHIRResourceTemplate}
*/
List getResources();
}