All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.linuxforhealth.api.MessageTemplate Maven / Gradle / Ivy

Go to download

FHIR converter is a Java based library that enables converting Hl7v2 messages to FHIR resources

There is a newer version: 1.0.19
Show newest version
/*
 * (C) Copyright IBM Corp. 2020
 *
 * SPDX-License-Identifier: Apache-2.0
 */
package io.github.linuxforhealth.api;

import org.hl7.fhir.r4.model.Bundle;

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 Bundle - {@link Bundle}
   *
   */
  Bundle 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();


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy