io.github.linuxforhealth.api.ResourceModel 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 io.github.linuxforhealth.core.resource.ResourceResult;
/**
* Represents FHIR resource that needs to be generated based on the provided expressions
*
*
* @author pbhallam
*/
public interface ResourceModel {
/**
* Evaluates the resource to generate the FHIR resource equivalent represented by the resource
* template.
*
* @param dataExtractor - {@link InputDataExtractor}
* @param contextValues - Map of key:String, value: {@link EvaluationResult} linuxforhealthch can
* be during expression evaluation.
* @param baseValue - {@link EvaluationResult} Base value is the values that this resource is
* Primarily based on. - Example for a Patient Resource , the base value could be the PID
* segment.
* @return result {@link ResourceResult }
*/
ResourceResult evaluate(InputDataExtractor dataExtractor,
Map contextValues, EvaluationResult baseValue);
/**
* Returns the list of Expression that needs to be evaluated to generate the resource
*
* @return Map of key:String, value: {@link Expression}
*/
Map getExpressions();
/**
* Name of the resource
*
* @return String - Name of the resource
*/
String getName();
}