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

io.github.linuxforhealth.api.Variable 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 java.util.List;
import java.util.Map;


/**
 * Defines Variable object that can be used during the expression evaluation.
 * 
 *
 * @author pbhallam
 */
public interface Variable {

  /**
   * Return the list of specs that should be used for evaluating the variable. If the list of specs
   * is empty then variable value will be extracted from contextValues. If the list of specs is not
   * empty then data source will be used to extract the value of the specs.
   * 
   * @return {@link List} of String
   */
  List getSpec();

  /**
   * Return the Class type for the value to be extracted.
   * 
   * @return String
   */
  String getType();

  /**
   * Return the name of the variable
   * 
   * @return String
   */
  String getVariableName();

  /**
   * Evaluates the variable and extracts the value based on the provided context values and input
   * data source.
   * 
   * @param contextValues {@link Map} of String and value {@link EvaluationResult }
   * @param dataSource {@link InputDataExtractor}
   * @return {@link EvaluationResult}
   */
  EvaluationResult extractVariableValue(Map contextValues,
      InputDataExtractor dataSource);


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy